MPI application portable?

MPI application portable?

Hi there,

My fortran code uses MPI, with all MPI lines prefixed with !$ for conditional compilation. Compiling the code using ifort on a Linux cluster, with command lines:

ifort -O2 -ip -ipo -inline-factor=100 -unroll-aggressive -openmp -o a.out *.f90

mpif90 -O2 -ip -ipo -inline-factor=100 -unroll-aggressive -openmp -o a-mpi.out *.f90

I got 2 binaries, a.out and a-mpi.out, which both work fine on the cluster. However, when they are tested by my colleague on his Linux machine, he had no problem with a.out, but had an error message

./a.out: error while loading shared libraries: cannot open shared object file: No such file or directory

with a-mpi.out. It seems the library is needed for run using MPI. When he tested the binary again with the library provided by me, he got another different error message

'a_mpi.out: error while loading shared libraries: invalid ELF header'

Can you kindly help me out of the problem?


Thanks a lot!

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

A fairly obvious suspect would be a different target 32/64 bit or linux mac. Attempting to support 32 bit mpi is probably more trouble than value.I

Thnaks for the reply, Tim!

Both machines have 64bit Linux, but of different distro. One is scientific, the other is Ubunto.

You should check also that ifort Intel64 and gcc [-m64] were in use throughout, both for the mpich build and for the application.

I'm not entirely certain about compatibility of .so built on scientific vs. Ubuntu.  The biggest difference is in the library paths, so if you have any of those in your build, adjustments are needed.

I wondered why you described removing MPI from your build by conditional compilation, if you are linking against MPI in the end.

Thank you very much, Tim! I will have a check tomorrow as I cannot get access to the Linux machine today.

Leave a Comment

Please sign in to add a comment. Not a member? Join today