Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / teshsuite / smpi / mpich3-test / init / library_version.c
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *
4  *  (C) 2012 by Argonne National Laboratory.
5  *      See COPYRIGHT in top-level directory.
6  */
7 #include "mpi.h"
8 #include <stdio.h>
9 #include "mpitest.h"
10
11 static int verbose = 0;
12
13 int main(int argc, char *argv[])
14 {
15     int errs = 0, resultlen = -1;
16     char version[MPI_MAX_LIBRARY_VERSION_STRING];
17
18     MTest_Init(&argc, &argv);
19
20     MPI_Get_library_version(version, &resultlen);
21     if (resultlen < 0) {
22         errs++;
23         printf("Resultlen is %d\n", resultlen);
24     }
25     else {
26         if (verbose)
27             printf("%s\n", version);
28     }
29
30     MTest_Finalize(errs);
31     MPI_Finalize();
32     return 0;
33
34 }