<div dir="ltr"><div dir="ltr">On Fri, Mar 27, 2020 at 10:09 AM Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</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">On Fri, Mar 27, 2020 at 3:31 AM Alejandro Aragon - 3ME <<a href="mailto:A.M.Aragon@tudelft.nl" target="_blank">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>
<div style="word-wrap:break-word">
<div>Dear Matthew,</div>
<div><br>
</div>
<div>Thanks for your email. I have attached the python code that reproduces the following error in my computer:</div></div></div></blockquote><div><br></div><div>I think I see the problem. There were changes in DM in order to support fields which only occupy part of the domain.</div><div>Now you need to tell the DM about the fields before it builds a Section. I think in your code, you only need</div><div><br></div><div>  f = PetscContainer()</div><div>  f.setName("potential")</div><div>  dm.addField(field = f)</div></div></div></blockquote><div><br></div><div>So Nicolas Barral found a much better way to do this. You only need</div><div><br></div><div>  dm.setNumFields(1)</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"><div class="gmail_quote"><div>from <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html</a> before the createSection().</div><div>My Python may not be correct since I never use that interface.</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><div style="word-wrap:break-word">
<div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>(.pydev) </span><span style="color:rgb(255,99,85)">➜ 
</span><span style="color:rgb(93,253,255)">dmplex_fem</span><span> mpirun -np 2  python Cpp2Python.py</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>Traceback (most recent call last):</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  File "Cpp2Python.py", line 383, in <module></span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>    sys.exit(Cpp2Python())</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  File "Cpp2Python.py", line 357, in Cpp2Python</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>    dm = createfields(dm)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  File "Cpp2Python.py", line 62, in createfields</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>    section.setFieldName(0, "u")</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  File "PETSc/Section.pyx", line 59, in petsc4py.PETSc.Section.setFieldName</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>petsc4py.PETSc.Error: error code 63</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>[1] PetscSectionSetFieldName() line 427 in /private/tmp/pip-install-laf1l3br/petsc/src/vec/is/section/interface/section.c</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>[1] Argument out of range</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>[1] Section field 0 should be in [0, 0)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>Traceback (most recent call last):</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  File "Cpp2Python.py", line 383, in <module></span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>    sys.exit(Cpp2Python())</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  File "Cpp2Python.py", line 357, in Cpp2Python</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>    dm = createfields(dm)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  File "Cpp2Python.py", line 62, in createfields</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>    section.setFieldName(0, "u")</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  File "PETSc/Section.pyx", line 59, in petsc4py.PETSc.Section.setFieldName</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>petsc4py.PETSc.Error: error code 63</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>[0] PetscSectionSetFieldName() line 427 in /private/tmp/pip-install-laf1l3br/petsc/src/vec/is/section/interface/section.c</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>[0] Argument out of range</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>[0] Section field 0 should be in [0, 0)</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>-------------------------------------------------------</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>Primary job  terminated normally, but 1 process returned</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>a non-zero exit code.. Per user-direction, the job has been aborted.</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>-------------------------------------------------------</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>--------------------------------------------------------------------------</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>mpirun detected that one or more processes exited with non-zero status, thus causing</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>the job to be terminated. The first process to do so was:</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16);min-height:25px">
<span></span><br>
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  Process name: [[23972,1],0]</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>  Exit code:    1</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>--------------------------------------------------------------------------</span></div>
</div>
<div><br>
</div>
<div>I’m using Python 3.8 and this is the output of ‘pip freeze'</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>(.pydev) </span><span style="color:rgb(255,99,85)">➜ 
</span><span style="color:rgb(93,253,255)">dmplex_fem</span><span> pip freeze</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>cachetools==4.0.0</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>cycler==0.10.0</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>kiwisolver==1.1.0</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>llvmlite==0.31.0</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>matplotlib==3.2.1</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>mpi4py==3.0.3</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>numba==0.48.0</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>numpy==1.18.2</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>petsc==3.12.4</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>petsc4py==3.12.0</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>plexus==0.1.0</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>pyparsing==2.4.6</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>python-dateutil==2.8.1</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>scipy==1.4.1</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Inconsolata-dz;color:rgb(16,16,16)">
<span>six==1.14.0</span></div>
</div>
<div><br>
</div>
<div>I’m looking forward to getting your insight on the issue.</div>
<div>Best regards,</div>
<br>
<div>
<div style="color:rgb(0,0,0);font-family:Verdana;font-size:12px;font-style: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>
<div><br>
</div>
<div><br>
</div>
<div></div>
</div>
<div style="word-wrap:break-word">
<div></div>
</div>
<div style="word-wrap:break-word">
<div></div>
<div><br>
<blockquote type="cite">
<div>On 25 Mar 2020, at 17:37, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div>
<br>
<div>
<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" target="_blank">A.M.Aragon@tudelft.nl</a>> wrote:<br>
</div>
<div>
<blockquote 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;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>(.pydev) </span><span style="color:rgb(180,36,25)">➜ 
</span><span style="color:rgb(46,174,187)">testmodule</span><span>
</span><span style="color:rgb(64,11,217)">git:(</span><span style="color:rgb(180,36,25)">e0bc9ae</span><span style="color:rgb(64,11,217)">)
</span><span style="color:rgb(159,160,28)">✗</span><span> mpirun -np 2 python testmodule/__main__.py</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>{3: <testmodule.constitutive.elastic.Elastic object at 0x10feea520>}</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>{3: <testmodule.constitutive.elastic.Elastic object at 0x10d96d520>}</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>Traceback (most recent call last):</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  File "testmodule/__main__.py", line 32, in <module></span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>    sys.exit(main(sys.argv))</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  File "testmodule/__main__.py", line 29, in main</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>    step.solve(m)</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  File "/Users/aaragon/Local/testmodule/testmodule/fem/analysis/static.py", line 33, in solve</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>    self.Amat.assemblyBegin(assembly=0)  # FINAL_ASSEMBLY = 0</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  File "PETSc/Mat.pyx", line 1039, in petsc4py.PETSc.Mat.assemblyBegin</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>petsc4py.PETSc.Error: error code 63</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[1] MatAssemblyBegin() line 5182 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/interface/matrix.c</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[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;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[1] MatStashScatterBegin_Private() line 462 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/utils/matstash.c</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[1] MatStashScatterBegin_BTS() line 931 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/utils/matstash.c</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[1] PetscCommBuildTwoSidedFReq() line 555 in /private/tmp/pip-install-zurcx_6k/petsc/src/sys/utils/mpits.c</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[1] Argument out of range</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[1] toranks[0] 2 not in comm size 2</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>Traceback (most recent call last):</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  File "testmodule/__main__.py", line 32, in <module></span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>    sys.exit(main(sys.argv))</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  File "testmodule/__main__.py", line 29, in main</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>    step.solve(m)</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  File "/Users/aaragon/Local/testmodule/testmodule/fem/analysis/static.py", line 33, in solve</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>    self.Amat.assemblyBegin(assembly=0)  # FINAL_ASSEMBLY = 0</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  File "PETSc/Mat.pyx", line 1039, in petsc4py.PETSc.Mat.assemblyBegin</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>petsc4py.PETSc.Error: error code 63</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[0] MatAssemblyBegin() line 5182 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/interface/matrix.c</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[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;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[0] MatStashScatterBegin_Private() line 462 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/utils/matstash.c</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[0] MatStashScatterBegin_BTS() line 931 in /private/tmp/pip-install-zurcx_6k/petsc/src/mat/utils/matstash.c</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[0] PetscCommBuildTwoSidedFReq() line 555 in /private/tmp/pip-install-zurcx_6k/petsc/src/sys/utils/mpits.c</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[0] Argument out of range</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>[0] toranks[0] 2 not in comm size 2</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>-------------------------------------------------------</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>Primary job  terminated normally, but 1 process returned</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>a non-zero exit code.. Per user-direction, the job has been aborted.</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>-------------------------------------------------------</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>--------------------------------------------------------------------------</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>mpirun detected that one or more processes exited with non-zero status, thus causing</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>the job to be terminated. The first process to do so was:</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);min-height:25px;font-size:13px">
<span></span><br>
</div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  Process name: [[46994,1],0]</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>  Exit code:    1</span></div>
<div style="margin:0px;line-height:normal;font-family:Inconsolata-dz;color:rgb(242,242,242);font-size:13px">
<span>--------------------------------------------------------------------------</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 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="font-family:Verdana;font-size:12px;font-style: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">
<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="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cse.buffalo.edu_-7Eknepley_&d=DwMFaQ&c=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8&r=U1Pry6bTDByPujjSnTcPY6KNXqrym6APfmtom-lIPFA&m=WPJk3cZzX4wkA5n5wceeOf2wjrRxHYug5Gs78b9WHlc&s=vuuUnGL1h2Bfv_uY7e5cMSfiF1btYPrvwf5vKy1JoN0&e=" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</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"><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>