[petsc-users] petsc crash with float128
Gong Ding
gongding at cn.cogenda.com
Mon Nov 7 08:25:54 CST 2022
Dear petsc developer,
The petsc linear solver crash with following report
[1]PETSC ERROR:
------------------------------------------------------------------------
[1]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
probably memory access out of range
[1]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[1]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and
https://petsc.org/release/faq/
[1]PETSC ERROR: --------------------- Stack Frames
------------------------------------
[1]PETSC ERROR: The line numbers in the error traceback are not always
exact.
[1]PETSC ERROR: #1 MatLUFactorNumeric_SeqAIJ_Inode() at
/usr/local/petsc-3.18.0/src/mat/impls/aij/seq/inode.c:1259
[1]PETSC ERROR: #2 MatLUFactorNumeric() at
/usr/local/petsc-3.18.0/src/mat/interface/matrix.c:3200
[1]PETSC ERROR: #3 PCSetUp_LU() at
/usr/local/petsc-3.18.0/src/ksp/pc/impls/factor/lu/lu.c:120
[1]PETSC ERROR: #4 PCSetUp() at
/usr/local/petsc-3.18.0/src/ksp/pc/interface/precon.c:994
[1]PETSC ERROR: #5 KSPSetUp() at
/usr/local/petsc-3.18.0/src/ksp/ksp/interface/itfunc.c:406
[1]PETSC ERROR: #6 PCSetUpOnBlocks_ASM() at
/usr/local/petsc-3.18.0/src/ksp/pc/impls/asm/asm.c:417
[1]PETSC ERROR: #7 PCSetUpOnBlocks() at
/usr/local/petsc-3.18.0/src/ksp/pc/interface/precon.c:1027
[1]PETSC ERROR: #8 KSPSetUpOnBlocks() at
/usr/local/petsc-3.18.0/src/ksp/ksp/interface/itfunc.c:219
[1]PETSC ERROR: #9 KSPSolve_Private() at
/usr/local/petsc-3.18.0/src/ksp/ksp/interface/itfunc.c:826
[1]PETSC ERROR: #10 KSPSolve() at
/usr/local/petsc-3.18.0/src/ksp/ksp/interface/itfunc.c:1071
[1]PETSC ERROR: #11 SNESSolve_NEWTONLS() at
/usr/local/petsc-3.18.0/src/snes/impls/ls/ls.c:210
[1]PETSC ERROR: #12 SNESSolve() at
/usr/local/petsc-3.18.0/src/snes/interface/snes.c:4689
The petsc is configured by
export PETSC_ARCH=arch-linux2-float128-gcc
export MPICH_CC=gcc
export MPICH_CXX=g++
export MPICH_F77=gfortran
export MPICH_F90=gfortran
python3 configure --with-precision=__float128 --download-f2cblaslapack=1
--with-debugging=yes --with-x=0 --with-pic=1
--with-mpi-dir=/usr/local/mpich-3.4.2/ COPTFLAGS="-O3 -mavx2"
CXXOPTFLAGS="-O3 -mavx2" FOPTFLAGS="-O3 -mavx2" --force
make
and run with 8 mpi process.
The linear solver is set as
ierr = KSPSetType (ksp, (char*) KSPBCGSL); assert(!ierr);
ierr = PCSetType (pc, (char*) PCASM); assert(!ierr);
ierr = set_petsc_option("-sub_ksp_type","preonly");
assert(!ierr);
ierr = set_petsc_option("-sub_pc_type","lu"); assert(!ierr);
ierr = set_petsc_option("-sub_pc_factor_reuse_fill","1");
assert(!ierr);
ierr = set_petsc_option("-sub_pc_factor_reuse_ordering","1");
assert(!ierr);
ierr =
set_petsc_option("-sub_pc_factor_shift_type","NONZERO"); assert(!ierr);
if remove set_petsc_option("-sub_pc_factor_reuse_ordering","1");
it seems the crash will not happen. (Not fully tested)
Hope this bug can be fixed.
Gong Ding
More information about the petsc-users
mailing list