Dear libmesh users/developers, I am trying to solve several linear systems of equations for the same sparse matrix and different right-hand sides. To that end I am doing the following in my code:
UniquePtr< LinearSolver<Number> > linear_solver = LinearSolver<Number>::build(init.comm(),libMesh::default_solver_package());; linear_solver->reuse_preconditioner(true); linear_solver->set_preconditioner_type(ILU_PRECOND); linear_solver->set_solver_type(BICGSTAB); and then solving later the system. This always worked fine also when using a sparse direct solver from Mumps or Umfpack instead via the command line for libmesh installations where I installed also Petsc manually. However, I am now running the same code on a different machine where I am using the standard petsc installation from ubuntu and I get the following error message: [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/linearsolvertable.html for possible LU and Cholesky solvers [0]PETSC ERROR: MatSolverPackage mumps does not support factorization type ILU for matrix type seqaij [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.6.2, Oct, 02, 2015 [0]PETSC ERROR: ./example-opt on a x86_64-linux-gnu-real named JACEN by ksmet_01 Tue Mar 14 23:31:49 2017 [0]PETSC ERROR: Configure options --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --with-silent-rules=0 --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --with-maintainer-mode=0 --with-dependency-tracking=0 --with-debugging=0 --shared-library-extension=_real --with-hypre=1 --with-hypre-dir=/usr --with-clanguage=C++ --with-c-support --with-shared-libraries --useThreads 0 --with-fortran-interfaces=1 --with-mpi-dir=/usr/lib/openmpi --with-blas-lib=-lblas --with-lapack-lib=-llapack --with-blacs=1 --with-blacs-lib="-lblacsCinit-openmpi -lblacs-openmpi" --with-scalapack=1 --with-scalapack-lib=-lscalapack-openmpi --with-mumps=1 --with-mumps-include="[]" --with-mumps-lib="-ldmumps -lzmumps -lsmumps -lcmumps -lmumps_common -lpord" --with-suitesparse=1 --with-suitesparse-include=/usr/include/suitesparse --with-suitesparse-lib="-lumfpack -la md -lcholmod -lklu" --with-spooles=1 --with-spooles-include=/usr/include/spooles --with-spooles-lib=-lspooles --with-ptscotch=1 --with-ptscotch-include=/usr/include/scotch --with-ptscotch-lib="-lptesmumps -lptscotch -lptscotcherr" --with-fftw=1 --with-fftw-include="[]" --with-fftw-lib="-lfftw3 -lfftw3_mpi" --with-superlu=1 --with-superlu-include=/usr/include/superlu --with-superlu-lib=-lsuperlu --CXX_LINKER_FLAGS=-Wl,--no-as-needed --prefix=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real PETSC_DIR=/build/petsc-16ivCo/petsc-3.6.2.dfsg1 --PETSC_ARCH=x86_64-linux-gnu-real CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" FCFLAGS="-g -O2 -fstack-protector-strong" FFLAGS="-g -O2 -fstack-protector-strong" CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro" MAKEFLAGS=w [0]PETSC ERROR: #1 MatGetFactor() line 4159 in /build/petsc-16ivCo/petsc-3.6.2.dfsg1/src/mat/interface/matrix.c [0]PETSC ERROR: #2 PCSetUp_ILU() line 202 in /build/petsc-16ivCo/petsc-3.6.2.dfsg1/src/ksp/pc/impls/factor/ilu/ilu.c [0]PETSC ERROR: #3 PCSetUp() line 983 in /build/petsc-16ivCo/petsc-3.6.2.dfsg1/src/ksp/pc/interface/precon.c [0]PETSC ERROR: #4 KSPSetUp() line 332 in /build/petsc-16ivCo/petsc-3.6.2.dfsg1/src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: #5 KSPSolve() line 546 in /build/petsc-16ivCo/petsc-3.6.2.dfsg1/src/ksp/ksp/interface/itfunc.c I get the same error message when I use UniquePtr< LinearSolver<Number> > linear_solver = LinearSolver<Number>::build(init.comm(),libMesh::default_solver_package());; //linear_solver->reuse_preconditioner(true); //linear_solver->set_preconditioner_type(ILU_PRECOND); linear_solver->set_solver_type(BICGSTAB); in my code. I also tried umfpack and got the same error message. I would suspect that the error might be due to the fact that petsc is not configured as needed? Note that I manually installed petsc on another machine, where the standard ubuntu version was also installed. However, although I exported the manually installed PETSC direction and passed the right directions during the libmesh configuration, the applications used the standard ubuntu version, which caused an error. After removing the standard ubuntu version of petsc everything worked fine again. The problem is that on the current machine we would prefer not to remove the standard ubuntu version of petsc as many people use the machine. Do you have any suggestions how I could use a sparse direct solver in this context? Thanks, Kathrin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
