Add a delayed_abort test code. We seem to handle this case just fine now, but Sun reports still seeing troubles on Solaris.
This commit was SVN r13493.
Этот коммит содержится в:
родитель
ec610a9e65
Коммит
26897a626d
@ -1,4 +1,4 @@
|
||||
PROGS = mpi_no_op hello hello_nodename abort multi_abort simple_spawn mpi_spin
|
||||
PROGS = mpi_no_op hello hello_nodename abort multi_abort simple_spawn mpi_spin delayed_abort
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
|
37
orte/test/mpi/delayed_abort.c
Обычный файл
37
orte/test/mpi/delayed_abort.c
Обычный файл
@ -0,0 +1,37 @@
|
||||
/* -*- C -*-
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* The most basic of MPI applications
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include "mpi.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int rank, size;
|
||||
char hostname[512];
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
||||
|
||||
gethostname(hostname, 512);
|
||||
printf("%s: I am %d of %d. pid=%d\n", hostname, rank, size, getpid());
|
||||
|
||||
if (rank%3 == 0) {
|
||||
printf("%s: rank %d aborts\n", hostname, rank);
|
||||
if (rank == 3) {
|
||||
printf("%s: rank %d is going to sleep\n", hostname, rank);
|
||||
sleep(2);
|
||||
}
|
||||
MPI_Abort(MPI_COMM_WORLD, 2);
|
||||
printf("%s: sleeping. You should not see this\n", hostname);
|
||||
sleep(100);
|
||||
}
|
||||
|
||||
MPI_Finalize();
|
||||
return 0;
|
||||
}
|
Загрузка…
x
Ссылка в новой задаче
Block a user