Skip to content

Commit

Permalink
changed BAIL to PBAIL
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 5, 2019
1 parent 07d2784 commit 8140b5b
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 138 deletions.
2 changes: 1 addition & 1 deletion src/clib/pio_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Handle non-MPI errors by printing error message and goto exit. This
* is used in test code.
*/
#define BAIL(e) do { \
#define PBAIL(e) do { \
fprintf(stderr, "%d Error %d in %s, line %d\n", my_rank, e, __FILE__, __LINE__); \
goto exit; \
} while (0)
Expand Down
20 changes: 10 additions & 10 deletions tests/cunit/test_async_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ run_darray_async_test(int iosysid, int fmt, int my_rank, int ntasks, int niotask
int d, t;

if (!(my_data_int = malloc(elements_per_pe2 * sizeof(int))))
BAIL(PIO_ENOMEM);
PBAIL(PIO_ENOMEM);

for (d = 0; d < elements_per_pe2; d++)
my_data_int[d] = my_rank;
Expand All @@ -170,7 +170,7 @@ run_darray_async_test(int iosysid, int fmt, int my_rank, int ntasks, int niotask
sprintf(data_filename, "data_%s.nc", TEST_NAME);
if ((ret = PIOc_createfile(iosysid, &ncid, &flavor[fmt], data_filename,
NC_CLOBBER)))
BAIL(ret);
PBAIL(ret);

#ifdef USE_MPE
{
Expand All @@ -182,20 +182,20 @@ run_darray_async_test(int iosysid, int fmt, int my_rank, int ntasks, int niotask

/* Find the size of the type. */
if ((ret = PIOc_inq_type(ncid, piotype, NULL, &type_size)))
BAIL(ret);
PBAIL(ret);

/* Define dimensions. */
for (int d = 0; d < NDIM4; d++)
if ((ret = PIOc_def_dim(ncid, dim_name[d], dim_len[d], &dimid[d])))
BAIL(ret);
PBAIL(ret);

/* Define variables. */
if ((ret = PIOc_def_var(ncid, REC_VAR_NAME, piotype, NDIM4, dimid, &varid)))
BAIL(ret);
PBAIL(ret);

/* End define mode. */
if ((ret = PIOc_enddef(ncid)))
BAIL(ret);
PBAIL(ret);

for (t = 0; t < NUM_TIMESTEPS; t++)
{
Expand All @@ -205,12 +205,12 @@ run_darray_async_test(int iosysid, int fmt, int my_rank, int ntasks, int niotask

/* Set the record number for the record vars. */
if ((ret = PIOc_setframe(ncid, varid, t)))
BAIL(ret);
PBAIL(ret);

/* Write some data to the record vars. */
if ((ret = PIOc_write_darray(ncid, varid, ioid3, elements_per_pe2,
my_data_int, NULL)))
BAIL(ret);
PBAIL(ret);

#ifdef USE_MPE
{
Expand Down Expand Up @@ -239,14 +239,14 @@ run_darray_async_test(int iosysid, int fmt, int my_rank, int ntasks, int niotask

/* Close the file. */
if ((ret = PIOc_closefile(ncid)))
BAIL(ret);
PBAIL(ret);

free(my_data_int);
}

/* Free the decomposition. */
if ((ret = PIOc_freedecomp(iosysid, ioid3)))
BAIL(ret);
PBAIL(ret);
exit:
return ret;
}
Expand Down
Loading

0 comments on commit 8140b5b

Please sign in to comment.