[petsc-users] petsc crash with float128

Matthew Knepley knepley at gmail.com
Mon Nov 7 08:35:46 CST 2022


On Mon, Nov 7, 2022 at 9:27 AM Gong Ding via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Dear petsc developer,
>
> The petsc linear solver crash with following report
>

It will make it much easier to debug if you can send your matrix. The
easiest way to do this is to give
the options

  -ksp_view_mat binary -ksp_view_rhs binary

and send that binary file.

  Thanks,

     Matt


>   [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
>
>
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221107/ed9bcc8d/attachment.html>


More information about the petsc-users mailing list