Skip to content

Commit

Permalink
Merge pull request ESMCI#1428 from NCAR/ejh_perf_5
Browse files Browse the repository at this point in the history
Make async mode writes really async
  • Loading branch information
edhartnett authored May 16, 2019
2 parents 2c5ef5a + 70bff1d commit 37be328
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
11 changes: 7 additions & 4 deletions src/clib/pio_getput_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,13 +1254,16 @@ int PIOc_put_vars_tc(int ncid, int varid, const PIO_Offset *start, const PIO_Off
/* Free malloced resources. */
if (ndims && !stride_present)
free(fake_stride);

if (ierr)
return check_netcdf(file, ierr, __FILE__, __LINE__);
}

/* Broadcast and check the return code. */
if ((mpierr = MPI_Bcast(&ierr, 1, MPI_INT, ios->ioroot, ios->my_comm)))
return check_mpi(NULL, file, mpierr, __FILE__, __LINE__);
if (ierr)
return check_netcdf(file, ierr, __FILE__, __LINE__);
/* if ((mpierr = MPI_Bcast(&ierr, 1, MPI_INT, ios->ioroot, ios->my_comm))) */
/* return check_mpi(NULL, file, mpierr, __FILE__, __LINE__); */
/* if (ierr) */
/* return check_netcdf(file, ierr, __FILE__, __LINE__); */
LOG((2, "PIOc_put_vars_tc bcast netcdf return code %d complete", ierr));

return PIO_NOERR;
Expand Down
6 changes: 3 additions & 3 deletions tests/cunit/test_async_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
#define LON_LEN 3

/* The length of our sample data along each dimension. */
#define X_DIM_LEN 4
#define Y_DIM_LEN 4
#define Z_DIM_LEN 4
#define X_DIM_LEN 1024
#define Y_DIM_LEN 1024
#define Z_DIM_LEN 256

/* The number of timesteps of data to write. */
#define NUM_TIMESTEPS 3
Expand Down
8 changes: 4 additions & 4 deletions tests/cunit/test_perf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
#define NDIM3 3

/* The length of our sample data along each dimension. */
#define X_DIM_LEN 128
#define Y_DIM_LEN 128
#define Z_DIM_LEN 16
#define X_DIM_LEN 1024
#define Y_DIM_LEN 1024
#define Z_DIM_LEN 128

/* The number of timesteps of data to write. */
#define NUM_TIMESTEPS 10
Expand Down Expand Up @@ -429,6 +429,6 @@ int main(int argc, char **argv)
if ((ret = pio_test_finalize(&test_comm)))
return ret;

printf("%d %s SUCCESS!!\n", my_rank, TEST_NAME);
/* printf("%d %s SUCCESS!!\n", my_rank, TEST_NAME); */
return 0;
}

0 comments on commit 37be328

Please sign in to comment.