Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

Do all dependences need to compiled using MPI if the main program needs MPI compilation?

efnacy
New Contributor I
1,159 Views

I have a program that needs to be compiled with MPI parallelization, say I am using openmpi installed using intel compilers and this program depends on external libraries.  Following the recommendation that dependencies and main programs should be compiled by the same compiler and same flags, do I then also need to compile the dependencies of my program using MPI wrappers even if their code is only serial or is it sufficient to use the underlying compiler of my openmpi (in this case the intel compilers)?

0 Kudos
1 Solution
Arjen_Markus
Honored Contributor I
1,129 Views

As MPI is a pure library, not a library and a set of compiler directives like OpenMP (no "I"), I would say that it is not necessary to recompile the external libraries, as long as they are compiled with the same compiler. What will be important is to use the same MPI environment, so in this case OpenMPI. Other MPI environments are not compatible, if I understand it correctly.

View solution in original post

6 Replies
Arjen_Markus
Honored Contributor I
1,130 Views

As MPI is a pure library, not a library and a set of compiler directives like OpenMP (no "I"), I would say that it is not necessary to recompile the external libraries, as long as they are compiled with the same compiler. What will be important is to use the same MPI environment, so in this case OpenMPI. Other MPI environments are not compatible, if I understand it correctly.

efnacy
New Contributor I
1,112 Views

You mean, only openMPI is compatible with openMP? I thought openMP and openMPI are unrelated, they just happened to have similar name. This means that if I want to combine MPI and shared-memory parallelization using openMP, my only choice for the MPI implementation would be openMPI?

0 Kudos
Steve_Lionel
Honored Contributor III
1,107 Views

They are unrelated other than by the name similarity.

JohnNichols
Valued Contributor III
1,086 Views

Excuse humour:

Brad Pitt and I have the opposite problem. 

0 Kudos
Ron_Green
Moderator
1,059 Views

External objects and libraries: as long as they make no MPI calls and are compiled with the same compiler major version: these do not have to be recompiled with the MPI wrappers.

Barbara_P_Intel
Moderator
1,049 Views

And be sure to link with the MPI driver, mpifort, to include the MPI libraries.

 

Reply