[mpich-discuss] How to get MPI version?

ddkrause ddkrause at uni-bonn.de
Thu Sep 25 01:24:47 CDT 2008


Luiz Carlos da Costa Junior wrote:
> Hi,
>
> I have an application, first implemented by the time of MPI1 standard
> and now also upgraded to MPI2.
> This application uses simple MPI functions (the MPI1 standard still
> works for it).
>
> Despite the fact that I should upgrade every instances of this
> applications to MPICH2, just one modification was needed in order to
> upgrade to MPI2.
> In this way, I would like to make my code portable along the 2 versions.
>
> Is there any function that returns the version of MPI standard (1 or
> 2) that I can use (in the 2 standards)?
>
> Thanks in advance,
> Luiz//
Hi,

you can use MPI_Get_version (a function) or the macros/parameters
MPI_VERSION, MPI_SUBVERSION.

Unfortunately, I faced a lot of problems with these functions in my
codes: Though most vendor MPI implementations claim to be MPI-2
conformant, the most aren't (in most cases the process management is not
fully implemented since the schedulers do not support process spawning
anyway). For this reason MPI_VERSION will be 1 even though MPI-2
features such as Parallel-I/O, 1-sided communication are supported.

Best regards,
Dorian




More information about the mpich-discuss mailing list