Commit e1608a22 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Now the handle of old libraries is correct.

parent 40585317
......@@ -134,11 +134,16 @@ const char *compiler_version(void) {
const char *mpi_version(void) {
static char version[256] = {0};
#ifdef WITH_MPI
static char lib_version[MPI_MAX_LIBRARY_VERSION_STRING] = {0};
int len, std_version, std_subversion;
MPI_Get_library_lib_version(version, &len);
#ifdef MPI_MAX_LIBRARY_VERSION_STRING
static char lib_version[MPI_MAX_LIBRARY_VERSION_STRING] = {0};
MPI_Get_library_version(lib_version, &len);
#else
static char lib_version[256] = {0};
sprintf(lib_version, "Unknow library");
#endif
MPI_Get_version(&std_version, &std_subversion);
sprintf("%s (standard v %i.%i)", lib_version, std_version, std_subversion);
sprintf(version, "%s (standard v %i.%i)", lib_version, std_version, std_subversion);
#else
sprintf(version, "Code was not compiled with MPI support");
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment