[petsc-users] upgrading to 3.22.4

Sanjay Govindjee s_g at berkeley.edu
Thu Mar 20 23:42:41 CDT 2025


I take on item back...I was a failure at using the debugger.  Here is 
the backtrace.  MatCreate seems to have valid data :/

    * thread #1, queue = 'com.apple.main-thread', stop reason = signal
    SIGSTOP
       * frame #0: 0x00007fff69d92746
    libsystem_kernel.dylib`__semwait_signal + 10
         frame #1: 0x00007fff69d15eea libsystem_c.dylib`nanosleep + 196
         frame #2: 0x00007fff69d15d52 libsystem_c.dylib`sleep + 41
         frame #3: 0x0000000108d47a6c
    libpetsc.3.22.dylib`PetscSleep(s=10) at psleep.c:48:5
         frame #4: 0x00000001089946a1
    libpetsc.3.22.dylib`PetscAttachDebugger at adebug.c:458:5
         frame #5: 0x000000010d607508
    libpetsc.3.22.dylib`PetscAttachDebuggerErrorHandler(comm=0x000000010f7ffe48,
    line=101, fun="matcreate_",
    file="/Users/sg/petsc-3.22.4/gnug/src/mat/utils/ftn-auto/gcreatef.c",
    num=62, p=PETSC_ERROR_INITIAL, mess="Cannot create PETSC_NULL_XXX
    object", ctx=0x0000000000000000) at adebug.c:522:9
         frame #6: 0x000000010d607af0
    libpetsc.3.22.dylib`PetscError(comm=0x000000010f7ffe48, line=101,
    func="matcreate_",
    file="/Users/sg/petsc-3.22.4/gnug/src/mat/utils/ftn-auto/gcreatef.c",
    n=62, p=PETSC_ERROR_INITIAL, mess="Cannot create PETSC_NULL_XXX
    object") at err.c:406:15
         frame #7: 0x00000001095f8e9a
    libpetsc.3.22.dylib`matcreate_(comm=0x000000010d8e6174,
    A=0x0000000107ea08c8, ierr=0x00007ffee829a348) at gcreatef.c:101:1
         frame #8: 0x0000000107995d04 feap`usolve_ at usolve.F:134:72
         frame #9: 0x0000000107b08b12 feap`presol_ at presol.f:181:72
         frame #10: 0x0000000107a91d18 feap`pmacr1_ at pmacr1.f:554:72
         frame #11: 0x0000000107a8c4ed feap`pmacr_ at pmacr.f:614:72
         frame #12: 0x0000000107a30eaf feap`pcontr_ at pcontr.f:1375:72
         frame #13: 0x0000000107dd4b3e feap`main at feap87.f:173:72
         frame #14: 0x00007fff69c4ecc9 libdyld.dylib`start + 1

On 3/20/25 9:37 PM, Sanjay Govindjee wrote:
> I am trying to upgrade my code to PETSc 3.22.4 (the code was last 
> updated to 3.19.4 or perhaps 3.18.1, I've lost track). I've been using 
> this code with PETSc for over 20 years.
>
> To get my code to compile and link during this update, I only need to 
> make two changes; one was to use PetscViewerPushFormat instead of 
> PetscViewerSetFormat and the other was to use PETSC_NULL_INTEGER_ARRAY 
> in a spot or two.
>
> When I run the code however, I am getting an error very early on 
> during a call to MatCreate near the beginning of the code.  The screen 
> output says:
>
>     [3]PETSC ERROR: matcreate_() at
>     /Users/sg/petsc-3.22.4/gnug/src/mat/utils/ftn-auto/gcreatef.c:101
>     Cannot create PETSC_NULL_XXX object
>     [0]PETSC ERROR: matcreate_() at
>     /Users/sg/petsc-3.22.4/gnug/src/mat/utils/ftn-auto/gcreatef.c:101
>     Cannot create PETSC_NULL_XXX object
>     [1]PETSC ERROR: matcreate_() at
>     /Users/sg/petsc-3.22.4/gnug/src/mat/utils/ftn-auto/gcreatef.c:101
>     Cannot create PETSC_NULL_XXX object
>     [2]PETSC ERROR: matcreate_() at
>     /Users/sg/petsc-3.22.4/gnug/src/mat/utils/ftn-auto/gcreatef.c:101
>     Cannot create PETSC_NULL_XXX object
>
> I have a 4 processor run going.  I am running with 
> -on_error_attach_debugger but the debugger is giving me cryptic (at 
> least to me) output (the same for all 4 processes modulo the PID).  
> Stack traces seem to be unavailable :(
>
>     lldb  -p 71963
>     (lldb) process attach --pid 71963
>     Process 71963 stopped
>     * thread #1, queue = 'com.apple.main-thread', stop reason = signal
>     SIGSTOP
>         frame #0: 0x00007fff69d92746
>     libsystem_kernel.dylib`__semwait_signal + 10
>     libsystem_kernel.dylib`__semwait_signal:
>     ->  0x7fff69d92746 <+10>: jae 0x7fff69d92750            ; <+20>
>         0x7fff69d92748 <+12>: movq   %rax, %rdi
>         0x7fff69d9274b <+15>: jmp    0x7fff69d9121d ; cerror
>         0x7fff69d92750 <+20>: retq
>     Target 0: (feap) stopped.
>
>     Executable module set to "/Users/sg/Feap/ver87/parfeap/feap".
>     Architecture set to: x86_64h-apple-macosx-.
>
> Does anyone have any hints as to what may be going on?  Note the 
> program starts normally and i can do stuff with the interactive 
> interface for the code -- even plotting the mesh etc. so I believe the 
> input data has been read in correctly.  The crash only occurs when I 
> initiate the formation of the matrix.
>
> I am attaching the 
> /Users/sg/petsc-3.22.4/gnug/src/mat/utils/ftn-auto/gcreatef.c file in 
> case that offers some insight.
>
> Note, I have been
> -sanjay
> -- 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250320/096cc656/attachment-0001.html>


More information about the petsc-users mailing list