Commit d65de57e authored by Kenneth Raffenetti's avatar Kenneth Raffenetti
Browse files

Fault Tolerance test fixes.



Use _exit instead of kill to more reliably fail processes in
fault tolerance tests. _exit ends a process immediately rather than
relying on kill/sleep combo. Also, tests now output " No Errors"
correctly upon success.
Signed-off-by: default avatarWesley Bland <wbland@mcs.anl.gov>
parent b72af961
......@@ -14,7 +14,7 @@ int main(int argc, char **argv)
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
printf("No Errors\n");
printf(" No Errors\n");
fflush( stdout );
if (rank == 0)
......
......@@ -19,14 +19,11 @@ int main(int argc, char **argv)
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank == 1) {
pid = getpid();
kill(pid, SIGKILL);
_exit(0);
}
MTestSleep(1);
if (rank == 0) {
printf("No Errors\n");
printf(" No Errors\n");
fflush( stdout );
}
......
......@@ -24,19 +24,16 @@ int main(int argc, char **argv)
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank == 1) {
pid = getpid();
kill(pid, SIGKILL);
_exit(0);
}
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);
printf(" %s\n", buf);
fflush( stdout );
}
......
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