- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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: libmpichf90nc.so.2: cannot open shared object file: No such file or directory
with a-mpi.out. It seems the library libmpichf90nc.so.2 is needed for run using MPI. When he tested the binary again with the library libmpichf90nc.so.2 provided by me, he got another different error message
'a_mpi.out: error while loading shared libraries: libmpichf90nc.so.2: invalid ELF header'
Can you kindly help me out of the problem?
Thanks a lot!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thnaks for the reply, Tim!
Both machines have 64bit Linux, but of different distro. One is scientific, the other is Ubunto.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, Tim! I will have a check tomorrow as I cannot get access to the Linux machine today.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page