HPC/Applications/impi: Difference between revisions

From CNM Wiki
Jump to navigation Jump to search
m (Stern moved page HPC/Modules/impi to HPC/Applications/impi)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
== Introduction ==
== Introduction ==
Intel-MPI is based on MPICH2 and provides an MPICH2 runtime environment for precompiled binaries.
Intel-MPI is based on MPICH2 and provides an MPICH2 runtime environment for precompiled binaries.
; See also:
* [http://software.intel.com/en-us/articles/intel-mpi-library/ Vendor product overview]
* [[HPC/Carbon Cluster - Development tools#MPI]]
* [http://software.intel.com/en-us/articles/intel-mpi-library-documentation/ Full documentation]


== Process manager ==
== Process manager ==
Line 16: Line 17:


== IMPI vs. OpenMPI ==
== IMPI vs. OpenMPI ==
The [[../#openmpi|'''openmpi''']] and [[../#impi|'''impi''']] modules can '''coexist at runtime''' if:
Since the openmpi module is loaded by default, use the following instead of <code>module load impi</code>:
* impi is loaded first and is called using <code>mpiexec.hydra</code>.
module '''switch''' openmpi impi
* openmpi is loaded second and is called using <code>mpirun</code>.
However, the modules can '''coexist at runtime''' if:
* [[../#impi|'''impi''']] is loaded first and is called using <code>mpiexec.hydra</code>.
* [[../#openmpi|'''openmpi''']] is loaded second and is called using <code>mpirun</code>.
* binaries using impi are ''statically linked'', i.e.,
* binaries using impi are ''statically linked'', i.e.,
  ldd ''binary-using-impi'' | grep libmpi.so || echo OK
  ldd ''binary-using-impi'' | grep libmpi.so || echo OK
: prints "OK".
: prints "OK".
* you don't attempt to compile software using the convenience wrappers like <code>mpicc, mpif90,</code> etc. For these wrappers, the last module loaded will be active. It may be possible to use full paths like <code>$IMPI_HOME/bin/mpif90</code>, but this has not been tested fully.
* you don't attempt to compile software using the convenience wrappers like <code>mpicc, mpif90,</code> etc. For these wrappers, the last module loaded will be active. It may be possible to use full paths like <code>$IMPI_HOME/bin/mpif90</code>, but this has not been tested fully.
: Since openmpi is loaded by default, use the following sequence in ~/.bashrc:
: To load impi in addition to keeping openmpi, use the following sequence in ~/.bashrc:
  module unload openmpi
  module unload openmpi
  module load impi
  module load impi
  module load openmpi
  module load openmpi
; Caveat: This replaces possibly specific existing openmpi versions by the default version, which may break packages depending on it.
; Caveat: This replaces possibly specific existing openmpi versions by the default version, which may break packages depending on it.
 
; Why not load both modules by default?:
=== Work-in-progress: Evaluation if both modules can be loaded by default ===
: While many files in those distributions differ and thus could coexist, key scripts and libraries use the same name, in particular the following:
* Probably not possible in general, because the following scripts and dynamic libraries overlap:
  (cd $OMPI_HOME; ls -1 {bin,lib}/* ) > /tmp/ompi
  (cd $OMPI_HOME; ls -1 {bin,lib}/* ) > /tmp/ompi
  (cd $IMPI_HOME; ls -1 {bin,lib}/* ) > /tmp/impi
  (cd $IMPI_HOME; ls -1 {bin,lib}/* ) > /tmp/impi

Latest revision as of 15:21, June 25, 2013

Introduction

Intel-MPI is based on MPICH2 and provides an MPICH2 runtime environment for precompiled binaries.

Process manager

Use the Hydra process manager (new since impi version 4.x). See sec. 2.4 Scalable Process Management System in the Reference Manual. To do so, simply use mpiexec.hydra instead of the customary mpirun or mpiexec calls:

 mpiexec.hydra \
	-machinefile  $PBS_NODEFILE \
	-np $(wc -l < $PBS_NODEFILE) \
	./a.out

With Hydra, you no longer need to set up and tear down the older and considerably less stable MPD manager.

IMPI vs. OpenMPI

Since the openmpi module is loaded by default, use the following instead of module load impi:

module switch openmpi impi

However, the modules can coexist at runtime if:

  • impi is loaded first and is called using mpiexec.hydra.
  • openmpi is loaded second and is called using mpirun.
  • binaries using impi are statically linked, i.e.,
ldd binary-using-impi | grep libmpi.so || echo OK
prints "OK".
  • you don't attempt to compile software using the convenience wrappers like mpicc, mpif90, etc. For these wrappers, the last module loaded will be active. It may be possible to use full paths like $IMPI_HOME/bin/mpif90, but this has not been tested fully.
To load impi in addition to keeping openmpi, use the following sequence in ~/.bashrc:
module unload openmpi
module load impi
module load openmpi
Caveat
This replaces possibly specific existing openmpi versions by the default version, which may break packages depending on it.
Why not load both modules by default?
While many files in those distributions differ and thus could coexist, key scripts and libraries use the same name, in particular the following:
(cd $OMPI_HOME; ls -1 {bin,lib}/* ) > /tmp/ompi
(cd $IMPI_HOME; ls -1 {bin,lib}/* ) > /tmp/impi
comm -1 -2 /tmp/?mpi
rm /tmp/?mpi
bin/mpicc
bin/mpicxx
bin/mpiexec
bin/mpif77
bin/mpif90
bin/mpirun
lib/libmpi.so