<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">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:0 0 0 .8ex;border-left:1px #ccc 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><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><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc 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,(<wbr>char *)0,help);CHKERRQ(ierr);</i></div><div><i>  comm = PETSC_COMM_WORLD;</i></div><div><i>  ierr = PetscOptionsGetString(NULL,<wbr>NULL,"-file",fineMeshFileName,<wbr>sizeof(fineMeshFileName),&flg)<wbr>;CHKERRQ(ierr);</i></div><div><i>  if(!flg){</i></div><div><i><span class="m_-7159560215356067798gmail-Apple-tab-span" style="white-space:pre-wrap">       </span> SETERRQ(comm,PETSC_ERR_ARG_<wbr>NULL,"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/<wbr>documentation/faq.html#<wbr>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/<wbr>dm/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/<wbr>documentation/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-<wbr>debug</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="HOEnZb"><font color="#888888"><div><br></div><div>Fande Kong,</div><div><br></div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_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>
</div></div>