Package: dolfin / 2018.1.0.post1-16

mpi_prefer_mumps_not_superlu_dist.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Index: dolfin/dolfin/nls/PETScSNESSolver.cpp
===================================================================
--- dolfin.orig/dolfin/nls/PETScSNESSolver.cpp
+++ dolfin/dolfin/nls/PETScSNESSolver.cpp
@@ -560,16 +560,16 @@ void PETScSNESSolver::set_linear_solver_
       }
       else
       {
-        #if PETSC_HAVE_SUPERLU_DIST
-        lu_method = "superlu_dist";
-        #elif PETSC_HAVE_PASTIX
+        #if PETSC_HAVE_PASTIX
         lu_method = "pastix";
         #elif PETSC_HAVE_MUMPS
         lu_method = "mumps";
+        #elif PETSC_HAVE_SUPERLU_DIST
+        lu_method = "superlu_dist";
         #else
         dolfin_error("PETScSNESSolver.cpp",
                      "solve linear system using PETSc LU solver",
-                     "No suitable solver for parallel LU found. Consider configuring PETSc with MUMPS or SuperLU_dist");
+                     "No suitable solver for parallel LU found. Consider configuring PETSc with MUMPS (preferred) or SuperLU_dist");
         #endif
       }
     }
Index: dolfin/dolfin/nls/PETScTAOSolver.cpp
===================================================================
--- dolfin.orig/dolfin/nls/PETScTAOSolver.cpp
+++ dolfin/dolfin/nls/PETScTAOSolver.cpp
@@ -519,16 +519,16 @@ void PETScTAOSolver::set_ksp_options()
         }
         else
         {
-          #if PETSC_HAVE_SUPERLU_DIST
-          lu_method = "superlu_dist";
-          #elif PETSC_HAVE_PASTIX
+          #if PETSC_HAVE_PASTIX
           lu_method = "pastix";
           #elif PETSC_HAVE_MUMPS
           lu_method = "mumps";
+          #elif PETSC_HAVE_SUPERLU_DIST
+          lu_method = "superlu_dist";
           #else
           dolfin_error("PETScTAOSolver.cpp",
                        "solve linear system using PETSc LU solver",
-                       "No suitable solver for parallel LU found. Consider configuring PETSc with MUMPS or SuperLU_dist");
+                       "No suitable solver for parallel LU found. Consider configuring PETSc with MUMPS (preferred) or SuperLU_dist");
           #endif
         }
       }
Index: dolfin/dolfin/la/PETScLUSolver.cpp
===================================================================
--- dolfin.orig/dolfin/la/PETScLUSolver.cpp
+++ dolfin/dolfin/la/PETScLUSolver.cpp
@@ -329,22 +329,17 @@ const MatSolverType PETScLUSolver::selec
     {
       #if PETSC_HAVE_UMFPACK || PETSC_HAVE_SUITESPARSE
       method = "umfpack";
-      #elif PETSC_HAVE_SUPERLU_DIST
-      method = "superlu_dist";
+      // superlu_dist does not work efficiently since mc64 cannot be redistributed.  So use PETSc in preference to superlu_dist
       #else
       method = "petsc";
-      warning("Using PETSc native LU solver. Consider configuring PETSc with an efficient LU solver (e.g. Umfpack, SuperLU_dist).");
+      warning("Using PETSc native LU solver. Consider configuring PETSc with an efficient LU solver (e.g. Umfpack).");
       #endif
     }
     else
     {
-      #if PETSC_HAVE_SUPERLU_DIST
-      method = "superlu_dist";
-      #else
+      // superlu_dist does not work efficiently since mc64 cannot be redistributed.  So use PETSc in preference to superlu_dist
       method = "petsc";
-      warning("Using PETSc native LU solver. Consider configuring PETSc with an efficient LU solver (e.g. SuperLU_dist).");
-      #endif
-
+      warning("Using PETSc native LU solver. Consider specifying a more efficient LU solver (e.g.umfpack) if available.");
     }
     #else
     if (dolfin::MPI::size(comm) == 1)
@@ -357,8 +352,7 @@ const MatSolverType PETScLUSolver::selec
       method = "pastix";
       #elif PETSC_HAVE_SUPERLU
       method = "superlu";
-      #elif PETSC_HAVE_SUPERLU_DIST
-      method = "superlu_dist";
+      // superlu_dist does not work efficiently since mc64 cannot be redistributed.  So use PETSc in preference to superlu_dist
       #else
       method = "petsc";
       warning("Using PETSc native LU solver. Consider configuring PETSc with an efficient LU solver (e.g. UMFPACK, MUMPS).");
@@ -368,10 +362,10 @@ const MatSolverType PETScLUSolver::selec
     {
       #if PETSC_HAVE_MUMPS
       method = "mumps";
-      #elif PETSC_HAVE_SUPERLU_DIST
-      method = "superlu_dist";
       #elif PETSC_HAVE_PASTIX
       method = "pastix";
+      #elif PETSC_HAVE_SUPERLU_DIST
+      method = "superlu_dist";
       #else
       dolfin_error("PETScLUSolver.cpp",
                    "solve linear system using PETSc LU solver",