Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static compilation of MCNP5 with MPI included #23

Open
makeclean opened this issue Apr 25, 2013 · 1 comment
Open

Static compilation of MCNP5 with MPI included #23

makeclean opened this issue Apr 25, 2013 · 1 comment

Comments

@makeclean
Copy link
Contributor

Currently I can compile MCNP5 statically on CHTC, which works well. However static compilation of the parallel version is proving somewhat more complex. Even when compiling against either mpich2.1 or openmpi-1.6.4 leads to currently non-functioning executables.

For OpenMPI

/home/davisa/compilation/gcc-4.5.1/bin/gfortran dotcomm/src/*.o dagmc/*.o 
src/*.o -o mcnp5.mpi -static -lstdc++ -L/home/davisa/dagmc/moab/lib/  
-static -ldagmc -L/home/davisa/dagmc/moab/lib -static -lMOAB -dagmc 
-L/home/davisa/dagmc/hdf5/lib -static -lhdf5 
-L/home/davisa/compilation/gcc-4.5.1/lib64/ -static -lgfortran -static 
-lstdc++ -static -lz -L/home/davisa/dagmc/mcnp5src/Source/dotcomm/src/ 
-static -ldotcomm -L/home/davisa/compilation/openmpi-1.6.4/lib -lmpi 
-pthread -ldl -lrt -lutil

For Mpich-2.1

/home/davisa/compilation/gcc-4.5.1/bin/gfortran dotcomm/src/*.o dagmc/*.o 
src/*.o -o mcnp5.mpi -static -lstdc++ -L/home/davisa/dagmc/moab/lib/  
-static -ldagmc -L/home/davisa/dagmc/moab/lib -static -lMOAB -dagmc 
-L/home/davisa/dagmc/hdf5/lib -static -lhdf5 
-L/home/davisa/compilation/gcc-4.5.1/lib64/ -static -lgfortran -static 
-lstdc++ -static -lz -L/home/davisa/dagmc/mcnp5src/Source/dotcomm/src/ 
-static -ldotcomm -L/home/davisa/compilation/mpich-2.1/lib/ -static
 -lmpich -static -pthread -static -lmpl

When running these executables we get nothing but segfaults, when linking a message appears irrespective of either link command,

warning: Using 'gethostbyname' in statically linked applications requires at runtime the     
shared libraries from the glibc version used for linking

I am currently trying to get this to run.

@gonuke
Copy link
Member

gonuke commented Apr 25, 2013

I think I understand this link warning and it seems like a fundamental thing to include sysadmin staff with...

Seems that static linking to libc is probably never possible and version mismatches will be deadly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants