[petsc-users] DMPlexCreateExodusFromFile() does not work on macOS Sierra
Fande Kong
fdkong.jd at gmail.com
Sat Jan 21 22:38:05 CST 2017
Hi All,
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 *exodus*, and
PETSc might not pick up the right enveriment variables for the *exodus.*
This issue can be reproduced using the following simple code:
*static char help[] = " create mesh from exodus.\n\n";*
*#include <petscdm.h>*
*#include <petsc/private/dmpleximpl.h>*
*#undef __FUNCT__*
*#define __FUNCT__ "main"*
*int main(int argc,char **argv)*
*{*
* char fineMeshFileName[2048];*
* DM dm;*
* MPI_Comm comm;*
* PetscBool flg;*
* PetscErrorCode ierr;*
* ierr = PetscInitialize(&argc,&argv,(char *)0,help);CHKERRQ(ierr);*
* comm = PETSC_COMM_WORLD;*
* ierr =
PetscOptionsGetString(NULL,NULL,"-file",fineMeshFileName,sizeof(fineMeshFileName),&flg);CHKERRQ(ierr);*
* if(!flg){*
* SETERRQ(comm,PETSC_ERR_ARG_NULL,"please specify a fine mesh file \n");*
* }*
* ierr = DMPlexCreateExodusFromFile( comm,fineMeshFileName, PETSC_FALSE,
&dm);CHKERRQ(ierr);*
* ierr = DMDestroy(&dm);CHKERRQ(ierr);*
* ierr = PetscFinalize();CHKERRQ(ierr);*
*}*
*LiviadeMacBook-Pro:partition livia$ ./DMPlexCreateExodusFromFile -file
Tri3.exo *
*[0]PETSC ERROR:
------------------------------------------------------------------------*
*[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
probably memory access out of range*
*[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger*
*[0]PETSC ERROR: or see
http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
<http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind>*
*[0]PETSC ERROR: or try http://valgrind.org <http://valgrind.org> on
GNU/linux and Apple Mac OS X to find memory corruption errors*
*[0]PETSC ERROR: likely location of problem given in stack below*
*[0]PETSC ERROR: --------------------- Stack Frames
------------------------------------*
*[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not
available,*
*[0]PETSC ERROR: INSTEAD the line number of the start of the function*
*[0]PETSC ERROR: is given.*
*[0]PETSC ERROR: [0] DMPlexCreateExodusFromFile line 38
/Users/livia/math/petsc/src/dm/impls/plex/plexexodusii.c*
*[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------*
*[0]PETSC ERROR: Signal received*
*[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
<http://www.mcs.anl.gov/petsc/documentation/faq.html> for trouble shooting.*
*[0]PETSC ERROR: Petsc Release Version 3.7.5, unknown *
*[0]PETSC ERROR: ./DMPlexCreateExodusFromFile on a arch-darwin-cxx-debug
named LiviadeMacBook-Pro.local by livia Sat Jan 21 21:04:22 2017*
*[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-debug*
*[0]PETSC ERROR: #1 User provided function() line 0 in unknown file*
*application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0*
*[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59*
*:*
*system msg for write_line failure : Bad file descriptor*
The log files of make and configuration are also attached. If you have any
idea on this issue, please let me know!
Fande Kong,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170121/439068aa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log.zip
Type: application/zip
Size: 11767 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170121/439068aa/attachment-0002.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log.zip
Type: application/zip
Size: 1189476 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170121/439068aa/attachment-0003.zip>
More information about the petsc-users
mailing list