1
1
openmpi/test/simple/nonzero.c
Ralph Castain 7e2874a83d
Save the old ORTE simple tests
Useful when debugging RTE-related issues

Not for inclusion in the tarball - just added to git repo for use by
developers.

Signed-off-by: Ralph Castain <rhc@pmix.org>
2020-02-21 06:15:06 -08: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;
}