<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 21, 2017 at 10:47 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-">On Sat, Jan 21, 2017 at 10:38 PM, Fande Kong <span dir="ltr"><<a href="mailto:fdkong.jd@gmail.com" target="_blank">fdkong.jd@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>I upgraded the OS system to macOS Sierra, and observed that PETSc can not read the exodus file any more. The same code runs fine on macOS Capitan. I also tested the function DMPlexCreateExodusFromFile() against different versions of the GCC compiler such as GCC-5.4 and GCC-6, and neither of them work. I guess this issue is related to the external package <i><b>exodus</b></i>, and PETSc might not pick up the right enveriment variables for the <i><b>exodus.</b></i></div><div><br></div><div>This issue can be reproduced using the following simple code:</div></div></blockquote><div><br></div></span><div>1) This is just a standard check. Have you reconfigured so that you know ExodusII was built with the same compilers and system libraries?</div><div><br></div><div>2) If so, can you get a stack trace with gdb or lldb?</div></div></div></div></blockquote><div><br></div><div><div>0   libsystem_kernel.dylib        <span class="gmail-Apple-tab-span" style="white-space:pre">        </span>0x00007fffad8b8dda __pthread_kill + 10</div><div>1   libsystem_pthread.dylib       <span class="gmail-Apple-tab-span" style="white-space:pre">   </span>0x00007fffad9a4787 pthread_kill + 90</div><div>2   libsystem_c.dylib             <span class="gmail-Apple-tab-span" style="white-space:pre">  </span>0x00007fffad81e420 abort + 129</div><div>3   libpetsc.3.7.dylib            <span class="gmail-Apple-tab-span" style="white-space:pre">        </span>0x00000001100eb9ee PetscAbortErrorHandler + 506 (errstop.c:40)</div><div>4   libpetsc.3.7.dylib            <span class="gmail-Apple-tab-span" style="white-space:pre">        </span>0x00000001100e631d PetscError + 916 (err.c:379)</div><div>5   libpetsc.3.7.dylib            <span class="gmail-Apple-tab-span" style="white-space:pre">       </span>0x00000001100ed830 PetscSignalHandlerDefault + 1927 (signal.c:160)</div><div>6   libpetsc.3.7.dylib            <span class="gmail-Apple-tab-span" style="white-space:pre">    </span>0x00000001100ed088 PetscSignalHandler_Private(int) + 630 (signal.c:49)</div><div>7   libsystem_platform.dylib      <span class="gmail-Apple-tab-span" style="white-space:pre">   </span>0x00007fffad997bba _sigtramp + 26</div><div>8   ???                           <span class="gmail-Apple-tab-span" style="white-space:pre">      </span>0x000000011ea09370 initialPoolContent + 19008</div><div>9   libnetcdf.7.dylib             <span class="gmail-Apple-tab-span" style="white-space:pre"> </span>0x000000011228fc62 utf8proc_map + 210 (dutf8proc.c:543)</div><div>10  libnetcdf.7.dylib             <span class="gmail-Apple-tab-span" style="white-space:pre">       </span>0x000000011228fd0f utf8proc_NFC + 38 (dutf8proc.c:568)</div><div>11  libnetcdf.7.dylib             <span class="gmail-Apple-tab-span" style="white-space:pre">        </span>0x00000001122a7928 NC_findattr + 110 (attr.c:341)</div><div>12  libnetcdf.7.dylib             <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>0x00000001122a7a4e NC_lookupattr + 119 (attr.c:384)</div><div>13  libnetcdf.7.dylib             <span class="gmail-Apple-tab-span" style="white-space:pre">   </span>0x00000001122a93ef NC3_get_att + 47 (attr.c:1138)</div><div>14  libnetcdf.7.dylib             <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>0x0000000112286126 nc_get_att_float + 90 (dattget.c:192)</div><div>15  libpetsc.3.7.dylib            <span class="gmail-Apple-tab-span" style="white-space:pre">      </span>0x00000001117f3a5b ex_open_int + 171 (ex_open.c:259)</div><div>16  libpetsc.3.7.dylib            <span class="gmail-Apple-tab-span" style="white-space:pre">  </span>0x0000000110c36609 DMPlexCreateExodusFromFile + 781 (plexexodusii.c:43)</div><div>17  DMPlexCreateExodusFromFile    <span class="gmail-Apple-tab-span" style="white-space:pre">   </span>0x000000010fed4cfc main + 397 (DMPlexCreateExodusFromFile.cpp:24)</div><div>18  libdyld.dylib                 <span class="gmail-Apple-tab-span" style="white-space:pre">   </span>0x00007fffad78a255 start + 1</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>   Matt</div><div><div class="gmail-h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><i>static char help[] = " create mesh from exodus.\n\n";</i></div><div><i><br></i></div><div><i>#include <petscdm.h></i></div><div><i>#include <petsc/private/dmpleximpl.h></i></div><div><i><br></i></div><div><i>#undef __FUNCT__</i></div><div><i>#define __FUNCT__ "main"</i></div><div><i>int main(int argc,char **argv)</i></div><div><i>{</i></div><div><i>  char                fineMeshFileName[2048];</i></div><div><i>  DM                  dm;</i></div><div><i>  MPI_Comm            comm;</i></div><div><i>  PetscBool           flg;</i></div><div><i><br></i></div><div><i>  PetscErrorCode      ierr;</i></div><div><i><br></i></div><div><i>  ierr = PetscInitialize(&argc,&argv,(c<wbr>har *)0,help);CHKERRQ(ierr);</i></div><div><i>  comm = PETSC_COMM_WORLD;</i></div><div><i>  ierr = PetscOptionsGetString(NULL,NUL<wbr>L,"-file",fineMeshFileName,siz<wbr>eof(fineMeshFileName),&flg);<wbr>CHKERRQ(ierr);</i></div><div><i>  if(!flg){</i></div><div><i><span class="gmail-m_1135989402941268832m_-7159560215356067798gmail-Apple-tab-span" style="white-space:pre-wrap">       </span> SETERRQ(comm,PETSC_ERR_ARG_NUL<wbr>L,"please specify a fine mesh file \n");</i></div><div><i>   }</i></div><div><i>  ierr = DMPlexCreateExodusFromFile( comm,fineMeshFileName, PETSC_FALSE, &dm);CHKERRQ(ierr);</i></div><div><i>  ierr = DMDestroy(&dm);CHKERRQ(ierr);</i></div><div><i>  ierr = PetscFinalize();CHKERRQ(ierr);</i></div><div><i>}</i></div></div><div><i><br></i></div><div><i><br></i></div><div><div><i>LiviadeMacBook-Pro:partition livia$ ./DMPlexCreateExodusFromFile -file Tri3.exo </i></div><div><i>[0]PETSC ERROR: ------------------------------<wbr>------------------------------<wbr>------------</i></div><div><i>[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range</i></div><div><i>[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</i></div><div><i>[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" target="_blank">http://www.mcs.anl.gov/petsc/d<wbr>ocumentation/faq.html#valgrind</a></i></div><div><i>[0]PETSC ERROR: or try <a href="http://valgrind.org" target="_blank">http://valgrind.org</a> on GNU/linux and Apple Mac OS X to find memory corruption errors</i></div><div><i>[0]PETSC ERROR: likely location of problem given in stack below</i></div><div><i>[0]PETSC ERROR: ---------------------  Stack Frames ------------------------------<wbr>------</i></div><div><i>[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,</i></div><div><i>[0]PETSC ERROR:       INSTEAD the line number of the start of the function</i></div><div><i>[0]PETSC ERROR:       is given.</i></div><div><i>[0]PETSC ERROR: [0] DMPlexCreateExodusFromFile line 38 /Users/livia/math/petsc/src/dm<wbr>/impls/plex/plexexodusii.c</i></div><div><i>[0]PETSC ERROR: --------------------- Error Message ------------------------------<wbr>------------------------------<wbr>--</i></div><div><i>[0]PETSC ERROR: Signal received</i></div><div><i>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/d<wbr>ocumentation/faq.html</a> for trouble shooting.</i></div><div><i>[0]PETSC ERROR: Petsc Release Version 3.7.5, unknown </i></div><div><i>[0]PETSC ERROR: ./DMPlexCreateExodusFromFile on a arch-darwin-cxx-debug named LiviadeMacBook-Pro.local by livia Sat Jan 21 21:04:22 2017</i></div><div><i>[0]PETSC ERROR: Configure options --with-clanguage=cxx --with-shared-libraries=1 --download-fblaslapack=1 --with-mpi=1 --download-parmetis=1 --download-metis=1 --download-netcdf=1 --download-exodusii=1 --download-hdf5=1 --with-debugging=yes --with-c2html=0 --download-hypre=1 --with-64-bit-indices=1 --download-superlu_dist=1 PETSC_ARCH=arch-darwin-cxx-deb<wbr>ug</i></div><div><i>[0]PETSC ERROR: #1 User provided function() line 0 in  unknown file</i></div><div><i>application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0</i></div><div><i>[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59</i></div><div><i>:</i></div><div><i>system msg for write_line failure : Bad file descriptor</i></div></div><div><br></div><div><br></div><div>The log files of make and configuration are also attached.  If you have any idea on this issue, please let me know!</div><span class="gmail-m_1135989402941268832HOEnZb"><font color="#888888"><div><br></div><div>Fande Kong,</div><div><br></div></font></span></div>
</blockquote></div></div></div><span class="gmail-HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_1135989402941268832gmail_signature">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>
</font></span></div></div>
</blockquote></div><br></div></div>