Commits

Jed Brown committed 5e9742b

Mat PCFactor: include MatFactorShiftType in PCView_Factor output

Consolidates the detailed shift string and updates all output files,
including a couple that have not been run in a long time and have other
problems.

  • Participants
  • Parent commits 547fa22

Comments (0)

Files changed (31)

File include/petscmat.h

 S*/
 typedef enum {MAT_SHIFT_NONE,MAT_SHIFT_NONZERO,MAT_SHIFT_POSITIVE_DEFINITE,MAT_SHIFT_INBLOCKS} MatFactorShiftType;
 PETSC_EXTERN const char *const MatFactorShiftTypes[];
+PETSC_EXTERN const char *const MatFactorShiftTypesDetail[];
 
 /*S
    MatFactorInfo - Data passed into the matrix factorization routines

File src/ksp/ksp/examples/tests/output/ex11_1.out

             type: icc
               0 levels of fill
               tolerance for zero pivot 1e-12
-              using Manteuffel shift
+              using Manteuffel shift [POSITIVE_DEFINITE]
               matrix ordering: natural
               factor fill ratio given 1, needed 1
                 Factored matrix follows:

File src/ksp/ksp/examples/tests/output/ex11_2.out

               type: icc
                 0 levels of fill
                 tolerance for zero pivot 1e-12
-                using Manteuffel shift
+                using Manteuffel shift [POSITIVE_DEFINITE]
                 matrix ordering: natural
                 factor fill ratio given 1, needed 1
                   Factored matrix follows:

File src/ksp/ksp/examples/tutorials/output/ex10_aijcusparse.out

     ILU: out-of-place factorization
     0 levels of fill
     tolerance for zero pivot 2.22045e-14
-    using diagonal shift on blocks to prevent zero pivot
+    using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
     matrix ordering: natural
     factor fill ratio given 1, needed 1
       Factored matrix follows:

File src/ksp/ksp/examples/tutorials/output/ex10_mpicrl.out

       ILU: 0 levels of fill
       ILU: factor fill ratio allocated 1
       ILU: tolerance for zero pivot 1e-12
-      ILU: using diagonal shift to prevent zero pivot
-      ILU: using diagonal shift on blocks to prevent zero pivot
+      ILU: using diagonal shift to prevent zero pivot [NONZERO]
+      ILU: using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
            out-of-place factorization
            matrix ordering: natural
       ILU: factor fill ratio needed 1

File src/ksp/ksp/examples/tutorials/output/ex10_mpicsrperm.out

       ILU: 0 levels of fill
       ILU: factor fill ratio allocated 1
       ILU: tolerance for zero pivot 1e-12
-      ILU: using diagonal shift to prevent zero pivot
-      ILU: using diagonal shift on blocks to prevent zero pivot
+      ILU: using diagonal shift to prevent zero pivot [NONZERO]
+      ILU: using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
            out-of-place factorization
            matrix ordering: natural
       ILU: factor fill ratio needed 1

File src/ksp/ksp/examples/tutorials/output/ex10_seqcrl.out

     ILU: 0 levels of fill
     ILU: factor fill ratio allocated 1
     ILU: tolerance for zero pivot 1e-12
-    ILU: using diagonal shift to prevent zero pivot
-    ILU: using diagonal shift on blocks to prevent zero pivot
+    ILU: using diagonal shift to prevent zero pivot [NONZERO]
+    ILU: using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
          out-of-place factorization
          matrix ordering: natural
     ILU: factor fill ratio needed 1

File src/ksp/ksp/examples/tutorials/output/ex10_seqcsrperm.out

     ILU: 0 levels of fill
     ILU: factor fill ratio allocated 1
     ILU: tolerance for zero pivot 1e-12
-    ILU: using diagonal shift to prevent zero pivot
-    ILU: using diagonal shift on blocks to prevent zero pivot
+    ILU: using diagonal shift to prevent zero pivot [NONZERO]
+    ILU: using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
          out-of-place factorization
          matrix ordering: natural
     ILU: factor fill ratio needed 1

File src/ksp/ksp/examples/tutorials/output/ex34_1.out

       type: lu
         LU: out-of-place factorization
         tolerance for zero pivot 2.22045e-14
-        using diagonal shift to prevent zero pivot
+        using diagonal shift to prevent zero pivot [NONZERO]
         matrix ordering: nd
         factor fill ratio given 5, needed 2.21481
           Factored matrix follows:

File src/ksp/ksp/examples/tutorials/output/ex50.out

       type: lu
         LU: out-of-place factorization
         tolerance for zero pivot 2.22045e-14
-        using diagonal shift to prevent zero pivot
+        using diagonal shift to prevent zero pivot [NONZERO]
         matrix ordering: nd
         factor fill ratio given 5, needed 3.17112
           Factored matrix follows:
         ILU: out-of-place factorization
         0 levels of fill
         tolerance for zero pivot 2.22045e-14
-        using diagonal shift to prevent zero pivot
+        using diagonal shift to prevent zero pivot [NONZERO]
         matrix ordering: natural
         factor fill ratio given 1, needed 1
           Factored matrix follows:

File src/ksp/ksp/examples/tutorials/output/ex50_2.out

           ILU: out-of-place factorization
           0 levels of fill
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift to prevent zero pivot
+          using diagonal shift to prevent zero pivot [NONZERO]
           matrix ordering: natural
           factor fill ratio given 1, needed 1
             Factored matrix follows:

File src/ksp/pc/impls/factor/factimpl.c

     }
 
     ierr = PetscViewerASCIIPrintf(viewer,"  tolerance for zero pivot %G\n",factor->info.zeropivot);CHKERRQ(ierr);
-    if (factor->info.shifttype==(PetscReal)MAT_SHIFT_POSITIVE_DEFINITE) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  using Manteuffel shift\n");CHKERRQ(ierr);
-    }
-    if (factor->info.shifttype==(PetscReal)MAT_SHIFT_NONZERO) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  using diagonal shift to prevent zero pivot\n");CHKERRQ(ierr);
-    }
-    if (factor->info.shifttype==(PetscReal)MAT_SHIFT_INBLOCKS) {
-      ierr = PetscViewerASCIIPrintf(viewer,"  using diagonal shift on blocks to prevent zero pivot\n");CHKERRQ(ierr);
+    if (MatFactorShiftTypesDetail[(int)factor->info.shifttype]) { /* Only print when using a nontrivial shift */
+      ierr = PetscViewerASCIIPrintf(viewer,"  using %s [%s]\n",MatFactorShiftTypesDetail[(int)factor->info.shifttype],MatFactorShiftTypes[(int)factor->info.shifttype]);CHKERRQ(ierr);
     }
 
     ierr = PetscViewerASCIIPrintf(viewer,"  matrix ordering: %s\n",factor->ordering);CHKERRQ(ierr);

File src/mat/interface/dlregismat.c

                                   "CHECK_COMPRESSED_ROW",
                                   "IGNORE_LOWER_TRIANGULAR","ERROR_LOWER_TRIANGULAR","GETROW_UPPERTRIANGULAR","SPD","NO_OFF_PROC_ENTRIES","NO_OFF_PROC_ZERO_ROWS","MatOption","MAT_",0};
 const char *const MatFactorShiftTypes[] = {"NONE","NONZERO","POSITIVE_DEFINITE","INBLOCKS","MatFactorShiftType","PC_FACTOR_",0};
+const char *const MatFactorShiftTypesDetail[] = {NULL,"diagonal shift to prevent zero pivot","Manteuffel shift","diagonal shift on blocks to prevent zero pivot"};
 const char *const MPPTScotchStrategyTypes[] = {"QUALITY","SPEED","BALANCE","SAFETY","SCALABILITY","MPPTScotchStrategyType","MP_PTSCOTCH_",0};
 const char *const MPChacoGlobalTypes[] = {"","MULTILEVEL","SPECTRAL","","LINEAR","RANDOM","SCATTERED","MPChacoGlobalType","MP_CHACO_",0};
 const char *const MPChacoLocalTypes[] = {"","KERNIGHAN","NONE","MPChacoLocalType","MP_CHACO_",0};

File src/snes/examples/tutorials/output/ex18_1.out

         type: lu
           LU: out-of-place factorization
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: nd
           factor fill ratio given 5, needed 1.59172
             Factored matrix follows:

File src/snes/examples/tutorials/output/ex19_10.out

             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:

File src/snes/examples/tutorials/output/ex19_13.out

             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot
+            using diagonal shift to prevent zero pivot [NONZERO]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot
+            using diagonal shift to prevent zero pivot [NONZERO]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot
+            using diagonal shift to prevent zero pivot [NONZERO]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot
+            using diagonal shift to prevent zero pivot [NONZERO]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:

File src/snes/examples/tutorials/output/ex19_6.out

           ILU: out-of-place factorization
           0 levels of fill
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: natural
           factor fill ratio given 1, needed 1
             Factored matrix follows:
           ILU: out-of-place factorization
           0 levels of fill
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: natural
           factor fill ratio given 1, needed 1
             Factored matrix follows:
           ILU: out-of-place factorization
           0 levels of fill
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: natural
           factor fill ratio given 1, needed 1
             Factored matrix follows:
           ILU: out-of-place factorization
           0 levels of fill
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: natural
           factor fill ratio given 1, needed 1
             Factored matrix follows:

File src/snes/examples/tutorials/output/ex19_7.out

             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:

File src/snes/examples/tutorials/output/ex19_9.out

             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:

File src/snes/examples/tutorials/output/ex19_ngmres_fas_ms.out

                     ILU: out-of-place factorization
                     0 levels of fill
                     tolerance for zero pivot 2.22045e-14
-                    using diagonal shift to prevent zero pivot
+                    using diagonal shift to prevent zero pivot [NONZERO]
                     matrix ordering: natural
                     factor fill ratio given 1, needed 1
                       Factored matrix follows:

File src/snes/examples/tutorials/output/ex20_1.out

           type: lu
             LU: out-of-place factorization
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: nd
             factor fill ratio given 5, needed 1.19825
               Factored matrix follows:

File src/snes/examples/tutorials/output/ex40f90.out

         type: lu
           LU: out-of-place factorization
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: nd
           factor fill ratio given 5, needed 2.38265
             Factored matrix follows:

File src/snes/examples/tutorials/output/ex46_1.out

         type: lu
           LU: out-of-place factorization
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: nd
           factor fill ratio given 5, needed 1.875
             Factored matrix follows:

File src/snes/examples/tutorials/output/ex48_4.out

           type: lu
             LU: out-of-place factorization
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: nd
             factor fill ratio given 5, needed 1.41667
               Factored matrix follows:
           type: icc
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using Manteuffel shift
+            using Manteuffel shift [POSITIVE_DEFINITE]
             matrix ordering: natural
             factor fill ratio given 1, needed 1.00133
               Factored matrix follows:
           type: icc
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using Manteuffel shift
+            using Manteuffel shift [POSITIVE_DEFINITE]
             matrix ordering: natural
             factor fill ratio given 1, needed 1.00054
               Factored matrix follows:

File src/snes/examples/tutorials/output/ex5_1.out

         type: lu
           LU: out-of-place factorization
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: nd
           factor fill ratio given 5, needed 1.59172
             Factored matrix follows:

File src/snes/examples/tutorials/output/ex5_2.out

         type: lu
           LU: out-of-place factorization
           tolerance for zero pivot 2.22045e-14
-          using diagonal shift on blocks to prevent zero pivot
+          using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
           matrix ordering: nd
           factor fill ratio given 5, needed 1.42
             Factored matrix follows:

File src/snes/examples/tutorials/output/ex5_3.out

           type: lu
             LU: out-of-place factorization
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: nd
             factor fill ratio given 5, needed 1.875
               Factored matrix follows:

File src/snes/examples/tutorials/output/ex5_4.out

           type: lu
             LU: out-of-place factorization
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift on blocks to prevent zero pivot
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: nd
             factor fill ratio given 5, needed 1.875
               Factored matrix follows:

File src/snes/examples/tutorials/output/ex5_5.out

         ILU: out-of-place factorization
         0 levels of fill
         tolerance for zero pivot 1e-12
-        using diagonal shift to prevent zero pivot
+        using diagonal shift to prevent zero pivot [NONZERO]
         matrix ordering: natural
         factor fill ratio given 1, needed 1
           Factored matrix follows:

File src/snes/examples/tutorials/output/ex70_0.out

               ILU: out-of-place factorization
               0 levels of fill
               tolerance for zero pivot 2.22045e-14
-              using diagonal shift to prevent zero pivot
+              using diagonal shift to prevent zero pivot [NONZERO]
               matrix ordering: natural
               factor fill ratio given 1, needed 1
                 Factored matrix follows:
               ILU: out-of-place factorization
               0 levels of fill
               tolerance for zero pivot 2.22045e-14
-              using diagonal shift to prevent zero pivot
+              using diagonal shift to prevent zero pivot [NONZERO]
               matrix ordering: natural
               factor fill ratio given 1, needed 1
                 Factored matrix follows:

File src/snes/examples/tutorials/output/ex70_1.out

             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot
+            using diagonal shift to prevent zero pivot [NONZERO]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot
+            using diagonal shift to prevent zero pivot [NONZERO]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows: