Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the size of partial shared malloc tests.
[simgrid.git] / teshsuite / smpi / mpich3-test / init / version.c
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *
4  *  (C) 2003 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 int main(int argc, char *argv[])
12 {
13     int errs = 0;
14     int majversion, subversion;
15
16     MTest_Init(&argc, &argv);
17
18     MPI_Get_version(&majversion, &subversion);
19     if (majversion != MPI_VERSION) {
20         errs++;
21         printf("Major version is %d but is %d in the mpi.h file\n", majversion, MPI_VERSION);
22     }
23     if (subversion != MPI_SUBVERSION) {
24         errs++;
25         printf("Minor version is %d but is %d in the mpi.h file\n", subversion, MPI_SUBVERSION);
26     }
27
28     MTest_Finalize(errs);
29     MPI_Finalize();
30     return 0;
31
32 }