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