Skip to content

Commit

Permalink
removed MPI_Finalize() call from BAIL and MPIBAIL macros
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jun 24, 2019
1 parent 43f7269 commit bdfbb41
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/cunit/pio_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@ void test_stop_mpe_log(int state, const char *msg);

/** Handle MPI errors. This should only be used with MPI library
* function calls. Finalize and goto exit. */
#define MPIBAIL(e) do { \
#define MPIBAIL(e) do { \
MPI_Error_string(e, err_buffer, &resultlen); \
fprintf(stderr, "MPI error, line %d, file %s: %s\n", __LINE__, __FILE__, err_buffer); \
MPI_Finalize(); \
ret = NC_EIO; \
ret = NC_EIO; \
goto exit; \
} while (0)

Expand All @@ -110,9 +109,8 @@ void test_stop_mpe_log(int state, const char *msg);

/** Handle non-MPI errors by finalizing the MPI library and goto
* exit. Finalize and goto exit. */
#define BAIL(e) do { \
#define BAIL(e) do { \
fprintf(stderr, "%d Error %d in %s, line %d\n", my_rank, e, __FILE__, __LINE__); \
MPI_Finalize(); \
goto exit; \
} while (0)

Expand Down

0 comments on commit bdfbb41

Please sign in to comment.