Home > other >  OpenMPI compilation
OpenMPI compilation

Time:10-13

OpenMPI 1.1 introduction
OpenMPI is a free, open source of MPI, compatible and MPI MPI - 1-2 standard, OpenMPI maintenance, which is developed by the open source community support most types of HPC platform, and has a high performance,

OpenMPI currently the latest version of OpenMPI 1.6 +, the official website: http://www.open-mpi.org/, can be downloaded from the website free OpenMPI source installation package,

1.2 installation OpenMPI
With OpenMPI 1.6.3, for example:

$tar ZXVF openmpi - 1.6.3. Tar. Gz

$CD openmpi - 1.6.3

$./configure -- prefix=/public/software/mpi/openmpi - 16 - Intel - enable - mpirun - prefix - by - the default - without - PSM CC=ICC CXX=icpc FC=ifort F77=ifort

$make -j 8 & amp; & Make install

Set the environment variable script:

Vim/public/software/profile. D/openmpi - Intel - env. Sh

#!/bin/bash

Export MPI_HOME=/public/software/mpi/openmpi - 16 - Intel

The export PATH=${MPI_HOME}/bin: ${PATH}

Export LD_LIBRARY_PATH=${MPI_HOME}/lib: ${LD_LIBRARY_PATH}

Export MANPATH=${MPI_HOME}/share/man: ${MANPATH}

T Tips:

1. Detection of OpenMPI installation will automatically compile node communication network equipment available locally, if you need support the InfiniBand network, please make sure that the node has been install OFED driver before compilation of MPI,

2. Perform OpenMPI installation directory $MPI_HOME ompi_info command under the/bin, can inquire the current OpenMPI configuration information,

1.3 compile MPI program
OpenMPI provides C/C + +, the MPI languages such as Fortran compilers, shown in the table below:

Language type MPI compiler CmpiccC++ mpicxxFortran77mpif77Fortran90mpif90

MPI is the underlying compiler compiler layer of packaging, through - show parameters can view the actual use of a compiler, for example:

$mpicc - show

The ICC - I/public/software/mpi/openmpi - 16 - Intel/include - pthread - L/public/software/mpi/openmpi - 16 - Intel/lib - lmpi - LDL - lm - lnuma - Wl, - export - dynamic - LRT LNSL - lutil

Compiler example:

$source/public/software/profile. D/openmpi - Intel - env. Sh

$mpicc - o hello hello. C

$mpif90 - o hello hello. F90

1.4 run the MPI program
OpenMPI use own OpenRTE process manager, the start command to mpirun/mpiexec/orterun, basic format is as follows:

$mpirun - np N - hostfile & lt; Filename>

? Run - np N: N processes

? - hostfile: specify the compute nodes, file format is as follows:

Node1 slots=8

2 slots=8

Slots=8 representative eight process can be performed on the node, also can write, each node1 and 2 line 8,
  • Related