From: Debian Science Team Date: Wed, 18 Nov 2020 16:09:19 +0000 (+0000) Subject: mpi_prefer_mumps_not_superlu_dist X-Git-Tag: archive/raspbian/2019.2.0_git20200629.946dbd3-8+rpi1^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=69169050974f4feec7e0e77169c100db3bd3f867;p=dolfin.git mpi_prefer_mumps_not_superlu_dist Gbp-Pq: Name mpi_prefer_mumps_not_superlu_dist.patch --- diff --git a/dolfin/la/PETScLUSolver.cpp b/dolfin/la/PETScLUSolver.cpp index 820cb09..ce09e9b 100644 --- a/dolfin/la/PETScLUSolver.cpp +++ b/dolfin/la/PETScLUSolver.cpp @@ -329,22 +329,17 @@ const MatSolverType PETScLUSolver::select_solver(MPI_Comm comm, { #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::select_solver(MPI_Comm comm, 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::select_solver(MPI_Comm comm, { #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", diff --git a/dolfin/nls/PETScSNESSolver.cpp b/dolfin/nls/PETScSNESSolver.cpp index 71bca08..3ed7bc4 100644 --- a/dolfin/nls/PETScSNESSolver.cpp +++ b/dolfin/nls/PETScSNESSolver.cpp @@ -566,16 +566,16 @@ void PETScSNESSolver::set_linear_solver_parameters() } 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 } } diff --git a/dolfin/nls/PETScTAOSolver.cpp b/dolfin/nls/PETScTAOSolver.cpp index cebb0de..9d6ac48 100644 --- a/dolfin/nls/PETScTAOSolver.cpp +++ b/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 } }