examples: remove call to exit from thread function

The exit call in the thread functions have potential thread racing
issues and may leave another process hanging. I think it is unnecessary
for the example and may cause more confusion.
Esse commit está contido em:
Hui Zhou
2021-07-20 14:53:34 -05:00
commit 938a983576
-2
Ver Arquivo
@@ -91,7 +91,6 @@ void *thrdsub(void *arg)
MPI_Recv(r_buff, 1024, MPI_CHAR, 1, mythrdrank, MPI_COMM_WORLD, &status);
if (strcmp(s_buff, r_buff) != 0) {
printf("comm_rank=%d mythrdrank=%d bad recv\n", comm_rank, mythrdrank);
exit(-1);
}
if (thread_level_provided == MPI_THREAD_SINGLE ||
thread_level_provided == MPI_THREAD_FUNNELED) {
@@ -106,7 +105,6 @@ void *thrdsub(void *arg)
MPI_Recv(r_buff, 1024, MPI_CHAR, 0, mythrdrank, MPI_COMM_WORLD, &status);
if (strcmp(s_buff, r_buff) != 0) {
printf("comm_rank=%d mythrdrank=%d bad recv\n", comm_rank, mythrdrank);
exit(-1);
}
MPI_Send(s_buff, strlen(s_buff) + 1, MPI_CHAR, 0, mythrdrank, MPI_COMM_WORLD);
if (thread_level_provided == MPI_THREAD_SINGLE ||