Community
cancel
Showing results for 
Search instead for 
Did you mean: 
efnacy
New Contributor I
378 Views

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

Jump to solution

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)?

Tags (2)
0 Kudos
1 Solution
Arjen_Markus
Valued Contributor III
348 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
Valued Contributor III
349 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

efnacy
New Contributor I
331 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?

Steve_Lionel
Black Belt Retired Employee
326 Views

They are unrelated other than by the name similarity.

JohnNichols
Valued Contributor I
305 Views

Excuse humour:

Brad Pitt and I have the opposite problem. 

Ronald_G_Intel
Moderator
278 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
268 Views

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

 

Reply