<div dir="ltr"><div dir="ltr">On Mon, Nov 7, 2022 at 9:27 AM Gong Ding via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear petsc developer,<br>
<br>
The petsc linear solver crash with following report<br></blockquote><div><br></div><div>It will make it much easier to debug if you can send your matrix. The easiest way to do this is to give</div><div>the options</div><div><br></div><div>  -ksp_view_mat binary -ksp_view_rhs binary</div><div><br></div><div>and send that binary file.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  [1]PETSC ERROR: <br>
------------------------------------------------------------------------<br>
[1]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, <br>
probably memory access out of range<br>
[1]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>
[1]PETSC ERROR: or see <a href="https://petsc.org/release/faq/#valgrind" rel="noreferrer" target="_blank">https://petsc.org/release/faq/#valgrind</a> and <br>
<a href="https://petsc.org/release/faq/" rel="noreferrer" target="_blank">https://petsc.org/release/faq/</a><br>
[1]PETSC ERROR: ---------------------  Stack Frames <br>
------------------------------------<br>
[1]PETSC ERROR: The line numbers in the error traceback are not always <br>
exact.<br>
[1]PETSC ERROR: #1 MatLUFactorNumeric_SeqAIJ_Inode() at <br>
/usr/local/petsc-3.18.0/src/mat/impls/aij/seq/inode.c:1259<br>
[1]PETSC ERROR: #2 MatLUFactorNumeric() at <br>
/usr/local/petsc-3.18.0/src/mat/interface/matrix.c:3200<br>
[1]PETSC ERROR: #3 PCSetUp_LU() at <br>
/usr/local/petsc-3.18.0/src/ksp/pc/impls/factor/lu/lu.c:120<br>
[1]PETSC ERROR: #4 PCSetUp() at <br>
/usr/local/petsc-3.18.0/src/ksp/pc/interface/precon.c:994<br>
[1]PETSC ERROR: #5 KSPSetUp() at <br>
/usr/local/petsc-3.18.0/src/ksp/ksp/interface/itfunc.c:406<br>
[1]PETSC ERROR: #6 PCSetUpOnBlocks_ASM() at <br>
/usr/local/petsc-3.18.0/src/ksp/pc/impls/asm/asm.c:417<br>
[1]PETSC ERROR: #7 PCSetUpOnBlocks() at <br>
/usr/local/petsc-3.18.0/src/ksp/pc/interface/precon.c:1027<br>
[1]PETSC ERROR: #8 KSPSetUpOnBlocks() at <br>
/usr/local/petsc-3.18.0/src/ksp/ksp/interface/itfunc.c:219<br>
[1]PETSC ERROR: #9 KSPSolve_Private() at <br>
/usr/local/petsc-3.18.0/src/ksp/ksp/interface/itfunc.c:826<br>
[1]PETSC ERROR: #10 KSPSolve() at <br>
/usr/local/petsc-3.18.0/src/ksp/ksp/interface/itfunc.c:1071<br>
[1]PETSC ERROR: #11 SNESSolve_NEWTONLS() at <br>
/usr/local/petsc-3.18.0/src/snes/impls/ls/ls.c:210<br>
[1]PETSC ERROR: #12 SNESSolve() at <br>
/usr/local/petsc-3.18.0/src/snes/interface/snes.c:4689<br>
<br>
The petsc is configured by<br>
<br>
export PETSC_ARCH=arch-linux2-float128-gcc<br>
export MPICH_CC=gcc<br>
export MPICH_CXX=g++<br>
export MPICH_F77=gfortran<br>
export MPICH_F90=gfortran<br>
python3 configure --with-precision=__float128 --download-f2cblaslapack=1 <br>
--with-debugging=yes --with-x=0 --with-pic=1 <br>
--with-mpi-dir=/usr/local/mpich-3.4.2/ COPTFLAGS="-O3 -mavx2" <br>
CXXOPTFLAGS="-O3 -mavx2" FOPTFLAGS="-O3 -mavx2" --force<br>
make<br>
<br>
and run with 8 mpi process.<br>
<br>
The linear solver is set as<br>
<br>
           ierr = KSPSetType (ksp, (char*) KSPBCGSL); assert(!ierr);<br>
<br>
           ierr = PCSetType (pc, (char*) PCASM); assert(!ierr);<br>
           ierr = set_petsc_option("-sub_ksp_type","preonly"); <br>
assert(!ierr);<br>
           ierr = set_petsc_option("-sub_pc_type","lu"); assert(!ierr);<br>
           ierr = set_petsc_option("-sub_pc_factor_reuse_fill","1"); <br>
assert(!ierr);<br>
           ierr = set_petsc_option("-sub_pc_factor_reuse_ordering","1"); <br>
assert(!ierr);<br>
           ierr = <br>
set_petsc_option("-sub_pc_factor_shift_type","NONZERO"); assert(!ierr);<br>
<br>
<br>
if remove set_petsc_option("-sub_pc_factor_reuse_ordering","1");<br>
<br>
it seems the crash will not happen. (Not fully tested)<br>
<br>
<br>
Hope this bug can be fixed.<br>
<br>
<br>
Gong Ding<br>
<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>