<font style="font-size:14px;font-family:sans-serif">
<div><font style="font-family:sans-serif;font-size:14px"><font style="font-size:14px"><font style="font-family:sans-serif">In case, somebody finds this thread in future, attached file produces an ExodusII file that I was able to open in paraview 5.9</font></font></font></div><div><font style="font-family:sans-serif"></font></div><div><font style="font-family:sans-serif">David</font></div><div class="gmail_quote_attribution">On Dec 2 2021, at 8:02 AM, David Andrs <andrsd@gmail.com> wrote:</div><blockquote class="gmail_quote"><edo-readonly><div><font style="font-family:monospace"><font style="font-weight:400"><span style="color:rgb(255, 255, 255)"><font style="font-size:medium"><font style="font-family:"SF UI Display", Helvetica, sans-serif">Blaise</font></font></span></font></font><font style="font-family:monospace">,</font></div><div><font style="font-family:monospace"></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">thank you very much for you help. This helps a lot.</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"></font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">By the way, I was not able to open the produced file in paraview 5.9.1 (failed with "EX_INQ_TIME failed"). However, ncdump seems correct. At least, I do not immediately see anything wrong there. I will try to look into this problem myself, now that I know it is ok to do direct exodusII calls.</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"></font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Thank you again,</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"></font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">David</font></font></div><div><font style="font-family:monospace"></font></div><div class="gmail_quote_attribution"><font style="font-family:monospace">On Dec 1 2021, at 12:48 PM, Blaise Bourdin <bourdin@mcmaster.ca> wrote:</font></div><blockquote class="gmail_quote"><div><div><font style="font-family:monospace">David,</font></div><div><br></div><div><font style="font-family:monospace">Here is a modified example.</font></div><div><font style="font-family:monospace">Exodus needs some additional work prior to saving fields. See the attached modified example.</font></div><div><br></div><div><font style="font-family:monospace">Blaise</font></div><div><br></div></div><div><div><div><br><blockquote class=""><div><font style="font-family:monospace">On Dec 1, 2021, at 1:54 PM, Blaise Bourdin <</font><font style="font-family:monospace"><a href="mailto:bourdin@mcmaster.ca" title="mailto:bourdin@mcmaster.ca">bourdin@mcmaster.ca</a></font><font style="font-family:monospace">> wrote:</font></div><br><div><div><div><font style="font-family:monospace">OK, let me have a look.</font></div><div><font style="font-family:monospace">Blaise</font></div><div><br><div><br><blockquote class=""><div><font style="font-family:monospace">On Nov 30, 2021, at 7:31 PM, David Andrs <</font><font style="font-family:monospace"><a href="mailto:andrsd@gmail.com" title="mailto:andrsd@gmail.com">andrsd@gmail.com</a></font><font style="font-family:monospace">> wrote:</font></div><br><div><div><font style="font-family:monospace"><font style="font-family:sans-serif">I see. I added a "Cell Sets" label like so:</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"></font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> DMCreateLabel(dm, "Cell Sets");</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> DMLabel cs_label;</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> DMGetLabel(dm, "Cell Sets", &cs_label);</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> DMLabelAddStratum(cs_label, 0);</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> PetscInt idxs[] = { 1 };</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> IS is;</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> ISCreateGeneral(comm, 1, idxs, PETSC_COPY_VALUES, &is);</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> DMLabelSetStratumIS(cs_label, 0, is);</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> ISDestroy(&is);</font></font></div><br><div><font style="font-family:monospace"><font style="font-family:sans-serif">Note, that I have only a single element (Quad4) in the mesh and I am just trying to get this working, so I understand what needs to happen for larger meshes.</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"></font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">This got me past the segfault, but now I see:</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"></font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace">[0]PETSC ERROR: Argument out of range</font></font></div><div class="x_p1"><font style="font-family:sans-serif"><font style="font-family:monospace">[0]PETSC ERROR: Number of vertices 1 in dimension 2 has no ExodusII type</font></font></div><br><div class="x_p1"><font style="font-family:monospace"><font style="font-family:sans-serif">So, I assume I need to do something more to make it work.</font></font></div><div class="x_p1"><font style="font-family:monospace"><font style="font-family:sans-serif"></font></font></div><div class="x_p1"><font style="font-family:monospace"><font style="font-family:sans-serif">David</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"></font></font></div><div class="x_gmail_quote_attribution"><font style="font-family:monospace"><font style="font-family:sans-serif">On Nov 30 2021, at 11:39 AM, Blaise Bourdin <</font></font><font style="font-family:monospace"><font style="font-family:sans-serif"><a href="mailto:bourdin@mcmaster.ca" title="mailto:bourdin@mcmaster.ca">bourdin@mcmaster.ca</a></font></font><font style="font-family:monospace"><font style="font-family:sans-serif">> wrote:</font></font></div><blockquote class="x_gmail_quote"><div><font style="font-family:monospace"><font style="font-family:sans-serif">It looks like your DM cannot be saved in exodus format as such. The exodus format requires that all cells be part of a single block (defined by ‘Cell Set’ labels), and that the cell sets consists of sequentially numbered cells.</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Can you see if that is enough? If not, I will go through your example</font></font></div><div><br></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Blaise</font></font></div><div><br><div><blockquote class=""><div><font style="font-family:monospace"><font style="font-family:sans-serif">On Nov 30, 2021, at 9:50 AM, David Andrs <</font></font><font style="font-family:monospace"><font style="font-family:sans-serif"><a href="mailto:andrsd@gmail.com" title="mailto:andrsd@gmail.com">andrsd@gmail.com</a></font></font><font style="font-family:monospace"><font style="font-family:sans-serif">> wrote:</font></font></div><br><div><div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Hello!</font></font></div><div><br></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">I am trying to store data into an ExodusII file using the ExodusIIViewer, but running into a segfault inside PETSc. Attached is a minimal example showing the problem. It can very much be that I am missing something obvious. However, if I change the code to VTKViewer I get the desired output file.</font></font></div><div><br></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Machine: MacBook Pro 2019</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">OS version/type: Darwin notak.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">PETSc: Petsc Release Version 3.16.1, Nov 01, 2021</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">MPI: MPICH 3.4.2</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Compiler: clang-12</font></font></div><div><br></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Call stack (not sure how relevant that is since it is from opt version):</font></font></div><div><br><div><font style="font-family:sans-serif"><font style="font-family:monospace">* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xc)</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> frame #0: 0x0000000102303ba9 libpetsc.3.16.dylib`DMView_PlexExodusII(dm=<unavailable>, viewer=<unavailable>) at plexexodusii.c:457:45 [opt]</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> 454 else if (degree == 2) nodes[cs] = nodesHexP2;</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> 455 }</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> 456 /* Compute the number of cells not in the connectivity table */</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace">-> 457 cellsNotInConnectivity -= nodes[cs][3]*csSize;</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> 458</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> 459 ierr = ISRestoreIndices(stratumIS, &cells);CHKERRQ(ierr);</font></font></div><div><font style="font-family:sans-serif"><font style="font-family:monospace"> 460 ierr = ISDestroy(&stratumIS);CHKERRQ(ierr);</font></font></div></div><div><br></div><div><div><font style="font-family:monospace"><font style="font-family:sans-serif"><font style="font-family:arial, sans-serif">With regards,</font></font></font></div></div><div><br></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"><font style="font-family:arial, sans-serif">David Andrs</font></font></font></div></div><div><font style="font-family:monospace"><font style="font-family:sans-serif"><exo2.c></font></font></div></div></blockquote></div><br><div><div><div><div><div><div><div><div><div><div><div><div><div><font style="font-family:monospace"><font style="font-family:sans-serif">-- </font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Professor, Department of Mathematics & Statistics</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Hamilton Hall room 409A, McMaster University</font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada </font></font></div><div><font style="font-family:monospace"><font style="font-family:sans-serif">Tel. +1 (905) 525 9140 ext. 27243</font></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote></div></blockquote></div><br><div><div><div><div><div><div><div><div><div><div><div><div><div><font style="font-family:monospace">-- </font></div><div><font style="font-family:monospace">Professor, Department of Mathematics & Statistics</font></div><div><font style="font-family:monospace">Hamilton Hall room 409A, McMaster University</font></div><div><font style="font-family:monospace">1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada </font></div><div><font style="font-family:monospace">Tel. +1 (905) 525 9140 ext. 27243</font></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div></div></blockquote></div><br><div><div><div><div><div><div><div><div><div><div><div><div><div><font style="font-family:monospace">-- </font></div><div><font style="font-family:monospace">Professor, Department of Mathematics & Statistics</font></div><div><font style="font-family:monospace">Hamilton Hall room 409A, McMaster University</font></div><div><font style="font-family:monospace">1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada </font></div><div><font style="font-family:monospace">Tel. +1 (905) 525 9140 ext. 27243</font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote></edo-readonly></blockquote>
</font>