Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
5b0fa1c31ee89e40373af38181fb2bd5da0f0a8c
[simgrid.git] / teshsuite / smpi / mpich3-test / info / infoenv.c
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *  (C) 2001 by Argonne National Laboratory.
4  *      See COPYRIGHT in top-level directory.
5  */
6
7 #include "mpi.h"
8 #include <stdio.h>
9
10 static int verbose = 0;
11
12 int main(int argc, char *argv[])
13 {
14     char value[MPI_MAX_INFO_VAL];
15     char *keys[] = { "command", "argv", "maxprocs", "soft", "host", "arch", "wdir", "file",
16         "thread_level", 0
17     };
18     int flag, i;
19
20     MPI_Init(NULL, NULL);
21
22     for (i = 0; keys[i]; i++) {
23         MPI_Info_get(MPI_INFO_ENV, keys[i], MPI_MAX_INFO_VAL, value, &flag);
24         if (flag && verbose)
25             printf("command: %s\n", value);
26     }
27
28     printf(" No Errors\n");
29
30     MPI_Finalize();
31     return 0;
32 }