Skip to content

Instantly share code, notes, and snippets.

@M1ndBlast
Created November 9, 2022 03:30
Show Gist options
  • Save M1ndBlast/4396f4b93f5527fff80cedee1b055648 to your computer and use it in GitHub Desktop.
Save M1ndBlast/4396f4b93f5527fff80cedee1b055648 to your computer and use it in GitHub Desktop.
Install openmpi 4.1.4 on Ubuntu
# Updates libraries
sudo apt-get update
sudo apt-get upgrade
# Installs requerimients
sudo apt-get install g++ make
# Locate in user dir
cd ~
# Installs & unpack package
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz
gunzip -c openmpi-4.1.4.tar.gz | tar xf -
cd openmpi-4.1.4
# Installation
./configure --prefix=/usr/local
make all install
sudo apt-get install openmpi-bin libopenmpi-dev
# Removes package
cd ..
rm -rf openmpi-4.1.4
rm openmpi-4.1.4.tar.gz
# Validates installation
wget https://lsi2.ugr.es/jmantas/ppr/tutoriales/codigos/mpi/holamundo2.cpp -O 1_HolaMundo.cpp
mpiCC 1_HolaMundo.cpp -o holaMundo
mpirun -np 4 holaMundo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment