Open MPI logo

MPI_Get_library_version(3) man page (version 5.0.0rc2)

  |   Home   |   Support   |   FAQ   |  

« Return to documentation listing

Table of Contents

Name

C]MPI_Get_library_versionR] - Returns a string of the current Open MPI version

Syntax

C Syntax



C]#include <mpi.h>int MPI_Get_library_version(char *version, int *resultlen)R]Fortran Syntax



C]USE MPI! or the older form: INCLUDE [aq]mpif.h[aq]MPI_GET_LIBRARY_VERSION(VERSION, RESULTLEN, IERROR) CHARACTER*(*) NAME INTEGER RESULTLEN, IERRORR]Fortran 2008 Syntax



C]USE mpi_f08MPI_Get_library_version(version, resulten, ierror) CHARACTER(LEN=MPI_MAX_LIBRARY_VERSION_STRING), INTENT(OUT) :: version INTEGER, INTENT(OUT) :: resultlen INTEGER, OPTIONAL, INTENT(OUT) :: ierrorR]Output Parameters

[bu]
C]versionR] : A string containing the Open MPI version (string).
[bu]
C]resultlenR] : Length (in characters) of result returned in C]versionR] (integer).
[bu]
C]IERRORR] : Fortran only: Error status (integer).

Description

This routine returns a string representing the C]versionR] of the MPI library. The C]versionR] argument is a character string for maximum flexibility.

The number of characters actually written is returned in the output argument, C]resultlenR]. In C, a ‘0’ character is additionally stored at C]version[resultlen]R]. The C]resultlenR] cannot be larger than (C]MPI_MAX_LIBRARY_VERSION_STRINGR] - 1). In Fortran, C]versionR] is padded on the right with blank characters. The C]resultlenR] cannot be larger than C]MPI_MAX_LIBRARY_VERSION_STRINGR].

Note

The C]versionR] string that is passed must be at least C]MPI_MAX_LIBRARY_VERSION_STRINGR] characters long.

C]MPI_Get_library_versionR] is one of the few functions that can be called before C]MPI_InitR] and after C]MPI_Finalize.R]

Errors

Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument.

Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with C]MPI_Comm_set_errhandlerR]; the predefined error handler C]MPI_ERRORS_RETURNR] may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.

See Also

C]MPI_Get_versionR](3)


Table of Contents

« Return to documentation listing