<div dir="ltr">I think you need to reorder your points according to each processor.<div>If process 0 has 4 vertices, they will be numbered (0, 1, 2, 3), and if proc 1 has one vertex it will be 4.<br><div><br></div><div>So, to fix this, switch vertex numbering for 2 and 4.</div><div><br></div><div>Mark</div><div><br></div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Oct 6, 2025 at 3:40 PM Zhang, Chonglin <<a href="mailto:chonglin.zhang@und.edu">chonglin.zhang@und.edu</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 class="msg7731257653931288546">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_-3036584293828908185WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;color:black">Dear PETSc developers,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black">I have some questions on the proper use of DMPlexCreateFromCellListParallelPetsc function (<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DMPlex/DMPlexCreateFromCellListParallelPetsc/__;!!G_uCfscf7eWS!YJgdfNvYGp76m3zAsH07tAaJCaPnEyuyhZdGILGu2oyhW0RSJZeX4J8-IUCVNBupO7efr7Ju5zA_5ayjZ_YkwEeCuXjIJQ2K$" target="_blank">https://petsc.org/release/manualpages/DMPlex/DMPlexCreateFromCellListParallelPetsc/</a>).
 I am upgrading my code’s PETSc dependency from v3.16.6 to v3.24.0 (and v3.23.3, v3.23.6). I encountered crash with DMPlexCreateFromCellListParallelPetsc function:<u></u><u></u></span></p>
<ul style="margin-top:0in" type="disc">
<li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">To show the crash, I modified the following test: src/dm/impls/plex/tests/ex18.c<u></u><u></u></span></li><li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">Is there anything I am doing wrong when creating DMPlex using the below mesh with this test?<u></u><u></u></span></li><li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">What is the order of vertex index (of own element) going into DMPlexCreateFromCellListParallelPetsc function?<u></u><u></u></span></li><li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">What is the order of own vertex coordinates going into DMPlexCreateFromCellListParallelPetsc function?<u></u><u></u></span></li></ul>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black">Here is a detailed descriptions of what I did with ex18.c to show my issue: src/dm/impls/plex/tests/ex18.c<u></u><u></u></span></p>
<ul style="margin-top:0in" type="disc">
<li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">A simple 2D square mesh with 5 vertices and 4 triangles, shared by 2 MPI ranks (see the below image for the mesh, also attached file).<u></u><u></u></span></li><li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">Each MPI rank owns 2 elements.<u></u><u></u></span></li><li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">MPI rank 0 owns vertex indexed as: 0, 1, 3, 4; rank 1 owns vertex indexed as: 2.<u></u><u></u></span></li><li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">Modified code (with updated mesh information) is attached.<u></u><u></u></span></li><li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">The DM view output is also attached.<u></u><u></u></span></li><li class="m_-3036584293828908185MsoListParagraph" style="color:black;margin-left:0in">
<span style="font-size:11pt">Note: the original test with 2 triangles and 2 elements was running fine.<u></u><u></u></span></li></ul>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><img border="0" width="594" height="768" style="width: 6.1875in; height: 8in;" id="m_-3036584293828908185Picture_x0020_1" src="cid:ii_199bb9d3c9b4ce8e91"></span><span style="font-size:11pt;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black">Using this new mesh, the test crashed with the following error message:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>
[0]PETSC ERROR: Invalid argument<br>
[0]PETSC ERROR: Mesh cell 1 of type triangle is inverted, |J| = 0.<br>
[0]PETSC ERROR: See <a href="https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!YJgdfNvYGp76m3zAsH07tAaJCaPnEyuyhZdGILGu2oyhW0RSJZeX4J8-IUCVNBupO7efr7Ju5zA_5ayjZ_YkwEeCuaawmeuG$" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>
[0]PETSC ERROR: PETSc Release Version 3.24.0, unknown<br>
[0]PETSC ERROR: ./ex18 with 2 MPI process(es) and PETSC_ARCH arch-centos_kokkos on boltzmann2 by zhangc20 Mon Oct  6 14:00:48 2025<br>
[0]PETSC ERROR: Configure options: --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --with-shared-libraries=1 --with-debugging=no --COPTFLAGS="-g -O2 -fPIC" --CXXOPTFLAGS="-g -O2 -fPIC" --FOPTFLAGS="-g -O2 -fPIC" --with-cuda=1 --with-cuda-arch=86 --with-cudac=nvcc
 --with-kokkos=1 --with-kokkos-dir=./../install/kokkos/install/ --with-kokkos-kernels=1 --with-kokkos-kernels-dir=./../install/kokkos-kernels/install/ --download-metis --download-parmetis --download-fblaslapack=1 --download-triangle --with-make-np=8 PETSC_ARCH=arch-centos_kokkos<br>
[0]PETSC ERROR: #1 DMPlexCheckGeometry() at /hdd1/dsmc/comet/comet/petsc/src/dm/impls/plex/plex.c:9630<br>
[0]PETSC ERROR: #2 DMPlexCheck() at /hdd1/dsmc/comet/comet/petsc/src/dm/impls/plex/plex.c:9807<br>
[0]PETSC ERROR: #3 DMSetFromOptions_NonRefinement_Plex() at /hdd1/dsmc/comet/comet/petsc/src/dm/impls/plex/plexcreate.c:5121<br>
[0]PETSC ERROR: #4 DMSetFromOptions_Plex() at /hdd1/dsmc/comet/comet/petsc/src/dm/impls/plex/plexcreate.c:5601<br>
[0]PETSC ERROR: #5 DMSetFromOptions() at /hdd1/dsmc/comet/comet/petsc/src/dm/interface/dm.c:907<br>
[0]PETSC ERROR: #6 CreateMesh() at ex18.c:811<br>
[0]PETSC ERROR: #7 main() at ex18.c:1527<br>
[0]PETSC ERROR: PETSc Option Table entries:<br>
[0]PETSC ERROR: -dm_plex_check_all 1 (source: command line)<br>
[0]PETSC ERROR: -dm_view ascii:dm_mesh.txt:ascii_info_detail (source: command line)<br>
[0]PETSC ERROR: -interpolate create (source: command line)<br>
[0]PETSC ERROR: ----------------End of Error Message -------send entire error message to
<a href="mailto:petsc-maint@mcs.anl.gov----------" target="_blank">petsc-maint@mcs.anl.gov----------</a><br>
Abort(62) on node 0 (rank 0 in comm 16): application called MPI_Abort(MPI_COMM_SELF, 62) - process 0<br>
[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>
[1]PETSC ERROR: Invalid argument<br>
[1]PETSC ERROR: Mesh cell 0 of type triangle is inverted, |J| = -0.25<br>
[1]PETSC ERROR: See <a href="https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!YJgdfNvYGp76m3zAsH07tAaJCaPnEyuyhZdGILGu2oyhW0RSJZeX4J8-IUCVNBupO7efr7Ju5zA_5ayjZ_YkwEeCuaawmeuG$" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>
[1]PETSC ERROR: PETSc Release Version 3.24.0, unknown<br>
[1]PETSC ERROR: ./ex18 with 2 MPI process(es) and PETSC_ARCH arch-centos_kokkos on boltzmann2 by zhangc20 Mon Oct  6 14:00:48 2025<br>
[1]PETSC ERROR: Configure options: --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --with-shared-libraries=1 --with-debugging=no --COPTFLAGS="-g -O2 -fPIC" --CXXOPTFLAGS="-g -O2 -fPIC" --FOPTFLAGS="-g -O2 -fPIC" --with-cuda=1 --with-cuda-arch=86 --with-cudac=nvcc
 --with-kokkos=1 --with-kokkos-dir=./../install/kokkos/install/ --with-kokkos-kernels=1 --with-kokkos-kernels-dir=./../install/kokkos-kernels/install/ --download-metis --download-parmetis --download-fblaslapack=1 --download-triangle --with-make-np=8 PETSC_ARCH=arch-centos_kokkos<br>
[1]PETSC ERROR: #1 DMPlexCheckGeometry() at /hdd1/dsmc/comet/comet/petsc/src/dm/impls/plex/plex.c:9630<br>
[1]PETSC ERROR: #2 DMPlexCheck() at /hdd1/dsmc/comet/comet/petsc/src/dm/impls/plex/plex.c:9807<br>
[1]PETSC ERROR: #3 DMSetFromOptions_NonRefinement_Plex() at /hdd1/dsmc/comet/comet/petsc/src/dm/impls/plex/plexcreate.c:5121<br>
[1]PETSC ERROR: #4 DMSetFromOptions_Plex() at /hdd1/dsmc/comet/comet/petsc/src/dm/impls/plex/plexcreate.c:5601<br>
[1]PETSC ERROR: #5 DMSetFromOptions() at /hdd1/dsmc/comet/comet/petsc/src/dm/interface/dm.c:907<br>
[1]PETSC ERROR: #6 CreateMesh() at ex18.c:811<br>
[1]PETSC ERROR: #7 main() at ex18.c:1527<br>
[1]PETSC ERROR: PETSc Option Table entries:<br>
[1]PETSC ERROR: -dm_plex_check_all 1 (source: command line)<br>
[1]PETSC ERROR: -dm_view ascii:dm_mesh.txt:ascii_info_detail (source: command line)<br>
[1]PETSC ERROR: -interpolate create (source: command line)<br>
[1]PETSC ERROR: ----------------End of Error Message -------send entire error message to
<a href="mailto:petsc-maint@mcs.anl.gov----------" target="_blank">petsc-maint@mcs.anl.gov----------</a><br>
Abort(62) on node 1 (rank 0 in comm 16): application called MPI_Abort(MPI_COMM_SELF, 62) - process 0</span><span style="font-size:11pt;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black">Run script used: <u></u>
<u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(34,34,34);background:white">mpirun -np 2 ./ex18 -dm_plex_check_all 1 -dm_view ascii:dm_mesh.txt:ascii_info_detail -interpolate create</span><span style="font-size:11pt;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black">Chonglin<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:black"><u></u> <u></u></span></p>
</div>
</div>

</div></blockquote></div>