c90b7380c1
This commit was SVN r27012.
42 строки
730 B
C
42 строки
730 B
C
/* -*- C -*-
|
|
*
|
|
* $HEADER$
|
|
*
|
|
* The most basic of MPI applications
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "mpi.h"
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
char value[MPI_MAX_INFO_KEY];
|
|
int flag;
|
|
char *keys[] = {
|
|
"command",
|
|
"argv",
|
|
"maxprocs",
|
|
"soft",
|
|
"host",
|
|
"arch",
|
|
"wdir",
|
|
"num_app_ctx",
|
|
"first_rank",
|
|
"np"
|
|
};
|
|
int i, nk;
|
|
|
|
MPI_Init(&argc, &argv);
|
|
|
|
nk = sizeof(keys) / sizeof(char*);
|
|
|
|
for (i=0; i < nk; i++) {
|
|
MPI_Info_get(MPI_INFO_ENV, keys[i], MPI_MAX_INFO_KEY,
|
|
value, &flag);
|
|
fprintf(stderr, "%s: %s\n", keys[i], (flag) ? value : "Not found");
|
|
}
|
|
|
|
MPI_Finalize();
|
|
return 0;
|
|
}
|