Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
merge msg_vm.c - adrien (please note that there is one line (destruction of the tx_pr...
[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     int flag, i;
18
19     MPI_Init(NULL, NULL);
20
21     for (i = 0; keys[i]; i++) {
22         MPI_Info_get(MPI_INFO_ENV, keys[i], MPI_MAX_INFO_VAL, value, &flag);
23         if (flag && verbose)
24             printf("command: %s\n", value);
25     }
26
27     printf(" No Errors\n");
28
29     MPI_Finalize();
30     return 0;
31 }