<div dir="ltr"><div dir="ltr">On Wed, Mar 25, 2020 at 12:29 PM Alejandro Aragon - 3ME <<a href="mailto:A.M.Aragon@tudelft.nl">A.M.Aragon@tudelft.nl</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 style="word-wrap:break-word">
<div>Dear everyone,</div>
<div><br>
</div>
<div>I’m new to petsc4py and I’m trying to run a simple finite element code that uses DMPLEX to load a .msh file (created by Gmsh). In version 3.10 the code was working but I recently upgraded to 3.12 and I get the following error:</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">(.pydev) </span>
<span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,36,25)">➜ 
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(46,174,187)">testmodule</span><span style="font-variant-ligatures:no-common-ligatures">
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">git:(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,36,25)">e0bc9ae</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">)
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(159,160,28)">✗</span><span style="font-variant-ligatures:no-common-ligatures"> mpirun -np 2 python testmodule/__main__.py</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">{3: <testmodule.constitutive.elastic.Elastic object at 0x10feea520>}</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">{3: <testmodule.constitutive.elastic.Elastic object at 0x10d96d520>}</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">Traceback (most recent call last):</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  File "testmodule/__main__.py", line 32, in <module></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">    sys.exit(main(sys.argv))</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  File "testmodule/__main__.py", line 29, in main</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">    step.solve(m)</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  File "/Users/aaragon/Local/testmodule/testmodule/fem/analysis/static.py", line 33, in solve</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">    self.Amat.assemblyBegin(assembly=0)  # FINAL_ASSEMBLY = 0</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  File "PETSc/Mat.pyx", line 1039, in petsc4py.PETSc.Mat.assemblyBegin</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">petsc4py.PETSc.Error: error code 63</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[1] MatAssemblyBegin() line 5182 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/interface/matrix.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[1] MatAssemblyBegin_MPIAIJ() line 810 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/impls/aij/mpi/mpiaij.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[1] MatStashScatterBegin_Private() line 462 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/utils/matstash.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[1] MatStashScatterBegin_BTS() line 931 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/utils/matstash.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[1] PetscCommBuildTwoSidedFReq() line 555 in /private/tmp/pip-install-zurcx_6k/petsc/src/sys/utils/mpits.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[1] Argument out of range</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[1] toranks[0] 2 not in comm size 2</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">Traceback (most recent call last):</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  File "testmodule/__main__.py", line 32, in <module></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">    sys.exit(main(sys.argv))</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  File "testmodule/__main__.py", line 29, in main</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">    step.solve(m)</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  File "/Users/aaragon/Local/testmodule/testmodule/fem/analysis/static.py", line 33, in solve</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">    self.Amat.assemblyBegin(assembly=0)  # FINAL_ASSEMBLY = 0</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  File "PETSc/Mat.pyx", line 1039, in petsc4py.PETSc.Mat.assemblyBegin</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">petsc4py.PETSc.Error: error code 63</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[0] MatAssemblyBegin() line 5182 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/interface/matrix.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[0] MatAssemblyBegin_MPIAIJ() line 810 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/impls/aij/mpi/mpiaij.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[0] MatStashScatterBegin_Private() line 462 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/utils/matstash.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[0] MatStashScatterBegin_BTS() line 931 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/utils/matstash.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[0] PetscCommBuildTwoSidedFReq() line 555 in /private/tmp/pip-install-zurcx_6k/petsc/src/sys/utils/mpits.c</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[0] Argument out of range</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">[0] toranks[0] 2 not in comm size 2</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">-------------------------------------------------------</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">Primary job  terminated normally, but 1 process returned</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">a non-zero exit code.. Per user-direction, the job has been aborted.</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">-------------------------------------------------------</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">--------------------------------------------------------------------------</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">mpirun detected that one or more processes exited with non-zero status, thus causing</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">the job to be terminated. The first process to do so was:</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);min-height:25px;font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures"></span><br>
</div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  Process name: [[46994,1],0]</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">  Exit code:    1</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85);font-size:13px">
<span style="font-variant-ligatures:no-common-ligatures">--------------------------------------------------------------------------</span></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>This is in the call to assembly, which looks like this:</div>
<div><br>
</div>
<div>
<pre style="background-color:rgb(255,255,255);color:rgb(74,92,110);font-family:Menlo;font-size:15px"><span style="color:rgb(159,159,159)"># Begins assembling the matrix. This routine should be called after completing all calls to MatSetValues().<br></span><span style="color:rgb(218,139,209)">self</span>.Amat.assemblyBegin(<span style="color:rgb(255,140,96)">assembly</span>=<span style="color:rgb(93,151,196)">0</span>)  <span style="color:rgb(159,159,159)"># FINAL_ASSEMBLY = 0<br></span><span style="color:rgb(159,159,159)"># Completes assembling the matrix. This routine should be called after MatAssemblyBegin().<br></span><span style="color:rgb(218,139,209)">self</span>.Amat.assemblyEnd(<span style="color:rgb(255,140,96)">assembly</span>=<span style="color:rgb(93,151,196)">0</span>)<br></pre>
<div>I would appreciate if someone can give me some insight on what has changed in the new version of petsc4py (or petsc for that matter) to make this code work again.</div></div></div></blockquote><div><br></div><div>It looks like you have an inconsistent build, or a memory overwrite. Since you are in Python, I suspect the former. Can you build</div><div>PETSc from scratch and try this? Does it work in serial? Can you send a small code that reproduces this?</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 style="word-wrap:break-word">
<div>Best regards,</div>
<br>
<div>
<div style="color:rgb(0,0,0);font-family:Verdana;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
— Alejandro</div>
</div>
<br>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><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>