How do I check the version of MPICH?
Asked Answered
O

5

19

As stated in the question, what is the command that lists the current version of MPICH? I am running CentOS.

Organism answered 28/6, 2013 at 3:33 Comment(4)
Try reading the man pages. My preferred first guess would be $prog --version where $prog is whatever name you call MPICH with.Oedema
When I do man mpich it says "No manual entry for mpich"Organism
Did you install the documentation packages? Is mpich the command you use? Then I would try mpich -v, mpich --version or even mpich --help to find out more.Oedema
I can understand the confusion. MPICH (along with all other implementation of MPI) does not generate an executable called mpich, but instead create mpirun/mpiexec/lot of other things, none of which are named mpich.Arch
A
20

The command you run to start your application with MPICH is mpiexec, so the way to check the version is:

mpiexec --version
Arch answered 28/6, 2013 at 13:14 Comment(5)
If you're unfamiliar with how to use MPI (or MPICH specifically), there's lots of good websites where you can find tutorials. For the specifics of how to compile and run your program, start with the README inside the MPICH src directory. If you installed from a package manager (like yum, apt-get, brew, etc.) you can find that information at the MPICH website: mpich.org/documentation/guidesArch
invalid "local" arg: --versionTijuanatike
@Mr_and_Mrs_D, which MPI implementation are you using that doesn't support --version?Arch
The one installed in the linux labs at school - i.e. not sure :) See my answer belowTijuanatike
This could give you openmpi version if both are installed. So the answers below should perhaps be preferred.Curculio
R
7

I find that mpichversion, which is found in the directory as mpicc, provides very useful information. For example, on my laptop, it displays:

$ mpichversion
MPICH Version:      3.2b1
MPICH Release date: unreleased development copy
MPICH Device:       ch3:nemesis
MPICH configure:    CC=gcc-4.9 CXX=g++-4.9 FC=gfortran-4.9 F77=gfortran-4.9 
                    --enable-cxx --enable-fortran --enable-threads=runtime 
                    --enable-g=dbg --with-pm=hydra 
                    --prefix=/opt/mpich/dev/gcc/default 
                    --enable-wrapper-rpath --enable-static --enable-shared
MPICH CC:   gcc-4.9    -g -O2
MPICH CXX:  g++-4.9   -g -O2
MPICH F77:  gfortran-4.9   -g -O2
MPICH FC:   gfortran-4.9   -g -O2

Note that I reformatted the output slightly (I added whitespace, nothing else) so that it would fit nicely into the fixed column format without requiring a slider.

Note that this provides less information than the previously suggested mpiexec --version, but the configure flags are given in a slightly less useful format, at least for my purposes (copy-and-paste into new configure invocation).

$ mpiexec --version
HYDRA build details:
    Version:                                 3.2b1
    Release Date:                            unreleased development copy
    CC:                              gcc-4.9    
    CXX:                             g++-4.9    
    F77:                             gfortran-4.9   
    F90:                             gfortran-4.9   
    Configure options:                       '--disable-option-checking' '--prefix=/opt/mpich/dev/gcc/default' 'CC=gcc-4.9' 'CXX=g++-4.9' 'FC=gfortran-4.9' 'F77=gfortran-4.9' '--enable-cxx' '--enable-fortran' '--enable-threads=runtime' '--enable-g=dbg' '--with-pm=hydra' '--enable-wrapper-rpath' '--enable-static' '--enable-shared' '--cache-file=/dev/null' '--srcdir=../../../../src/pm/hydra' 'CFLAGS= -g -O2' 'LDFLAGS= ' 'LIBS=-lpthread ' 'CPPFLAGS= -I/Users/jrhammon/Work/MPI/MPICH/git/build/src/mpl/include -I/Users/jrhammon/Work/MPI/MPICH/git/src/mpl/include -I/Users/jrhammon/Work/MPI/MPICH/git/src/openpa/src -I/Users/jrhammon/Work/MPI/MPICH/git/build/src/openpa/src -D_REENTRANT -I/Users/jrhammon/Work/MPI/MPICH/git/build/src/mpi/romio/include'
    Process Manager:                         pmi
    Launchers available:                     ssh rsh fork slurm ll lsf sge manual persist
    Topology libraries available:            hwloc
    Resource management kernels available:   user slurm ll lsf sge pbs cobalt
    Checkpointing libraries available:       
    Demux engines available:                 poll select

(I did not reformat this output.)

One benefit of mpichversion is that, because it is specific to MPICH (and possibly some MPICH derivatives), you can write a more specific parser for it. I do not know what, if any, information is available from mpiexec --version for OpenMPI or other non-MPICH MPI implementations.

Roundworm answered 6/4, 2015 at 21:4 Comment(1)
That should be the accepted answerOesophagus
T
6

Well for me it was mpicc -v

mpicc for 1.1.1p1
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)

HTH

Tijuanatike answered 8/7, 2013 at 20:2 Comment(1)
Wow. That looks like an unbelievably old version of MPICH. It's true that it's different for every implementation, but for recent versions of MPICH and Open MPI and all of their derivatives, you should be able to just say mpiexec --version. As an example, if you say mpicc -v on a relatively recent version of Open MPI (1.4.3), you get the version info for GCC because the arguments just get passed through. On MPICH, you'd still see the version information for MPICH because it grabs that flag.Arch
O
2

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.el6
Size        : 3.7 M
Repo        : base
...

shows the relevant section on my machine. Repo : base would be Repo : installed for the version you have installed.

Or you can check mpirun or mpiexec:

$> mpirun --version
mpirun (Open MPI) 1.6.3
Opulence answered 28/6, 2013 at 7:50 Comment(1)
Just a quick note here, the most recent version of MPICH is no longer called MPICH2, just MPICH. Some package managers will still have the old name, but more recent updates might not match up.Arch
C
2

There is a string called MPICH_VERSION in mpi.h that is set to the version. Cray, for example, provides their own application launcher so there isn't the standard set of executables already mentioned for querying the MPICH version.

Cavein answered 14/9, 2015 at 17:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.