<div dir="ltr"><div>There was a relevant change in PETSc 3.8, you now need to call DMSetUp() after DMDACreate1d(), DMDACreate2d(), or DMDACreate3d().</div><div><br></div><a href="https://www.mcs.anl.gov/petsc/documentation/changes/38.html">https://www.mcs.anl.gov/petsc/documentation/changes/38.html</a><br>"Replace calls to DMDACreateXd() with DMDACreateXd(), [DMSetFromOptions()] DMSetUp()"</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Di., 3. März 2020 um 05:46 Uhr schrieb Richard Beare via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This is the error. Maybe nothing to do with the viewer part and something to do with changes in initialization? Something that has happened since version 3.6.3, perhaps.</div><div><br></div><div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div>[0]PETSC ERROR: Operation done in wrong order<br>[0]PETSC ERROR: You should call DMSetUp() first<br>[0]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Development GIT revision: v3.12.4-753-gbac983c101  GIT Date: 2020-02-18 15:05:54 +0000<br>[0]PETSC ERROR: simul_atrophy on a  named m3j007 by rbeare Tue Mar  3 14:12:22 2020<br>[0]PETSC ERROR: Configure options --with-cc=gcc-6 --with-cxx=g++-6 --with-fc=gfortran --download-mpich --download-fblaslapack --with-clangu<br>age=cxx --prefix=/opt/petsc/ --with-64-bit-indices=yes<br>[0]PETSC ERROR: #1 DMDASetFieldName() line 68 in /petsc/src/dm/impls/da/dacorn.c<br>[0]PETSC ERROR: #2 PetscAdLemTaras3D() line 68 in /simul-atrophy/src/includes/PetscAdLemTaras3D.hxx<br>terminate called after throwing an instance of 'std::runtime_error'<br>  what():  Error detected in C PETSc<br>SIGABRT: abort<br>PC=0x47282b m=0 sigcode=0<br><br>goroutine 1 [running, locked to thread]:<br>syscall.RawSyscall(0x3e, 0x5cbd, 0x6, 0x0, 0xc0001e3ef0, 0x48f422, 0x5cbd)<br>        /usr/local/go/1.11.1/src/syscall/asm_linux_amd64.s:78 +0x2b fp=0xc0001e3eb8 sp=0xc0001e3eb0 pc=0x47282b<br>syscall.Kill(0x5cbd, 0x6, 0x4377de, 0xc0001e3f20)<br>        /usr/local/go/1.11.1/src/syscall/zsyscall_linux_amd64.go:597 +0x4b fp=0xc0001e3f00 sp=0xc0001e3eb8 pc=0x46f1db<br><a href="http://github.com/sylabs/singularity/internal/app/starter.Master.func4()" target="_blank">github.com/sylabs/singularity/internal/app/starter.Master.func4()</a><br>        internal/app/starter/master_linux.go:158 +0x3e fp=0xc0001e3f38 sp=0xc0001e3f00 pc=0x8d51be<br><a href="http://github.com/sylabs/singularity/internal/pkg/util/mainthread.Execute.func1()" target="_blank">github.com/sylabs/singularity/internal/pkg/util/mainthread.Execute.func1()</a><br>        internal/pkg/util/mainthread/mainthread.go:20 +0x2f fp=0xc0001e3f60 sp=0xc0001e3f38 pc=0x87472f<br>main.main()<br>        cmd/starter/main_linux.go:102 +0x68 fp=0xc0001e3f98 sp=0xc0001e3f60 pc=0x8d59f8<br>runtime.main()<br>        /usr/local/go/1.11.1/src/runtime/proc.go:201 +0x207 fp=0xc0001e3fe0 sp=0xc0001e3f98 pc=0x42faa7<br>runtime.goexit()<br>        /usr/local/go/1.11.1/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc0001e3fe8 sp=0xc0001e3fe0 pc=0x45b4f1<br><br>goroutine 5 [syscall]:<br>os/signal.signal_recv(0xaa2620)<br>        /usr/local/go/1.11.1/src/runtime/sigqueue.go:139 +0x9c<br>os/signal.loop()<br>        /usr/local/go/1.11.1/src/os/signal/signal_unix.go:23 +0x22<br>created by os/signal.init.0<br>        /usr/local/go/1.11.1/src/os/signal/signal_unix.go:29 +0x41<br><br>goroutine 7 [chan receive]:<br><a href="http://github.com/sylabs/singularity/internal/pkg/util/mainthread.Execute(0xc0003e83a0)" target="_blank">github.com/sylabs/singularity/internal/pkg/util/mainthread.Execute(0xc0003e83a0)</a><br>        internal/pkg/util/mainthread/mainthread.go:23 +0xb4<br><a href="http://github.com/sylabs/singularity/internal/app/starter.Master(0x4" target="_blank">github.com/sylabs/singularity/internal/app/starter.Master(0x4</a>, 0xa, 0x2300, 0x5cca, 0xc000213e00)<br>        internal/app/starter/master_linux.go:157 +0x44e<br>main.startup()<br>        cmd/starter/main_linux.go:73 +0x563<br>created by main.main<br>        cmd/starter/main_linux.go:98 +0x3e<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 25 Feb 2020 at 03:04, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Sun, Feb 23, 2020 at 6:45 PM Richard Beare <<a href="mailto:richard.beare@monash.edu" target="_blank">richard.beare@monash.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-LC356">That's what I did (see below), but I got ordering errors (unfortunately deleted those logs too soon). I'll rerun if no one recognises what I've done wrong.<br><br>PetscViewer viewer1;</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-LC357">    ierr = <span>PetscViewerBinaryOpen</span>(PETSC_COMM_WORLD,fileName.<span>c_str</span>(),FILE_MODE_WRITE,&viewer1);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-LC358">    <span><span>//</span>ierr = PetscViewerSetFormat(viewer1,PETSC_VIEWER_BINARY_MATLAB);CHKERRQ(ierr);</span></td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-LC359">    ierr = <span>PetscViewerPushFormat</span>(viewer1,PETSC_VIEWER_BINARY_MATLAB);<span>CHKERRQ</span>(ierr);</td></tr></tbody></table></div></blockquote><div><br></div><div>This should not cause problems. However, is it possible that somewhere you are pushing a format</div><div>again and again without popping? This could exceed the stack size.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div>  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-LC361">    ierr = <span>PetscObjectSetName</span>((PetscObject)<span>mX</span>,<span><span>"</span>x<span>"</span></span>);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-LC362">    ierr = <span>PetscObjectSetName</span>((PetscObject)<span>mB</span>,<span><span>"</span>b<span>"</span></span>);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 24 Feb 2020 at 10:43, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Sun, Feb 23, 2020 at 6:25 PM Richard Beare via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br> </div><div>Hi,</div><div>The following code gives a deprecation warning. What is the correct way of updating the use of ViewerSetFormat to ViewerPushFormat (which I presume is the preferred replacement). My first attempt gave errors concerning ordering.</div></div></blockquote><div><br></div><div>You can't just change SetFormat to PushFormat here?</div><div><br></div><div>  Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thanks</div><div><br></div><div dir="ltr">PetscViewer viewer1;<table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC357">   ierr = <span>PetscViewerBinaryOpen</span>(PETSC_COMM_WORLD,fileName.<span>c_str</span>(),FILE_MODE_WRITE,&viewer1);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC358">    ierr = <span>PetscViewerSetFormat</span>(viewer1,PETSC_VIEWER_BINARY_MATLAB);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC359">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC360">    ierr = <span>PetscObjectSetName</span>((PetscObject)<span>mX</span>,<span><span>"</span>x<span>"</span></span>);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC361">    ierr = <span>PetscObjectSetName</span>((PetscObject)<span>mB</span>,<span><span>"</span>b<span>"</span></span>);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC362">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC363">    ierr = <span>VecView</span>(<span>mX</span>,viewer1);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC364">    ierr = <span>VecView</span>(<span>mB</span>,viewer1);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_-8497691908328400885gmail-m_8275193764189800382gmail-m_723507817431856979gmail-m_-8725774226813599504gmail-m_1427995789408475818gmail-LC365">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><br>-- <br><div dir="ltr"><div dir="ltr"><div>--<br>A/Prof Richard Beare<br>Imaging and Bioinformatics, Peninsula Clinical School</div><div><span><div><span><a href="http://orcid.org/0000-0002-7530-5664" target="_blank">orcid.org/0000-0002-7530-5664</a></span></div></span></div><div><a href="mailto:Richard.Beare@monash.edu" target="_blank">Richard.Beare@monash.edu</a><br>+61 3 9788 1724<br><span><br></span></div><div><br></div><div><span></span><br>Geospatial Research: <a href="https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis" target="_blank">https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis</a></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div>--<br>A/Prof Richard Beare<br>Imaging and Bioinformatics, Peninsula Clinical School</div><div><span><div><span><a href="http://orcid.org/0000-0002-7530-5664" target="_blank">orcid.org/0000-0002-7530-5664</a></span></div></span></div><div><a href="mailto:Richard.Beare@monash.edu" target="_blank">Richard.Beare@monash.edu</a><br>+61 3 9788 1724<br><span><br></span></div><div><br></div><div><span></span><br>Geospatial Research: <a href="https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis" target="_blank">https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis</a></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div>--<br>A/Prof Richard Beare<br>Imaging and Bioinformatics, Peninsula Clinical School</div><div><span><div><span><a href="http://orcid.org/0000-0002-7530-5664" target="_blank">orcid.org/0000-0002-7530-5664</a></span></div></span></div><div><a href="mailto:Richard.Beare@monash.edu" target="_blank">Richard.Beare@monash.edu</a><br>+61 3 9788 1724<br><span><br></span></div><div><br></div><div><span></span><br>Geospatial Research: <a href="https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis" target="_blank">https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis</a></div></div></div>
</blockquote></div>