Choosing an MPI Stack
We've seen that on Horizon you can choose from two different MPI stacks, each of which comes in several versions. However, not all of the compilers and MPI implementations are compatible with each other. If you check module spider openmpi/5.0.5, for example, you will discover that only certain versions and combinations of the GCC compilers are compatible with Open MPI 5.10.0:
Obviously, when you compile and link a parallel application, you want to use a valid combination of compiler and MPI library versions. Fortunately, though, Horizon's module system is pretty smart, and it helps keep you out of trouble. If you switch compilers, it will automatically pick a compatible MPI stack for you; if you try to switch MPI versions or implementations, it won't let you switch to one that is incompatible with your current compiler. For example:
Even better, the MPI libraries on Horizon have Application Binary Interface (ABI) compatibility. Once your code is compiled, you should be able to switch between different versions of the same MPI implementation (i.e., either Open MPI or MVAPICH-Plus) and run your application without recompiling. Still, when you run your application, it's safest to load the same pair of modules that were loaded when you compiled and linked your code; that way you can be sure that everything is consistent.
MPI for Prebuilt Applications and Libraries
Similar considerations apply to the prebuilt applications and libraries that are available through the module system. For example, running module spider parmetis/4.0.3 will show you which combinations of compiler and MPI modules will work for running that version of ParMETIS. Here again, the module system helps you stay out of trouble.
Most importantly, if you intend to link your own application against an MPI-parallel library such as PnetCDF or PHDF5, it's a good idea to run a command like module spider phdf5/2.1.1 to see the allowed combinations of compilers and MPI stacks, and adjust your build environment accordingly.
In the future, the number of possible compiler/MPI combinations may grow. There is at least one other MPI library of interest that is not yet supported on Horizon: HPC-X, the NVIDIA HPC-X Software Toolkit. If you are curious about it, you may want to try module spider to see if the situation has changed.
CVW material development is supported by NSF OAC awards 1854828, 2321040, 2323116 (UT Austin) and 2005506 (Indiana University)