1
1
openmpi/orte/test/mpi/nonzero.c
Ralph Castain e8759ca66b Add minor test to ORTE test suite
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
2017-05-29 15:43:52 -07:00

24 строки
330 B
C

#include <stdlib.h>
#include <unistd.h>
#include <mpi.h>
int main(int argc, char **argv)
{
int rank;
if(argc < 2) {
return 0;
}
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
int i = atoi(argv[1]);
MPI_Finalize();
if (i != rank) {
sleep(1);
}
return i;
}