Search code examples
mpicluster-computingopenmpirocks

How to run an external library into different nodes?[MPI]


I need to write a C MPI code that use many functions of a library (specifically, it's Parasail), but my cluster has three different processors, a front-end with Intel Xeon, 16 nodes with Intel i3 and 8 nodes with Intel Pentium-D. How Should I compile this library and write the c code to run in all my 24 nodes?

I use OpenMPI and Rocks distribution.

Thanks in advance.


Solution

  • You have several options, and some are compiler dependent :

    1. build a library specifically for the Pentium-D (since ISA is backward compatible)
    2. build a "fat binary", this is a single binary optimized for several architectures. it is bigger, but run efficiently everywhere
    3. build one optimized and shared library per architecture and install it on the local filesystem of all the nodes, so each node will automagically use the one that fits best

    That being said, keep it mind most MPI applications run at the speed of the slowest node, so generally speaking, running an MPI app on both old and new hardware is suboptimal.