I am an extremely novice user of MPI and its relatives. On the node that I have access to at my institution, MPI is installed, but I would like to know what version I have.
From this old question, an answer suggests trying:
mpiexec --version
But when I try this, I get this error message:
invalid "local" arg: --version
usage:
mpiexec [-h or -help or --help]    # get this message
mpiexec -file filename             # (or -f) filename contains XML job description
mpiexec [global args] [local args] executable [args]
Having said this, I am not completely sure that I have MPICH.  I may instead have OpenMPI.  But I do, I think, have MPICH because I ran ldd on my program, and the output included references to libmpich.so, which an answer to this old question says is indicative of MPICH rather than OpenMPI.
Do you have any ideas of how I can extract the version of MPI that I am using?
Addendum
Another answer on that old question says to try:
mpicc -v
I have tried this, and I get this output:
mpicc for MPICH2 version 1.2.1p1
Using built-in specs.
Target: x86_64-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
So I guess I have MPICH2 version 1.2.1p1.  But can I know from this that for sure that MPICH2 version 1.2.1p1 is currently installed?  Or could it be that mpicc was configured with MPICH2 version 1.2.1p1 and now a different version of MPI could be installed?