The debugger shows the segfault ends up at misaligned_stack_error_entering_dyld_stub_binder() Here is the discussion of this issue on the libmesh-devel mailing list: http://www.mail-archive.com/[email protected]/msg04078.htm... The only time I get this segfaulting in building/testing PyLith is within netcdf routines. This same error occurs in the nctest for both 4.1.3 and 4.2.1. Building netcdf with the same gcc compilers works fine, but when I build netcdf with mpicc, I get this segfaults in the nctest. When I remove the flat_namespace link flag from mpicc, mpicxx, etc, these segfaults are gone. This started happening when I moved from a laptop running OSX 10.6 to a laptop running 10.8. Brad On 4/12/13 11:08 AM, Matthew Knepley wrote:
From Brad:
* mpich linking flags are broken/fragile for Lion and Mountain Lion
mpich wants to add -flat_namespace to the linking flags. I think this is based on --enable-shared-libs=osx-gcc. The flat_namespace doesn't work in many cases on Lion and Mountain Lion-- it caused dynamic library loading to fail for netcdf, resulting in odd segmentation faults. It took me a long time to figure this one out. I finally found an email chain in the libmesh mailing list discussing this problem. I am not quite sure how PETSc handles building mpich on Lion and Mountain Lion. It may be extremely fragile in that other things built with the mpich compilers may segfault when loading dynamic libraries.
I fixed this by simply removing the flat_namespace flag from the mpicc, mpicxx, mpif90, mpif77 scripts after installing mpich but before using it.
Matt
-- 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