[petsc-users] MATSOLVERSUPERLU_DIST not giving the correct solution
Justin Dong
jsd1 at rice.edu
Wed Apr 30 02:37:48 CDT 2014
Hi,
I'm trying to solve a linear system in parallel using SuperLU but for some
reason, it's not giving me the correct solution. I'm testing on a small
example so I can compare the sequential and parallel cases manually. I'm
absolutely sure that my routine for generating the matrix and right-hand
side in parallel is working correctly.
Running with 1 process and PCLU gives the correct solution. Running with 2
processes and using SUPERLU_DIST does not give the correct solution (I
tried with 1 process too but according to the superlu documentation, I
would need SUPERLU for sequential?). This is the code for solving the
system:
/* solve the system */
KSPCreate(PETSC_COMM_WORLD, &ksp);
KSPSetOperators(ksp, Aglobal, Aglobal, DIFFERENT_NONZERO_PATTERN);
KSPSetType(ksp,KSPPREONLY);
KSPGetPC(ksp, &pc);
KSPSetTolerances(ksp, 1.e-13, PETSC_DEFAULT, PETSC_DEFAULT, PETSC_DEFAULT);
PCFactorSetMatSolverPackage(pc, MATSOLVERSUPERLU_DIST);
KSPSolve(ksp, bglobal, bglobal);
Sincerely,
Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140430/9c92176e/attachment.html>
More information about the petsc-users
mailing list