Skip to content

Static compilation of MCNP5 with MPI included  #23

@makeclean

Description

@makeclean

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions