[petsc-users] ex19: Segmentation Violation when run with MUMPS on MacOS (arm64)

zeyu xia xiazeyu01 at gmail.com
Sat Mar 30 02:46:20 CDT 2024


Hi! Thanks for your reply.

There still exist some problems, as seen in the files 'configure.log',
'make check3.txt', and 'debug.txt' in the attachment. Particularly, the
file 'debug.txt' contains the output of bt command of lldb.

Thanks for your attention.

Best regards,
Zeyu Xia


Satish Balay <balay at mcs.anl.gov> 于2024年3月30日周六 02:52写道:

> I'm able to reproduce this error on a slightly older xcode [but don't know
> why this issue comes up]
>
> > Apple clang version 15.0.0 (clang-1500.1.0.2.5)
>
> Can you try using the additional configure options (along with
> LDFLAGS=-Wl,-ld_classic)  and see if it works?
>
> COPTFLAGS=-O0 FOPTFLAGS=-O0
>
> Satish
>
> On Fri, 29 Mar 2024, zeyu xia wrote:
>
> > Hi! I am grateful for your prompt response.
> >
> > I follow your suggestions, and however, it still does not work. For the
> > related information please find the files 'make check2.txt' and
> > 'configure.log' in the attachment.
> >
> > If possible, please do me a favor again. Thanks for your patience.
> >
> > Best wishes,
> > Zeyu Xia
> >
> >
> > Satish Balay <balay at mcs.anl.gov> 于2024年3月29日周五 23:48写道:
> >
> > > Could you:
> > >
> > > - reinstall brew after the xcode upgrade (not just update)
> > >
> https://urldefense.us/v3/__https://petsc.org/main/install/install/*installing-on-macos__;Iw!!G_uCfscf7eWS!dGItos-D58VSJn4kOlKy2TEX-PWhflbWfNuM0zqhEXbGniD5S13iWCxgBmg9wYk4OrSwaP6jjzANIHN1ZHATKXE$
> > > - not use --LDFLAGS=-Wl,-ld_classic
> > >
> > > And see if the problem persists?
> > >
> > > Satish
> > >
> > > On Fri, 29 Mar 2024, zeyu xia wrote:
> > >
> > > > Dear PETSc team:
> > > >
> > > >         Recently I installed firedrake on MacOS (arm64) with the
> latest
> > > > Xcode, and there seems some error with mumps. I ran two times of the
> > > > command `make check`. The first time it just output wrong results,
> and
> > > the
> > > > second time it raised an error with Segmentation Violation. Please
> see
> > > the
> > > > files “make check.txt” and “configure.log” in the attachment.
> > > >
> > > >         I will certainly be happy and grateful if you can take some
> time
> > > to
> > > > deal with this problem. Thanks for your patience.
> > > >
> > > > Best wishes,
> > > > Zeyu Xia
> > > >
> > >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240330/83a25a22/attachment-0003.html>
-------------- next part --------------
xiazeyu at xiazeyudeMacBook-Pro petsc % make check
Running PETSc check examples to verify correct installation
Using PETSC_DIR=/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc and PETSC_ARCH=default
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE
3c3
<     0 KSP Residual norm 0.235858
---
>     0 KSP Residual norm 0.0348072
5,9c5,30
<   1 SNES Function norm 6.81968e-05
<     0 KSP Residual norm 2.30906e-05
<     1 KSP Residual norm < 1.e-11
<   2 SNES Function norm < 1.e-11
< Number of SNES iterations = 2
---
>   1 SNES Function norm 0.211774
> [0]PETSC ERROR: ------------------------------------------------------------------------
> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
> [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
> [0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/
> [0]PETSC ERROR: ---------------------  Stack Frames ------------------------------------
> [0]PETSC ERROR: The line numbers in the error traceback are not always exact.
> [0]PETSC ERROR: #1 dmumps_c()
> [0]PETSC ERROR: #2 MatFactorNumeric_MUMPS() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/mat/impls/aij/mpi/mumps/mumps.c:2012
> [0]PETSC ERROR: #3 MatLUFactorNumeric() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/mat/interface/matrix.c:3253
> [0]PETSC ERROR: #4 PCSetUp_LU() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/pc/impls/factor/lu/lu.c:121
> [0]PETSC ERROR: #5 PCSetUp() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/pc/interface/precon.c:1079
> [0]PETSC ERROR: #6 KSPSetUp() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/ksp/interface/itfunc.c:415
> [0]PETSC ERROR: #7 KSPSolve_Private() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/ksp/interface/itfunc.c:831
> [0]PETSC ERROR: #8 KSPSolve() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/ksp/interface/itfunc.c:1078
> [0]PETSC ERROR: #9 PCApply_FieldSplit_Schur() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c:1187
> [0]PETSC ERROR: #10 PCApply() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/pc/interface/precon.c:497
> [0]PETSC ERROR: #11 KSP_PCApply() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/include/petsc/private/kspimpl.h:409
> [0]PETSC ERROR: #12 KSPInitialResidual() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/ksp/interface/itres.c:64
> [0]PETSC ERROR: #13 KSPSolve_GMRES() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/ksp/impls/gmres/gmres.c:226
> [0]PETSC ERROR: #14 KSPSolve_Private() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/ksp/interface/itfunc.c:905
> [0]PETSC ERROR: #15 KSPSolve() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/ksp/ksp/interface/itfunc.c:1078
> [0]PETSC ERROR: #16 SNESSolve_NEWTONLS() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/snes/impls/ls/ls.c:220
> [0]PETSC ERROR: #17 SNESSolve() at /Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/snes/interface/snes.c:4738
> [0]PETSC ERROR: #18 main() at ex19.c:152
> application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/snes/tutorials
Possible problem with ex19 running with MUMPS, diffs above
=========================================
C/C++ example src/snes/tutorials/ex19 run successfully with SuiteSparse
C/C++ example src/snes/tutorials/ex19 run successfully with SuperLU_DIST
C/C++ example src/vec/vec/tests/ex47 run successfully with HDF5
Running SLEPc check examples to verify correct installation
Using SLEPC_DIR=/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/default/externalpackages/git.slepc, PETSC_DIR=/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc, and PETSC_ARCH=default
C/C++ example src/eps/tests/test10 run successfully with 1 MPI process
C/C++ example src/eps/tests/test10 run successfully with 2 MPI processes
Completed SLEPc check examples
Completed PETSc check examples
Error while running make check
make[1]: *** [check] Error 1
make: *** [check] Error 2
xiazeyu at xiazeyudeMacBook-Pro petsc % make check                               
Running PETSc check examples to verify correct installation
Using PETSC_DIR=/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc and PETSC_ARCH=default
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE
3c3
<     0 KSP Residual norm 0.235858
---
>     0 KSP Residual norm 0.0348072
5,6c5,6
<   1 SNES Function norm 6.81968e-05
<     0 KSP Residual norm 2.30906e-05
---
>   1 SNES Function norm 0.211774
>     0 KSP Residual norm 1.45097e-06
8,9c8,19
<   2 SNES Function norm < 1.e-11
< Number of SNES iterations = 2
---
>   2 SNES Function norm 0.211774
> 
> ===================================================================================
> =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
> =   PID 72939 RUNNING AT xiazeyudeMacBook-Pro.local
> =   EXIT CODE: 6
> =   CLEANING UP REMAINING PROCESSES
> =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
> ===================================================================================
> YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Terminated: 15 (signal 15)
> This typically refers to a problem with your application.
> Please see the FAQ page for debugging suggestions
/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/snes/tutorials
Possible problem with ex19 running with MUMPS, diffs above
=========================================
C/C++ example src/snes/tutorials/ex19 run successfully with SuiteSparse
C/C++ example src/snes/tutorials/ex19 run successfully with SuperLU_DIST
C/C++ example src/vec/vec/tests/ex47 run successfully with HDF5
Running SLEPc check examples to verify correct installation
Using SLEPC_DIR=/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/default/externalpackages/git.slepc, PETSC_DIR=/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc, and PETSC_ARCH=default
C/C++ example src/eps/tests/test10 run successfully with 1 MPI process
C/C++ example src/eps/tests/test10 run successfully with 2 MPI processes
Completed SLEPc check examples
Completed PETSc check examples
Error while running make check
make[1]: *** [check] Error 1
make: *** [check] Error 2
xiazeyu at xiazeyudeMacBook-Pro petsc % 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.tar.gz
Type: application/x-gzip
Size: 2576494 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240330/83a25a22/attachment-0003.gz>
-------------- next part --------------
xiazeyu at xiazeyudeMacBook-Pro tutorials % ../../../default/bin/mpiexec -n 2 ./ex19 -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short  -fieldsplit_0_pc_factor_mat_solver_type mumps -fieldsplit_1_pc_factor_mat_solver_type mumps -start_in_debugger
lid velocity = 0.0625, prandtl # = 1., grashof # = 1.
  0 SNES Function norm 0.239155
    0 KSP Residual norm 0.0348072
    1 KSP Residual norm < 1.e-11
  1 SNES Function norm 0.211774
    0 KSP Residual norm 1.45097e-06
    1 KSP Residual norm < 1.e-11
  2 SNES Function norm 0.211774
    0 KSP Residual norm < 1.e-11


Last login: Sat Mar 30 15:34:10 on ttys001
lldb  -p 71671                                                                  
xiazeyu at xiazeyudeMacBook-Pro ~ % lldb  -p 71671 
(lldb) process attach --pid 71671
Process 71671 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x0000000197e657e8 libsystem_kernel.dylib`__semwait_signal + 8
libsystem_kernel.dylib`:
->  0x197e657e8 <+8>:  b.lo   0x197e65808               ; <+40>
    0x197e657ec <+12>: pacibsp 
    0x197e657f0 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x197e657f4 <+20>: mov    x29, sp
Target 0: (ex19) stopped.
Executable module set to "/Users/xiazeyu/opt/firedrake/firedrake-real-int32-debug/src/petsc/src/snes/tutorials/ex19".
Architecture set to: arm64-apple-macosx-.
(lldb) c
Process 71671 resuming
Process 71671 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1bae4058)
    frame #0: 0x000000010c380b5c libpetsc.3.020.dylib`dmumps_dr_assemble_from_bufrec.5 at dsol_distrhs.F:237:20
   234 	          ENDIF
   235 	          IRHSCOMP=POSINRHSCOMP_FWD(BUFRECI(I))
   236 	          BUFRECI_ARG(I)=IRHSCOMP
-> 237 	          IF ( .NOT. TOUCHED(IRHSCOMP) ) THEN
   238 	            IFIRSTNOTTOUCHED=min(IFIRSTNOTTOUCHED,I)
   239 	            ILASTNOTTOUCHED=max(ILASTNOTTOUCHED,I)
   240 	          ENDIF
Target 0: (ex19) stopped.
warning: This version of LLDB has no plugin for the language "fortran90". Inspection of frame variables will be limited.
(lldb) bt 
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1bae4058)
  * frame #0: 0x000000010c380b5c libpetsc.3.020.dylib`dmumps_dr_assemble_from_bufrec.5 at dsol_distrhs.F:237:20
    frame #1: 0x000000010c3810d0 libpetsc.3.020.dylib`dmumps_dr_try_recv.6 at dsol_distrhs.F:215:72
    frame #2: 0x000000010c37f71c libpetsc.3.020.dylib`dmumps_scatter_dist_rhs_ at dsol_distrhs.F:173:72
    frame #3: 0x000000010c371678 libpetsc.3.020.dylib`dmumps_solve_driver_ at dsol_driver.F:3677:72
    frame #4: 0x000000010c41c5e4 libpetsc.3.020.dylib`dmumps_ at dmumps_driver.F:2035:72
    frame #5: 0x000000010c420e68 libpetsc.3.020.dylib`dmumps_f77_ at dmumps_f77.F:291:72
    frame #6: 0x000000010c414514 libpetsc.3.020.dylib`dmumps_c(mumps_par=0x000000012a9df050) at mumps_c.c:485:5
    frame #7: 0x0000000108e44294 libpetsc.3.020.dylib`MatSolve_MUMPS(A=0x000000012a9dce50, b=0x000000012a9d5c50, x=0x000000012b182250) at mumps.c:1494:3
    frame #8: 0x00000001098a6430 libpetsc.3.020.dylib`MatSolve(mat=0x000000012a9dce50, b=0x000000012a9d5c50, x=0x000000012b182250) at matrix.c:3632:10
    frame #9: 0x000000010b32f7e8 libpetsc.3.020.dylib`PCApply_LU(pc=0x000000012a8c9a50, x=0x000000012a9d5c50, y=0x000000012b182250) at lu.c:169:5
    frame #10: 0x000000010b756aa4 libpetsc.3.020.dylib`PCApply(pc=0x000000012a8c9a50, x=0x000000012a9d5c50, y=0x000000012b182250) at precon.c:497:3
    frame #11: 0x000000010b7666cc libpetsc.3.020.dylib`PCApplyBAorAB(pc=0x000000012a8c9a50, side=PC_LEFT, x=0x000000012a9d7850, y=0x000000012b182250, work=0x000000012a9d5c50) at precon.c:771:7
    frame #12: 0x000000010ae07d94 libpetsc.3.020.dylib`KSP_PCApplyBAorAB(ksp=0x000000012b049650, x=0x000000012a9d7850, y=0x000000012b182250, w=0x000000012a9d5c50) at kspimpl.h:469:5
    frame #13: 0x000000010ae04c44 libpetsc.3.020.dylib`KSPGMRESCycle(itcount=0x000000016d8e598c, ksp=0x000000012b049650) at gmres.c:146:5
    frame #14: 0x000000010ae00958 libpetsc.3.020.dylib`KSPSolve_GMRES(ksp=0x000000012b049650) at gmres.c:227:5
    frame #15: 0x000000010af3adf0 libpetsc.3.020.dylib`KSPSolve_Private(ksp=0x000000012b049650, b=0x000000012c813c50, x=0x000000012c818850) at itfunc.c:905:3
    frame #16: 0x000000010af382ec libpetsc.3.020.dylib`KSPSolve(ksp=0x000000012b049650, b=0x000000012c813c50, x=0x000000012c818850) at itfunc.c:1078:3
    frame #17: 0x000000010b382988 libpetsc.3.020.dylib`PCApply_FieldSplit_Schur(pc=0x000000012a8ac250, x=0x000000012b827250, y=0x000000012b832050) at fieldsplit.c:1205:7
    frame #18: 0x000000010b756aa4 libpetsc.3.020.dylib`PCApply(pc=0x000000012a8ac250, x=0x000000012b827250, y=0x000000012b832050) at precon.c:497:3
    frame #19: 0x000000010b7666cc libpetsc.3.020.dylib`PCApplyBAorAB(pc=0x000000012a8ac250, side=PC_LEFT, x=0x000000012b82dc50, y=0x000000012b832050, work=0x000000012b827250) at precon.c:771:7
    frame #20: 0x000000010ae07d94 libpetsc.3.020.dylib`KSP_PCApplyBAorAB(ksp=0x000000012a827c50, x=0x000000012b82dc50, y=0x000000012b832050, w=0x000000012b827250) at kspimpl.h:469:5
    frame #21: 0x000000010ae04c44 libpetsc.3.020.dylib`KSPGMRESCycle(itcount=0x000000016d8e7bfc, ksp=0x000000012a827c50) at gmres.c:146:5
    frame #22: 0x000000010ae00958 libpetsc.3.020.dylib`KSPSolve_GMRES(ksp=0x000000012a827c50) at gmres.c:227:5
    frame #23: 0x000000010af3adf0 libpetsc.3.020.dylib`KSPSolve_Private(ksp=0x000000012a827c50, b=0x000000012a8d3a50, x=0x000000012a8ce650) at itfunc.c:905:3
    frame #24: 0x000000010af382ec libpetsc.3.020.dylib`KSPSolve(ksp=0x000000012a827c50, b=0x000000012a8d3a50, x=0x000000012a8ce650) at itfunc.c:1078:3
    frame #25: 0x000000010b7f2508 libpetsc.3.020.dylib`SNESSolve_NEWTONLS(snes=0x000000012d883050) at ls.c:220:5
    frame #26: 0x000000010b99d734 libpetsc.3.020.dylib`SNESSolve(snes=0x000000012d883050, b=0x0000000000000000, x=0x000000012b059450) at snes.c:4738:5
    frame #27: 0x000000010251a728 ex19`main(argc=22, argv=0x000000016d8eb510) at ex19.c:152:3
    frame #28: 0x0000000197b1a0e0 dyld`start + 2360
(lldb) 


More information about the petsc-users mailing list