<div dir="ltr">Please excuse the slightly off-topic post: but I'm pulling my hair out here and I'm hoping someone else has seen this before.<div><br></div><div>I'm calling PETSc from Julia and it's working great on my Mac with MPICH but I'm seeing a segfault on my Linux cluster using MVAPICH2.  I get the same segfault both with the "official" PETSc.jl and my own smaller wrapper MiniPETSc.jl: <a href="https://github.com/friedmud/MiniPETSc.jl">https://github.com/friedmud/MiniPETSc.jl</a></div><div><br></div><div>Here is the stack trace I'm seeing:</div><div><br></div><div><div>signal (11): Segmentation fault</div><div>while loading /home/gastdr/projects/falcon/julia_mpi.jl, in expression starting on line 5</div><div>_int_malloc at /home/gastdr/projects/falcon/root/lib/libmpi.so.12 (unknown line)</div><div>calloc at /home/gastdr/projects/falcon/root/lib/libmpi.so.12 (unknown line)</div><div>PetscOptionsCreate at /home/gastdr/projects/falcon/petsc-3.7.3/src/sys/objects/options.c:2578</div><div>PetscInitialize at /home/gastdr/projects/falcon/petsc-3.7.3/src/sys/objects/pinit.c:761</div><div>PetscInitializeNoPointers at /home/gastdr/projects/falcon/petsc-3.7.3/src/sys/objects/pinit.c:111</div><div>__init__ at /home/gastdr/.julia/v0.5/MiniPETSc/src/MiniPETSc.jl:14</div></div><div><br></div><div>The script I'm running is simply just run.jl :</div><div><br></div><div>using MiniPETSc<br></div><div><br></div><div>It feels like libmpi is not quite loaded correctly yet.  It does get loaded by MPI.jl here: <a href="https://github.com/JuliaParallel/MPI.jl/blob/master/src/MPI.jl#L29">https://github.com/JuliaParallel/MPI.jl/blob/master/src/MPI.jl#L29</a> and I've verified that that code is running before PETSc is being initialized.</div><div><br></div><div>It looks ok to me... and I've tried a few variations on that dlopen() call and nothing makes it better.</div><div><br></div><div>BTW: MPI.jl is working fine on its own.  I can write pure MPI Julia apps and run them in parallel on the cluster.  Just need to get this initialization of PETSc straightened out.</div><div><br></div><div>Thanks for any help!</div><div><br></div><div>Derek</div></div>