In order to cope with changes to the MPI Standard, there are both compile-time and run-time ways to determine which version of the standard is in use in the environment one is using.
The ``version'' will be represented by two separate integers, for the version
and subversion: In C and C++,
#define MPI_VERSION 2
#define MPI_SUBVERSION 1
in Fortran,
INTEGER MPI_VERSION, MPI_SUBVERSION
PARAMETER (MPI_VERSION = 2)
PARAMETER (MPI_SUBVERSION = 1)
For runtime determination,
| MPI_GET_VERSION( version, subversion ) | |
| OUT version | version number (integer) |
| OUT subversion | subversion number (integer) |
int MPI_Get_version(int *version, int *subversion)
MPI_GET_VERSION(VERSION, SUBVERSION, IERROR)
MPI_GET_VERSION is one of the few functions that can be called
before MPI_INIT and after MPI_FINALIZE.
Valid ( MPI_VERSION, MPI_SUBVERSION) pairs in
this and previous versions of the MPI standard are
(2,1), (2,0), and (1,2).
INTEGER VERSION, SUBVERSION, IERROR
void MPI::Get_version(int& version, int& subversion)
![]()
![]()
![]()
Up: Implementation Information
Next: Environmental Inquiries
Previous: Implementation Information
Return to MPI-2.1 Standard Index
Return to MPI Forum Home Page
MPI-2.0 of July 1, 2008
HTML Generated on July 6, 2008