Skip to content

Commit

Permalink
uncommenting much of the commented code in test_darray_multivar3
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Jul 28, 2020
1 parent 41dc2c9 commit aec3413
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion src/clib/pio_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ int put_vars_handler(iosystem_desc_t *ios)
if (start_present)
if ((mpierr = MPI_Bcast(start, ndims, MPI_OFFSET, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
PLOG((1, "put_vars_handler getting start[0] = %d ndims = %d", start[0], ndims));
/* PLOG((1, "put_vars_handler getting start[0] = %d ndims = %d", start[0], ndims)); */
if ((mpierr = MPI_Bcast(&count_present, 1, MPI_CHAR, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
if (count_present)
Expand Down
4 changes: 2 additions & 2 deletions tests/cunit/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ PIO_TESTS='test_intercomm2 test_async_mpi test_spmd test_rearr test_async_simple
'test_async_3proc test_async_4proc test_iosystem2_simple test_iosystem2_simple2 '\
'test_iosystem2 test_iosystem3_simple test_iosystem3_simple2 test_iosystem3 test_pioc '\
'test_pioc_unlim test_pioc_putget test_pioc_fill test_darray test_darray_multi '\
'test_darray_multivar test_darray_multivar2 test_darray_multivar3 test_darray_1d '\
'test_darray_multivar test_darray_multivar2 test_darray_1d '\
'test_darray_3d test_decomp_uneven test_decomps test_darray_async_simple '\
'test_darray_async test_darray_async_many test_darray_2sync test_async_multicomp '\
'test_darray_fill test_darray_vard test_async_1d'
'test_darray_fill test_darray_vard test_async_1d test_darray_multivar3'

success1=true
success2=true
Expand Down
110 changes: 55 additions & 55 deletions tests/cunit/test_darray_multivar3.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,61 +167,61 @@ int test_multivar_darray(int iosysid, int ioid, int num_flavors, int *flavor,
ERR(ret);

/* Check the file contents. */
/* { */
/* int ncid2; /\* The ncid of the re-opened netCDF file. *\/ */
/* int test_data_int_in[arraylen]; */
/* /\* float test_data_float_in[arraylen]; *\/ */

/* /\* Reopen the file. *\/ */
/* if ((ret = PIOc_openfile(iosysid, &ncid2, &flavor[fmt], filename, PIO_NOWRITE))) */
/* ERR(ret); */

/* /\* Read the var data with read_darray(). *\/ */
/* for (int v = 0; v < NUM_VAR; v++) */
/* { */
/* if (v < NUM_VAR - 1) */
/* { */
/* if ((ret = PIOc_setframe(ncid2, varid[v], 0))) */
/* ERR(ret); */

/* /\* Read the data. *\/ */
/* if ((ret = PIOc_read_darray(ncid2, varid[v], ioid, arraylen, test_data_int_in))) */
/* ERR(ret); */

/* /\* Check the results. *\/ */
/* for (int f = 0; f < arraylen; f++) */
/* if (test_data_int_in[f] != test_data_int[f]) */
/* return ERR_WRONG; */
/* } */
/* } /\* next var *\/ */

/* /\* Now read the fill values. *\/ */
/* PIO_Offset idx[NDIM] = {0, 0, 3}; */
/* int file_fv_int; */
/* float file_fv_float; */

/* /\* Check an int fill value. *\/ */
/* if ((ret = PIOc_get_var1_int(ncid2, 1, idx, &file_fv_int))) */
/* return ret; */
/* if (use_fv) */
/* { */
/* if (file_fv_int != custom_fillvalue_int) */
/* return ERR_WRONG; */
/* } */

/* /\* Check the float fill value. *\/ */
/* if ((ret = PIOc_get_var1_float(ncid2, 2, idx, &file_fv_float))) */
/* return ret; */
/* /\* if (use_fv) *\/ */
/* /\* { *\/ */
/* /\* if (file_fv_float != custom_fillvalue_float) *\/ */
/* /\* return ERR_WRONG; *\/ */
/* /\* } *\/ */

/* /\* Close the netCDF file. *\/ */
/* if ((ret = PIOc_closefile(ncid2))) */
/* ERR(ret); */
/* } */
{
int ncid2; /* The ncid of the re-opened netCDF file. */
int test_data_int_in[arraylen];
/* float test_data_float_in[arraylen]; */

/* Reopen the file. */
if ((ret = PIOc_openfile(iosysid, &ncid2, &flavor[fmt], filename, PIO_NOWRITE)))
ERR(ret);

/* Read the var data with read_darray(). */
for (int v = 0; v < NUM_VAR; v++)
{
if (v < NUM_VAR - 1)
{
if ((ret = PIOc_setframe(ncid2, varid[v], 0)))
ERR(ret);

/* Read the data. */
/* if ((ret = PIOc_read_darray(ncid2, varid[v], ioid, arraylen, test_data_int_in))) */
/* ERR(ret); */

/* /\* Check the results. *\/ */
/* for (int f = 0; f < arraylen; f++) */
/* if (test_data_int_in[f] != test_data_int[f]) */
/* return ERR_WRONG; */
}
} /* next var */

/* Now read the fill values. */
PIO_Offset idx[NDIM] = {0, 0, 3};
int file_fv_int;
float file_fv_float;

/* Check an int fill value. */
if ((ret = PIOc_get_var1_int(ncid2, 1, idx, &file_fv_int)))
return ret;
if (use_fv)
{
if (file_fv_int != custom_fillvalue_int)
return ERR_WRONG;
}

/* Check the float fill value. */
if ((ret = PIOc_get_var1_float(ncid2, 2, idx, &file_fv_float)))
return ret;
/* if (use_fv) */
/* { */
/* if (file_fv_float != custom_fillvalue_float) */
/* return ERR_WRONG; */
/* } */

/* Close the netCDF file. */
if ((ret = PIOc_closefile(ncid2)))
ERR(ret);
}
}
}

Expand Down

0 comments on commit aec3413

Please sign in to comment.