SlideShare a Scribd company logo
3
Most read
4
Most read
5
Most read
Installation of
OpenMPI
Parallel and Distributed
Programming
Granada's University LSI Departement
By:
Daniel Guerrero Martínez
Sergio Rodríguez Lumley
1
Index of content
Installation of OpenMPI.......................................................................................................................3
Quick install for Ubuntu (Debian, Linux/Unix)..............................................................................3
Manual install for any linux distribution.........................................................................................4
Some common errors.......................................................................................................................5
2
Installation of OpenMPI
Open MPI is an open source MPI-2 implementation that is developed and maintained by a
consortium of academic, research, and industry partners. Open MPI is therefore able to combine the
expertise, technologies, and resources from all across the High Performance Computing community
in order to build the best MPI library available.
You can download the last version from it's official page:
http://www.open-mpi.org/
Prerequisites:
• It is necessary to have installed a C/C++ compiler before installing OpenMPI. Installing this
on Ubuntu by package manager will automatically resolve this problem.
• It is necessary to have the “make” utility for manual installation.
Quick install for Ubuntu (Debian, Linux/Unix)
Here we will explain how to install it only for Ubuntu and similar OS. If you don't use it or you are
not sure, please consider the next step, the manual installation. Necessary packages are:
openmpi-bin: Parallel code executor program (mpirun).
Installs: openmpi-common libopenmpi1.3
openssh-client, openssh-server: Communicating programs (control and presentation routines)
between processes.
libopenmpi-dbg: Debug information generator for MPI.
libopenmpi-dev: Necessary to develop parallel programs based on MPI (mpicc command...).
Quick command:
sudo apt-get install openmpi-bin openmpi-common openssh-client openssh-server libopenmpi1.3
libopenmpi-dbg libopenmpi-dev
Please note that if you are using Ubuntu, it will automatically install a C/C++ compiler, and it will
check for compatibilities and installed components.
3
Manual install for any linux distribution
Start downloading the last version of OpenMPI from it's official page:
http://www.open-mpi.org/software/ompi
Here you'll be able to downlad a version on tar.gz, tar.bz2 or on rpm. If your system supports rpm
this is the package you should download, if this is the case, you'll only have to install it without any
of the following steps (usually double-clicking).
If your system does not support rmp, follow the next steps:
1. Decompress the downloaded file (should be called something like openmpi-x.x.x.tar.xxx,
changing x.x.x for the version downloaded):
tar -xvf openmpi-*
2. Go into the new folder created from the decompress.
cd openmpi-*
3. Configure the installation file (making use of the superuser privileges of your system) and
start preparing a cup of coffee, because this task usually takes between 5 and 10
minutes.
It is necessary to add on the prefix the installation directory we want to use for OpenMPI.
The normal thing to do would be to select the next directory “/home/<user>/.openmpi”.
./configure --prefix="/home/$USER/.openmpi"
4. Now is the time for the hard work, install it. For it, we'll make use of the “make” tool. This
is a good moment for the coffee, this should take between 10 and 15 minutes, so let it
work.
make
sudo make install
5. All that is left to do is to include the path to our path environment the path
“installation_directory/bin” and to the library environment variable
“installation_directory/lib/”. If your system uses bash you'll have to use the command
export.
export PATH="$PATH:/home/$USER/.openmpi/bin"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/"
1. If you want the exportation to be effective for the next sessions and terminals, you'll
have to write the exports in the environment variable's file. By default it should be
“/home/<user>/.bashrc” for bash users.
echo export PATH="$PATH:/home/$USER/.openmpi/bin" >> /home/$USER/.bashrc
echo export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/"
>> /home/$USER/.bashrc
4
If everything went Ok, when you run the command mpirun it'll show the “how to use” message, the
same for mpicc.
Some common errors
• “I'm on an Ubuntu modern system or compatible and when I run the quick command to
install it says it doesn't find openmpi-lib”
If you are sure your OS should have this package, the error is surely because you don't have your
repositories updated. A way of doing this is, if you are using “apt” (Advanced Packaging Tool),
running the next command:
sudo apt-get update
• “On step 3, configure gave me an error.”
If the error it gave is something like the next:
Figura 1. Error de compilador.
This is because you don't have installed any compiler. It's necessary to install all the compilers we
want to use before installing OpenMPI. To use it with C and C++, we strongly recommend GNU
gcc/g++ compiler version 4.4 or superior.
• “When I run the command MPIRUN or MPICC an error tells me that no file was found”
Please make sure the environmental variables configuration (Step 5 on manual installation). In case
you made tha automatic installation, we recommend to restart the computer, if this doesn't work,
you can always do step 5 manually. By default the paths are “/usr/include/openmpi/” for PATH and
“/usr/lib/openmpi/lib” for LD_LIBRARY_PATH).
5

More Related Content

PDF
Testing The Effectiveness Of AppArmor
PDF
Project 2 how to install and compile os161
PDF
Guide to alfresco monitoring
PDF
Cloud Services On UI and Ideas for Federated Cloud on idREN
PDF
presentation
KEY
OpenMP
PPTX
Intro to OpenMP
PDF
Intel® MPI Library e OpenMP* - Intel Software Conference 2013
Testing The Effectiveness Of AppArmor
Project 2 how to install and compile os161
Guide to alfresco monitoring
Cloud Services On UI and Ideas for Federated Cloud on idREN
presentation
OpenMP
Intro to OpenMP
Intel® MPI Library e OpenMP* - Intel Software Conference 2013

Viewers also liked (19)

PDF
MPI Presentation
PDF
LAC2013 Day 04 - Air Resistance Part I
PDF
5HBC2012 1104 LaGrange Error Term
PDF
Lab06: Iterations Java Boot Camp!
PDF
5HBC2012 11-02 Power Series Short Cuts!
PDF
CHAP09.4RS
PDF
Ncshs student application form
PDF
Life aftercalcday3
PDF
5HBC2012 904 Variable Separable DiffEqus!
PDF
Life aftercalcday8
PDF
5H2012 UNIT11 Power Series!
PDF
Life aftercalcday1
PDF
UNIT05.bcs
PDF
Life aftercalcday5
PDF
UNIT05.BCS
PDF
LAC2013 Day 02 Hooke's Law Part I
PDF
Life aftercalcday4
PDF
LAC2013 UNIT preTESTs!
PDF
Life aftercalcday2
MPI Presentation
LAC2013 Day 04 - Air Resistance Part I
5HBC2012 1104 LaGrange Error Term
Lab06: Iterations Java Boot Camp!
5HBC2012 11-02 Power Series Short Cuts!
CHAP09.4RS
Ncshs student application form
Life aftercalcday3
5HBC2012 904 Variable Separable DiffEqus!
Life aftercalcday8
5H2012 UNIT11 Power Series!
Life aftercalcday1
UNIT05.bcs
Life aftercalcday5
UNIT05.BCS
LAC2013 Day 02 Hooke's Law Part I
Life aftercalcday4
LAC2013 UNIT preTESTs!
Life aftercalcday2
Ad

Similar to HowTo Install openMPI on Ubuntu (20)

PPTX
Message Passing Interface (MPI)-A means of machine communication
PDF
Complete MPICH2 Clustering Manual in Ubuntu
PDF
High Performance Computing using MPI
PDF
Parallel programming c++ win10 msmpi visual studio
PPT
What is [Open] MPI?
PPTX
Introduction to MPI Basics easy way.pptx
PPT
Introduction to MPI
PPTX
Open MPI SC'15 State of the Union BOF
PDF
MPI - 1
PDF
Advanced MPI
PPT
Parallel computing(2)
PPTX
Distributed Memory Programming with MPI
PDF
Advanced Scalable Decomposition Method with MPICH Environment for HPC
PDF
Open MPI State of the Union X SC'16 BOF
PDF
“Programação paralela híbrida com MPI e OpenMP – uma abordagem prática”. Edua...
PDF
PPT
PDF
PPT
Lecture9
Message Passing Interface (MPI)-A means of machine communication
Complete MPICH2 Clustering Manual in Ubuntu
High Performance Computing using MPI
Parallel programming c++ win10 msmpi visual studio
What is [Open] MPI?
Introduction to MPI Basics easy way.pptx
Introduction to MPI
Open MPI SC'15 State of the Union BOF
MPI - 1
Advanced MPI
Parallel computing(2)
Distributed Memory Programming with MPI
Advanced Scalable Decomposition Method with MPICH Environment for HPC
Open MPI State of the Union X SC'16 BOF
“Programação paralela híbrida com MPI e OpenMP – uma abordagem prática”. Edua...
Lecture9
Ad

More from A Jorge Garcia (20)

PDF
LIMACON 2023 Brochure
PDF
2022-RESUME-NEW
PDF
MAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAY
PDF
MAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAY
PDF
MAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAY
PDF
MAT122 DAY308 Lesson 26 of 45
PDF
MAT122 DAY307 Lesson 25 of 45
PDF
MAT122 DAY306 Lesson 24 of 45
PDF
MAT122 DAY305 Lesson 23 of 45
PDF
MAT122 DAY304 Lesson 22 of 45
PDF
MAT122 DAY303 Lesson 21 of 45
PDF
MAT122 DAY302 Lesson 20 of 45
PDF
MAT122 DAY301 Lesson 19 of 45
PDF
MAT122 DAY205
PDF
MAT122 DAY204
PDF
MAT122 DAY203
PDF
MAT122 DAY202
PDF
MAT122 DAY201
PDF
MAT122 DAY06
PDF
MAT122 DAY05
LIMACON 2023 Brochure
2022-RESUME-NEW
MAT122 DAY508 MEETING 44 of 45 2021.1217 FRIDAY
MAT122 DAY507 MEETING 43 of 45 2021.1216 THURSDAY
MAT122 DAY506 MEETING 42 of 45 2021.1215 WEDNESDAY
MAT122 DAY308 Lesson 26 of 45
MAT122 DAY307 Lesson 25 of 45
MAT122 DAY306 Lesson 24 of 45
MAT122 DAY305 Lesson 23 of 45
MAT122 DAY304 Lesson 22 of 45
MAT122 DAY303 Lesson 21 of 45
MAT122 DAY302 Lesson 20 of 45
MAT122 DAY301 Lesson 19 of 45
MAT122 DAY205
MAT122 DAY204
MAT122 DAY203
MAT122 DAY202
MAT122 DAY201
MAT122 DAY06
MAT122 DAY05

Recently uploaded (20)

PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Insiders guide to clinical Medicine.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Sports Quiz easy sports quiz sports quiz
PDF
RMMM.pdf make it easy to upload and study
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Lesson notes of climatology university.
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
O5-L3 Freight Transport Ops (International) V1.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pharma ospi slides which help in ospi learning
Supply Chain Operations Speaking Notes -ICLT Program
GDM (1) (1).pptx small presentation for students
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Insiders guide to clinical Medicine.pdf
Complications of Minimal Access Surgery at WLH
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Sports Quiz easy sports quiz sports quiz
RMMM.pdf make it easy to upload and study
Abdominal Access Techniques with Prof. Dr. R K Mishra
Microbial disease of the cardiovascular and lymphatic systems
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Basic Mud Logging Guide for educational purpose
Lesson notes of climatology university.
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pre independence Education in Inndia.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...

HowTo Install openMPI on Ubuntu

  • 1. Installation of OpenMPI Parallel and Distributed Programming Granada's University LSI Departement By: Daniel Guerrero Martínez Sergio Rodríguez Lumley 1
  • 2. Index of content Installation of OpenMPI.......................................................................................................................3 Quick install for Ubuntu (Debian, Linux/Unix)..............................................................................3 Manual install for any linux distribution.........................................................................................4 Some common errors.......................................................................................................................5 2
  • 3. Installation of OpenMPI Open MPI is an open source MPI-2 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. You can download the last version from it's official page: http://www.open-mpi.org/ Prerequisites: • It is necessary to have installed a C/C++ compiler before installing OpenMPI. Installing this on Ubuntu by package manager will automatically resolve this problem. • It is necessary to have the “make” utility for manual installation. Quick install for Ubuntu (Debian, Linux/Unix) Here we will explain how to install it only for Ubuntu and similar OS. If you don't use it or you are not sure, please consider the next step, the manual installation. Necessary packages are: openmpi-bin: Parallel code executor program (mpirun). Installs: openmpi-common libopenmpi1.3 openssh-client, openssh-server: Communicating programs (control and presentation routines) between processes. libopenmpi-dbg: Debug information generator for MPI. libopenmpi-dev: Necessary to develop parallel programs based on MPI (mpicc command...). Quick command: sudo apt-get install openmpi-bin openmpi-common openssh-client openssh-server libopenmpi1.3 libopenmpi-dbg libopenmpi-dev Please note that if you are using Ubuntu, it will automatically install a C/C++ compiler, and it will check for compatibilities and installed components. 3
  • 4. Manual install for any linux distribution Start downloading the last version of OpenMPI from it's official page: http://www.open-mpi.org/software/ompi Here you'll be able to downlad a version on tar.gz, tar.bz2 or on rpm. If your system supports rpm this is the package you should download, if this is the case, you'll only have to install it without any of the following steps (usually double-clicking). If your system does not support rmp, follow the next steps: 1. Decompress the downloaded file (should be called something like openmpi-x.x.x.tar.xxx, changing x.x.x for the version downloaded): tar -xvf openmpi-* 2. Go into the new folder created from the decompress. cd openmpi-* 3. Configure the installation file (making use of the superuser privileges of your system) and start preparing a cup of coffee, because this task usually takes between 5 and 10 minutes. It is necessary to add on the prefix the installation directory we want to use for OpenMPI. The normal thing to do would be to select the next directory “/home/<user>/.openmpi”. ./configure --prefix="/home/$USER/.openmpi" 4. Now is the time for the hard work, install it. For it, we'll make use of the “make” tool. This is a good moment for the coffee, this should take between 10 and 15 minutes, so let it work. make sudo make install 5. All that is left to do is to include the path to our path environment the path “installation_directory/bin” and to the library environment variable “installation_directory/lib/”. If your system uses bash you'll have to use the command export. export PATH="$PATH:/home/$USER/.openmpi/bin" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/" 1. If you want the exportation to be effective for the next sessions and terminals, you'll have to write the exports in the environment variable's file. By default it should be “/home/<user>/.bashrc” for bash users. echo export PATH="$PATH:/home/$USER/.openmpi/bin" >> /home/$USER/.bashrc echo export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/" >> /home/$USER/.bashrc 4
  • 5. If everything went Ok, when you run the command mpirun it'll show the “how to use” message, the same for mpicc. Some common errors • “I'm on an Ubuntu modern system or compatible and when I run the quick command to install it says it doesn't find openmpi-lib” If you are sure your OS should have this package, the error is surely because you don't have your repositories updated. A way of doing this is, if you are using “apt” (Advanced Packaging Tool), running the next command: sudo apt-get update • “On step 3, configure gave me an error.” If the error it gave is something like the next: Figura 1. Error de compilador. This is because you don't have installed any compiler. It's necessary to install all the compilers we want to use before installing OpenMPI. To use it with C and C++, we strongly recommend GNU gcc/g++ compiler version 4.4 or superior. • “When I run the command MPIRUN or MPICC an error tells me that no file was found” Please make sure the environmental variables configuration (Step 5 on manual installation). In case you made tha automatic installation, we recommend to restart the computer, if this doesn't work, you can always do step 5 manually. By default the paths are “/usr/include/openmpi/” for PATH and “/usr/lib/openmpi/lib” for LD_LIBRARY_PATH). 5