Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you check the version of OpenMPI?

Tags:

openmpi

I'm compiling my code on a server that has OpenMPI, but I need to know which version I'm on so I can read the proper documentation. Is there a constant in <mpi.h> that I can print to display my current version?

like image 987
Zak Avatar asked Apr 07 '12 17:04

Zak


People also ask

How do you check whether MPI is installed or not?

Googling tells me that the command to install MPI is sudo apt-get install libcr-dev mpich2 mpich2-doc . Enter that command. If it is already installed, it will tell you. If not, it will tell you how much data needs to be downloaded.

How do you check if I have Mpich?

Depending on your rights, you can check yum (or sudo yum ): $> yum info mpich2 ... Name : mpich2 Arch : x86_64 Version : 1.2. 1 Release : 2.3.

What is the latest version of MPI?

MPI 4.0. MPI-4.0 was approved by the MPI Forum on June 9, 2021. Because of the size, this version does not have a book version. An HTML version is under development.

Where is OpenMPI installed?

With the -- prefix option given, OpenMPI binaries are installed in the directory /usr/local/bin and shared libraries in /usr/local/lib. If you want a different installation location, replace /usr/local with your desired directory.


2 Answers

As explained in this tutorial, you may also check the MPI version running the command:

mpiexec --version 

or

mpirun --version 

in your terminal.

like image 168
Foad S. Farimani Avatar answered Oct 11 '22 07:10

Foad S. Farimani


With OpenMPI, the easiest thing to do is to run ompi_info; the first few lines will give you the information you want. In your own code, if you don't mind something OpenMPI specific, you can look at use OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, and OMPI_RELEASE_VERSION in mpi.h. That obviously won't work with MPICH2 or other MPI implementations.

More standardly, as part of MPI-3, there is a standard MPI routine called MPI_Get_library_version which gives you detailed library information at run time. This is small enough and useful enough that newer versions of MPI implementations will have this very quickly - for instance it's in the OpenMPI 1.7 development trunk - but it doesn't really help you today.

like image 35
Jonathan Dursi Avatar answered Oct 11 '22 06:10

Jonathan Dursi