[petsc-users] DMPlexCreateExodusFromFile() does not work on macOS Sierra

Fande Kong fdkong.jd at gmail.com
Sun Jan 22 17:28:34 CST 2017


On Sun, Jan 22, 2017 at 12:35 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Sun, Jan 22, 2017 at 12:41 PM, Fande Kong <fdkong.jd at gmail.com> wrote:
>
>> On Sat, Jan 21, 2017 at 10:47 PM, Matthew Knepley <knepley at gmail.com>
>> wrote:
>>
>>> On Sat, Jan 21, 2017 at 10:38 PM, Fande Kong <fdkong.jd at gmail.com>
>>> wrote:
>>>
>>>> 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:
>>>>
>>>
>>> 1) This is just a standard check. Have you reconfigured so that you know
>>> ExodusII was built with the same compilers and system libraries?
>>>
>>> 2) If so, can you get a stack trace with gdb or lldb?
>>>
>>
>> 0   libsystem_kernel.dylib         0x00007fffad8b8dda __pthread_kill + 10
>> 1   libsystem_pthread.dylib       0x00007fffad9a4787 pthread_kill + 90
>> 2   libsystem_c.dylib             0x00007fffad81e420 abort + 129
>> 3   libpetsc.3.7.dylib             0x00000001100eb9ee
>> PetscAbortErrorHandler + 506 (errstop.c:40)
>> 4   libpetsc.3.7.dylib             0x00000001100e631d PetscError + 916
>> (err.c:379)
>> 5   libpetsc.3.7.dylib             0x00000001100ed830
>> PetscSignalHandlerDefault + 1927 (signal.c:160)
>> 6   libpetsc.3.7.dylib             0x00000001100ed088
>> PetscSignalHandler_Private(int) + 630 (signal.c:49)
>> 7   libsystem_platform.dylib       0x00007fffad997bba _sigtramp + 26
>> 8   ???                           0x000000011ea09370 initialPoolContent
>> + 19008
>> 9   libnetcdf.7.dylib             0x000000011228fc62 utf8proc_map + 210
>> (dutf8proc.c:543)
>> 10  libnetcdf.7.dylib             0x000000011228fd0f utf8proc_NFC + 38
>> (dutf8proc.c:568)
>> 11  libnetcdf.7.dylib             0x00000001122a7928 NC_findattr + 110
>> (attr.c:341)
>> 12  libnetcdf.7.dylib             0x00000001122a7a4e NC_lookupattr + 119
>> (attr.c:384)
>> 13  libnetcdf.7.dylib             0x00000001122a93ef NC3_get_att + 47
>> (attr.c:1138)
>> 14  libnetcdf.7.dylib             0x0000000112286126 nc_get_att_float +
>> 90 (dattget.c:192)
>> 15  libpetsc.3.7.dylib             0x00000001117f3a5b ex_open_int + 171
>> (ex_open.c:259)
>> 16  libpetsc.3.7.dylib             0x0000000110c36609
>> DMPlexCreateExodusFromFile + 781 (plexexodusii.c:43)
>> 17  DMPlexCreateExodusFromFile     0x000000010fed4cfc main + 397
>> (DMPlexCreateExodusFromFile.cpp:24)
>> 18  libdyld.dylib                 0x00007fffad78a255 start + 1
>>
>
> This is a NetCDF error on ex_open_int(). My guess is that your NetCDF
> build is old and when it calls the system DLL
> you bomb. Can you do a completely new build, meaning either reclone PETSc
> somewhere else, or delete the whole
> $PETSC_DIR/$PETSC_ARCH/externalpackage directory and reconfigure/build?
>
>   Thanks,
>
>       Matt
>
>

Hi Matt,

Thanks for reply.  I recloned  PETSc (the old petsc folder is deleted
completely) and reconfigure. And still has the same issue. I also checked
if the binary is complied against any other netcdf. The binary is actually
complied against the right netcdf installed through PETSc.

*LiviadeMacBook-Pro:partition livia$ otool -L  DMPlexCreateExodusFromFile*
*DMPlexCreateExodusFromFile:*
* /Users/livia/math/petsc/arch-darwin-cxx-debug/lib/libpetsc.3.7.dylib
(compatibility version 3.7.0, current version 3.7.5)*
* /Users/livia/math/petsc/arch-darwin-cxx-debug/lib/libsuperlu_dist.5.dylib
(compatibility version 5.0.0, current version 5.1.3)*
* /Users/livia/math/petsc/arch-darwin-cxx-debug/lib/libparmetis.dylib
(compatibility version 0.0.0, current version 0.0.0)*
* /Users/livia/math/petsc/arch-darwin-cxx-debug/lib/libmetis.dylib
(compatibility version 0.0.0, current version 0.0.0)*
* /Users/livia/math/petsc/arch-darwin-cxx-debug/lib/libnetcdf.7.dylib
(compatibility version 10.0.0, current version 10.0.0)*
* /Users/livia/math/petsc/arch-darwin-cxx-debug/lib/libhdf5_hl.8.dylib
(compatibility version 9.0.0, current version 9.1.0)*
* /Users/livia/math/petsc/arch-darwin-cxx-debug/lib/libhdf5.8.dylib
(compatibility version 9.0.0, current version 9.1.0)*
* /opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current
version 10.0.0)*
* /Users/livia/math/mpich-3.2_install/lib/libmpifort.12.dylib
(compatibility version 14.0.0, current version 14.0.0)*
* /usr/local/opt/gcc at 5/lib/gcc/5/libgfortran.3.dylib (compatibility version
4.0.0, current version 4.0.0)*
* /usr/local/opt/gcc at 5/lib/gcc/5/libquadmath.0.dylib (compatibility version
1.0.0, current version 1.0.0)*
* /Users/livia/math/mpich-3.2_install/lib/libmpicxx.12.dylib (compatibility
version 14.0.0, current version 14.0.0)*
* /usr/local/opt/gcc at 5/lib/gcc/5/libstdc++.6.dylib (compatibility version
7.0.0, current version 7.21.0)*
* /usr/local/opt/gcc at 5/lib/gcc/5/libgcc_s.1.dylib (compatibility version
1.0.0, current version 1.0.0)*
* /Users/livia/math/mpich-3.2_install/lib/libmpi.12.dylib (compatibility
version 14.0.0, current version 14.0.0)*
* /Users/livia/math/mpich-3.2_install/lib/libpmpi.12.dylib (compatibility
version 14.0.0, current version 14.0.0)*
* /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1238.0.0)*
* /usr/local/lib/gcc/5/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)*





>
>>
>
>>>    Matt
>>>
>>>
>>>> *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,
>>>>
>>>>
>>>
>>>
>>> --
>>> What most experimenters take for granted before they begin their
>>> experiments is infinitely more interesting than any results to which their
>>> experiments lead.
>>> -- Norbert Wiener
>>>
>>
>>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170122/702f2dd7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log.zip
Type: application/zip
Size: 1179555 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170122/702f2dd7/attachment-0002.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log.zip
Type: application/zip
Size: 11766 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170122/702f2dd7/attachment-0003.zip>


More information about the petsc-users mailing list