<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    I take on item back...I was a failure at using the debugger.  Here
    is the backtrace.  MatCreate seems to have valid data :/<br>
    <blockquote>* thread #1, queue = 'com.apple.main-thread', stop
      reason = signal SIGSTOP<br>
        * frame #0: 0x00007fff69d92746
      libsystem_kernel.dylib`__semwait_signal + 10<br>
          frame #1: 0x00007fff69d15eea libsystem_c.dylib`nanosleep + 196<br>
          frame #2: 0x00007fff69d15d52 libsystem_c.dylib`sleep + 41<br>
          frame #3: 0x0000000108d47a6c
      libpetsc.3.22.dylib`PetscSleep(s=10) at psleep.c:48:5<br>
          frame #4: 0x00000001089946a1
      libpetsc.3.22.dylib`PetscAttachDebugger at adebug.c:458:5<br>
          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<br>
          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<br>
          frame #7: 0x00000001095f8e9a
      libpetsc.3.22.dylib`matcreate_(comm=0x000000010d8e6174,
      A=0x0000000107ea08c8, ierr=0x00007ffee829a348) at gcreatef.c:101:1<br>
          frame #8: 0x0000000107995d04 feap`usolve_ at usolve.F:134:72<br>
          frame #9: 0x0000000107b08b12 feap`presol_ at presol.f:181:72<br>
          frame #10: 0x0000000107a91d18 feap`pmacr1_ at pmacr1.f:554:72<br>
          frame #11: 0x0000000107a8c4ed feap`pmacr_ at pmacr.f:614:72<br>
          frame #12: 0x0000000107a30eaf feap`pcontr_ at pcontr.f:1375:72<br>
          frame #13: 0x0000000107dd4b3e feap`main at feap87.f:173:72<br>
          frame #14: 0x00007fff69c4ecc9 libdyld.dylib`start + 1<br>
    </blockquote>
    <pre class="moz-signature" cols="72">
</pre>
    <div class="moz-cite-prefix">On 3/20/25 9:37 PM, Sanjay Govindjee
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:469fd2e4-480f-4f92-b50f-ce50b4d66375@berkeley.edu">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      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.<br>
      <br>
      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.<br>
      <br>
      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:<br>
      <blockquote>[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<br>
        [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<br>
        [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<br>
        [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<br>
      </blockquote>
      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 :(<br>
      <blockquote>lldb  -p 71963 <br>
        (lldb) process attach --pid 71963<br>
        Process 71963 stopped<br>
        * thread #1, queue = 'com.apple.main-thread', stop reason =
        signal SIGSTOP<br>
            frame #0: 0x00007fff69d92746
        libsystem_kernel.dylib`__semwait_signal + 10<br>
        libsystem_kernel.dylib`__semwait_signal:<br>
        ->  0x7fff69d92746 <+10>: jae   
        0x7fff69d92750            ; <+20><br>
            0x7fff69d92748 <+12>: movq   %rax, %rdi<br>
            0x7fff69d9274b <+15>: jmp    0x7fff69d9121d           
        ; cerror<br>
            0x7fff69d92750 <+20>: retq   <br>
        Target 0: (feap) stopped.<br>
        <br>
        Executable module set to "/Users/sg/Feap/ver87/parfeap/feap".<br>
        Architecture set to: x86_64h-apple-macosx-.<br>
      </blockquote>
      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.<br>
      <br>
      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.<br>
      <br>
      Note, I have been <br>
      -sanjay<br>
      <pre class="moz-signature" cols="72">-- 
</pre>
    </blockquote>
    <br>
  </body>
</html>