Commit 66119f1f authored by Kenneth Raffenetti's avatar Kenneth Raffenetti
Browse files

Add FT test with communication. Tweak other FT tests.



Adds an FT test that attempts communication without touching a
failed process. Other changes are to use SIGKILL to simulate failures
and also to flush all output to stdout.
Signed-off-by: default avatarWesley Bland <wbland@mcs.anl.gov>
parent 117a24f5
......@@ -10,4 +10,4 @@ include $(top_srcdir)/Makefile.mtest
## for all programs that are just built from the single corresponding source
## file, we don't need per-target _SOURCES rules, automake will infer them
## correctly
noinst_PROGRAMS = die abort
noinst_PROGRAMS = die abort send
......@@ -15,6 +15,7 @@ int main(int argc, char **argv)
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
printf("No Errors\n");
fflush( stdout );
if (rank == 0)
MPI_Abort(MPI_COMM_WORLD, MPI_SUCCESS);
......
......@@ -20,14 +20,17 @@ int main(int argc, char **argv)
if (rank == 1) {
pid = getpid();
kill(pid, SIGSTOP);
kill(pid, SIGKILL);
}
MPI_Finalize();
MTestSleep(1);
if (rank == 0) {
printf("No Errors\n");
fflush( stdout );
}
MPI_Finalize();
return 0;
}
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
*
* (C) 2003 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include <mpi.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
/*
* This test attempts communication between 2 running processes
* after another process has failed.
*/
int main(int argc, char **argv)
{
int rank, size, err;
char buf[10];
pid_t pid;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank == 1) {
pid = getpid();
kill(pid, SIGKILL);
}
MTestSleep(1);
if (rank == 0) {
err = MPI_Send("No Errors", 10, MPI_CHAR, 2, 0, MPI_COMM_WORLD);
}
if (rank == 2) {
MPI_Recv(buf, 10, MPI_CHAR, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
printf("%s\n", buf);
fflush( stdout );
}
MPI_Finalize();
return 0;
}
die 4 mpiexecarg=-disable-auto-cleanup timeLimit=10
abort 2 mpiexecarg=-disable-auto-cleanup timeLimit=10
send 4 mpiexecarg=-disable-auto-cleanup timeLimit=10
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment