Posts

Showing posts from August, 2019

OpenMPI and MPI4py installation instructions for Ubuntu 16.04.

The instructions are to install MPI4Py by building from source. MPI4Py requires OpenMPI or similar mpicc compiler wrapper. So let us first install OpenMPI. For that, download the installation files first. wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.0.tar.gz Extract the file and open it. tar -zxf openmpi-3.1.0.tar.gz cd openmpi-3.1.0/ Configure the installation files by running the following code: ./configure --prefix="/home/$USER/.openmpi" Now, we can make and install the files. sudo make -j4 sudo make install If there are no errors, OpenMPI is successfully installed. To get the env paths linked correctly, include the following in the .bashrc file. export PATH="$PATH:/home/$USER/.openmpi/bin" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/" Run source ~/.bashrc to make the changes available in current session. Confirm that OpenMPI is successfully installed run: mpiexec -V This will print y