Monday 13 April 2015

How to install and configure OpenMPI in linux

Message Passing Interface (MPI)

MPI is mostly used in High Performance Computing.The Message Passing Interface (MPI) is a library specification that allows HPC to pass information between its various nodes and clusters. Also call MPI "is a message-passing application programmer interface, It is a language-independent used to program parallel computers.

Downloading OpenMPI From here


http://www.open-mpi.org/software/ompi/v1.8/

# wget http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.4.tar.gz

# tar -xvzf openmpi-1.8.4.tar.gz

# ./configure --prefix=/opt/openmpi

# make

# make install

Setting Up Environment Variables


# vim .bashrc

export PATH=/opt/openmpi/bin:$PATH

export LD_LIBRARY_PATH=/opt/openmpi/lib:$LD_LIBRARY_PATH 

To view your path type the following command

# echo $PATH

How to run mpi program in parallel computing is mentioned below

[user@lenovo ~]$ mpirun -np 4 -hostfile hostfile ./helloworld.sh



No comments:

Post a Comment