Building an MPI library : Différence entre versions

De LMDZPedia
Aller à : navigation, rechercher
(Page créée avec « There are a few freely available MPI libraries around; among the most widely spread are the OpenMPI and MPICH libraries == Checking if you have an Fortran enabled MPI lib... »)
 
Ligne 22 : Ligne 22 :
 
make all install
 
make all install
 
</syntaxhighlight>
 
</syntaxhighlight>
To check that the install went well check that...
+
To check that the install went well check that
 +
<syntaxhighlight lang="bash">
 +
$PATH_OPENMPI/openmpi-1.10.3/bin/mpif90 -V
 +
</syntaxhighlight>
 +
returns something meaninful
  
 
== Worth knowing about ==
 
== Worth knowing about ==

Version du 5 janvier 2023 à 15:33

There are a few freely available MPI libraries around; among the most widely spread are the OpenMPI and MPICH libraries

Checking if you have an Fortran enabled MPI library already installed and at hand

This can easily be done by checking if the MPI wrapper mpif90 is available, i.e. that

which mpif90

returns something meaningful

Example of installing the OpenMPI library

To adapt to fit your onw needs and system specificities, obviously. In the example below the installation is done in the $HOME/LMDZ directory (for convenience this path is stored in the PATH_OPENMPI variable.

PATH_OPENMPI=$HOME/LMDZ/
mkdir -p $PATH_OPENMPI
cd $PATH_OPENMPI
wget https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.3.tar.gz
gunzip openmpi-1.10.3.tar.gz 
tar xvf openmpi-1.10.3.tar 
cd openmpi-1.10.3
./configure --prefix $PATH_OPENMPI/openmpi-1.10.3
make all install

To check that the install went well check that

$PATH_OPENMPI/openmpi-1.10.3/bin/mpif90 -V

returns something meaninful

Worth knowing about

...

03/01/2022