<div dir="ltr"><div>the default LU solver in sequential is the PETSc one which does not support pivoting or singular problems. In parallel, it is either MUMPS or SUPERLU_DIST, depending on your configurations. <br></div><div>MUMPS for example can handle singular problem, not sure about superlu_dist. You can run the parallel version with -ksp_view and see what is the solver package used.</div><div>Supposing it is mumps, you can run the sequential code with -pc_factor_mat_solver_type mumps<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno gio 7 nov 2024 alle ore 13:20 Klaij, Christiaan via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>I'm trying to solve a system with a single, non-constant, null space vector, confirmed by passing the MatNullSpaceTest. Solving the system works fine with -pc_type ilu on one or multiple procs. It also works fine with -pc_type lu on multiple procs but fails on a single proc. Any idea what could be wrong?<br><br>Chris<br><br>[0]PETSC ERROR: *** unknown floating point error occurred ***<br>[0]PETSC ERROR: The specific exception can be determined by running in a debugger.  When the<br>[0]PETSC ERROR: debugger traps the signal, the exception can be found with fetestexcept(0x3f)<br>[0]PETSC ERROR: where the result is a bitwise OR of the following flags:<br>[0]PETSC ERROR: FE_INVALID=0x1 FE_DIVBYZERO=0x4 FE_OVERFLOW=0x8 FE_UNDERFLOW=0x10 FE_INEXACT=0x20<br>[0]PETSC ERROR: Try option -start_in_debugger<br>[0]PETSC ERROR: likely location of problem given in stack below<br>[0]PETSC ERROR: ---------------------  Stack Frames ------------------------------------<br>[0]PETSC ERROR: The line numbers in the error traceback are not always exact.<br>[0]PETSC ERROR: #1 PetscDefaultFPTrap() at /cm/shared/apps/petsc/oneapi/build/src/src/sys/error/fp.c:487<br>[0]PETSC ERROR: #2 VecMDot_Seq() at /cm/shared/apps/petsc/oneapi/build/src/src/vec/vec/impls/seq/dvec2.c:189<br>[0]PETSC ERROR: #3 VecMXDot_MPI_Default() at /cm/shared/apps/petsc/oneapi/build/src/include/../src/vec/vec/impls/mpi/pvecimpl.h:96<br>[0]PETSC ERROR: #4 VecMDot_MPI() at /cm/shared/apps/petsc/oneapi/build/src/src/vec/vec/impls/mpi/pvec2.c:25<br>[0]PETSC ERROR: #5 VecMXDot_Private() at /cm/shared/apps/petsc/oneapi/build/src/src/vec/vec/interface/rvector.c:1112<br>[0]PETSC ERROR: #6 VecMDot() at /cm/shared/apps/petsc/oneapi/build/src/src/vec/vec/interface/rvector.c:1184<br>[0]PETSC ERROR: #7 MatNullSpaceRemove() at /cm/shared/apps/petsc/oneapi/build/src/src/mat/interface/matnull.c:359<br>[0]PETSC ERROR: #8 KSP_RemoveNullSpace() at /cm/shared/apps/petsc/oneapi/build/src/include/petsc/private/kspimpl.h:322<br>[0]PETSC ERROR: #9 KSP_PCApply() at /cm/shared/apps/petsc/oneapi/build/src/include/petsc/private/kspimpl.h:382<br>[0]PETSC ERROR: #10 KSPInitialResidual() at /cm/shared/apps/petsc/oneapi/build/src/src/ksp/ksp/interface/itres.c:64<br>[0]PETSC ERROR: #11 KSPSolve_GMRES() at /cm/shared/apps/petsc/oneapi/build/src/src/ksp/ksp/impls/gmres/gmres.c:226<br>[0]PETSC ERROR: #12 KSPSolve_Private() at /cm/shared/apps/petsc/oneapi/build/src/src/ksp/ksp/interface/itfunc.c:898<br>[0]PETSC ERROR: #13 KSPSolve() at /cm/shared/apps/petsc/oneapi/build/src/src/ksp/ksp/interface/itfunc.c:1070<br>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: Floating point exception<br>[0]PETSC ERROR: trapped floating point error<br>[0]PETSC ERROR: See <a href="https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!dXxAqHgHbtticGbE-cswI2ylVIt4A7Fn68LPFMyFtpJByLQtJocy5JF-Vf5Vzr_FbcWB1l7ve_2l9CdBfaa2Fyw$" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Release Version 3.19.4, Jul 31, 2023 <br>[0]PETSC ERROR: ./refresco on a  named marclus3login2 by cklaij Thu Nov  7 11:03:22 2024<br>[0]PETSC ERROR: Configure options --prefix=/cm/shared/apps/petsc/oneapi/3.19.4-dbg --with-mpi-dir=/cm/shared/apps/intel/oneapi/mpi/2021.4.0 --with-x=0 --with-mpe=0 --with-debugging=1 --download-superlu_dist=../superlu_dist-8.1.2.tar.gz --with-blaslapack-dir=/cm/shared/apps/intel/oneapi/mkl/2021.4.0 --download-parmetis=../parmetis-4.0.3-p9.tar.gz --download-metis=../metis-5.1.0-p11.tar.gz --with-packages-build-dir=/cm/shared/apps/petsc/oneapi/build --with-ssl=0 --with-shared-libraries=1 CFLAGS="-std=gnu11 -Wall -funroll-all-loops  -O3 -DNDEBUG" CXXFLAGS="-std=gnu++14 -Wall -funroll-all-loops  -O3 -DNDEBUG" COPTFLAGS="-std=gnu11 -Wall -funroll-all-loops  -O3 -DNDEBUG" CXXOPTFLAGS="-std=gnu++14 -Wall -funroll-all-loops  -O3 -DNDEBUG" FCFLAGS="-funroll-all-loops -O3 -DNDEBUG" F90FLAGS="-funroll-all-loops -O3 -DNDEBUG" FOPTFLAGS="-funroll-all-loops -O3 -DNDEBUG"<br>Abort(72) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 72) - process 0</div><div dir="ltr" style="font-size:1px;direction:ltr"><table dir="ltr" cellpadding="0" cellspacing="0" border="0" style="width:100%;direction:ltr;border-collapse:collapse;font-size:1px"><tbody><tr style="font-size:0px"><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px;line-height:normal"><tbody><tr style="font-size:0px"><td align="left" style="padding:10px 0px;vertical-align:top"><img src="cid:ii_19306c695d9c0e2969a1" width="125" height="40" border="0" alt="" style="width: 125px; min-width: 125px; max-width: 125px; height: 40px; min-height: 40px; max-height: 40px; font-size: 0px;"></td></tr></tbody></table></td></tr><tr style="font-size:0px"><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px"><tbody><tr style="font-size:0px"><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px;color:rgb(0,0,1);font-style:normal;font-weight:400;white-space:nowrap"><tbody><tr style="font-size:14.67px"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif">dr. ir.<span style="font-family:remialcxesans;font-size:1px;color:rgb(255,255,255);line-height:1px">​<span style="font-family:"template-A7LWMTpBEe2ifABQ8nUoZA"">​</span><span style="font-family:"zone-1"">​</span><span style="font-family:"zones-AQ"">​</span></span> </td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif">Christiaan</td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif"> Klaij</td></tr></tbody></table></td><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px;color:rgb(0,0,1);font-style:normal;font-weight:400;white-space:nowrap"><tbody><tr style="font-size:14.67px"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif"> | </td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif">Senior Researcher</td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif"> | </td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif">Research & Development</td><td align="left" style="vertical-align:top;font-size:0px"></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="font-size:0px"><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px"><tbody><tr style="font-size:0px"><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px;color:rgb(0,0,1);font-style:normal;font-weight:400;white-space:nowrap"><tbody><tr style="font-size:14.67px"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif">T <a href="tel:+31%20317%2049%2033%2044" id="m_-2345382319246573863LPlnk689713" style="text-decoration:none;color:rgb(0,0,1)" target="_blank">+31 317 49 33 44</a></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif"> | </td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif"> <a href="mailto:C.Klaij@marin.nl" id="m_-2345382319246573863LPlnk689713" style="text-decoration:none;color:rgb(0,0,1)" target="_blank">C.Klaij@marin.nl</a> </td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif">| <a href="https://urldefense.us/v3/__https://www.marin.nl/__;!!G_uCfscf7eWS!dXxAqHgHbtticGbE-cswI2ylVIt4A7Fn68LPFMyFtpJByLQtJocy5JF-Vf5Vzr_FbcWB1l7ve_2l9CdBivdTTos$" id="m_-2345382319246573863LPlnk689713" style="text-decoration:none;color:rgb(0,0,1)" target="_blank">www.marin.nl</a></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="font-size:0px"><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px"><tbody><tr style="font-size:0px"><td align="left" style="padding:5px 0px 0px;vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px"><tbody><tr style="font-size:0px"><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px;line-height:normal"><tbody><tr style="font-size:0px"><td align="left" style="padding:0px 3px 3px 0px;vertical-align:top"><a href="https://urldefense.us/v3/__https://www.facebook.com/marin.wageningen__;!!G_uCfscf7eWS!dXxAqHgHbtticGbE-cswI2ylVIt4A7Fn68LPFMyFtpJByLQtJocy5JF-Vf5Vzr_FbcWB1l7ve_2l9CdBNyhbEjY$" id="m_-2345382319246573863LPlnk689713" style="text-decoration:none" target="_blank"><img src="cid:ii_19306c695daf54a76f52" width="15" height="15" border="0" title="Facebook" alt="Facebook" style="width: 15px; min-width: 15px; max-width: 15px; height: 15px; min-height: 15px; max-height: 15px; font-size: 12px;"></a></td></tr></tbody></table></td><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px;line-height:normal"><tbody><tr style="font-size:0px"><td align="left" style="padding:0px 3px 3px 0px;vertical-align:top"><a href="https://urldefense.us/v3/__https://www.linkedin.com/company/marin__;!!G_uCfscf7eWS!dXxAqHgHbtticGbE-cswI2ylVIt4A7Fn68LPFMyFtpJByLQtJocy5JF-Vf5Vzr_FbcWB1l7ve_2l9CdBs7HDGBM$" id="m_-2345382319246573863LPlnk689713" style="text-decoration:none" target="_blank"><img src="cid:ii_19306c695da23b83d913" width="15" height="15" border="0" title="LinkedIn" alt="LinkedIn" style="width: 15px; min-width: 15px; max-width: 15px; height: 15px; min-height: 15px; max-height: 15px; font-size: 12px;"></a></td></tr></tbody></table></td><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0px;line-height:normal"><tbody><tr style="font-size:0px"><td align="left" style="padding:0px 3px 3px 0px;vertical-align:top"><a href="https://urldefense.us/v3/__https://www.youtube.com/marinmultimedia__;!!G_uCfscf7eWS!dXxAqHgHbtticGbE-cswI2ylVIt4A7Fn68LPFMyFtpJByLQtJocy5JF-Vf5Vzr_FbcWB1l7ve_2l9CdBTcqrSW8$" id="m_-2345382319246573863LPlnk689713" style="text-decoration:none" target="_blank"><img src="cid:ii_19306c695da6ecd8f704" width="15" height="15" border="0" title="YouTube" alt="YouTube" style="width: 15px; min-width: 15px; max-width: 15px; height: 15px; min-height: 15px; max-height: 15px; font-size: 12px;"></a></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div></div></blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Stefano</div>