From d513eaca06aa3d043515b8b7a5f5d24136e6681e Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 9 Mar 2018 15:13:41 -0700 Subject: [PATCH] cleanup --- src/clib/pio_file.c | 3 --- src/clib/pio_getput_int.c | 12 ++++-------- src/clib/pioc_support.c | 2 -- tests/cunit/test_async_multicomp.c | 2 +- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/clib/pio_file.c b/src/clib/pio_file.c index b6f894d930c..ba94ac223e2 100644 --- a/src/clib/pio_file.c +++ b/src/clib/pio_file.c @@ -386,7 +386,6 @@ int PIOc_sync(int ncid) wmulti_buffer *wmb, *twmb; LOG((3, "PIOc_sync checking buffers")); - wmb = &file->buffer; while (wmb) { @@ -394,7 +393,6 @@ int PIOc_sync(int ncid) * multibuffer, flush it. */ if (wmb->num_arrays > 0) flush_buffer(ncid, wmb, true); - twmb = wmb; wmb = wmb->next; if (twmb == &file->buffer) @@ -465,7 +463,6 @@ int PIOc_sync(int ncid) return check_mpi2(ios, NULL, mpierr, __FILE__, __LINE__); if (ierr) return check_netcdf2(ios, NULL, ierr, __FILE__, __LINE__); - PIOc_set_log_level(0); return ierr; } diff --git a/src/clib/pio_getput_int.c b/src/clib/pio_getput_int.c index dfa269df57c..250d77b8781 100644 --- a/src/clib/pio_getput_int.c +++ b/src/clib/pio_getput_int.c @@ -544,7 +544,7 @@ int PIOc_get_vars_tc(int ncid, int varid, const PIO_Offset *start, const PIO_Off * num_elem will remain 1). */ for (int vd = 0; vd < ndims; vd++) num_elem *= count[vd]; - LOG((1, "PIOc_get_vars_tc num_elem = %d", num_elem)); + LOG((2, "PIOc_get_vars_tc num_elem = %d", num_elem)); } /* If async is in use, and this is not an IO task, bcast the parameters. */ @@ -583,7 +583,7 @@ int PIOc_get_vars_tc(int ncid, int varid, const PIO_Offset *start, const PIO_Off mpierr = MPI_Bcast(&num_elem, 1, MPI_OFFSET, ios->compmaster, ios->intercomm); if (!mpierr) mpierr = MPI_Bcast(&typelen, 1, MPI_OFFSET, ios->compmaster, ios->intercomm); - LOG((1, "PIOc_get_vars_tc ncid = %d varid = %d ndims = %d start_present = %d " + LOG((2, "PIOc_get_vars_tc ncid = %d varid = %d ndims = %d start_present = %d " "count_present = %d stride_present = %d xtype = %d num_elem = %d", ncid, varid, ndims, start_present, count_present, stride_present, xtype, num_elem)); } @@ -937,17 +937,13 @@ int PIOc_put_vars_tc(int ncid, int varid, const PIO_Offset *start, const PIO_Off return check_netcdf(file, ierr, __FILE__, __LINE__); } + LOG((2, "ndims = %d typelen = %d", ndims, typelen)); + /* How many elements of data? If no count array was passed, * this is a scalar. */ if (count) for (int vd = 0; vd < ndims; vd++) num_elem *= count[vd]; - - LOG((1, "ndims = %d typelen = %d num_elem %d", ndims, typelen, num_elem)); - if (count) - for (int vd = 0; vd < ndims; vd++) - LOG((1, "count[%d] = %d",vd,count[vd])); - } /* If async is in use, and this is not an IO task, bcast the parameters. */ diff --git a/src/clib/pioc_support.c b/src/clib/pioc_support.c index dde1cf3a678..0c36b2b5523 100644 --- a/src/clib/pioc_support.c +++ b/src/clib/pioc_support.c @@ -25,8 +25,6 @@ int my_rank; FILE *LOG_FILE = NULL; #endif /* PIO_ENABLE_LOGGING */ -int mycnt=0; - /** * The PIO library maintains its own set of ncids. This is the next * ncid number that will be assigned. diff --git a/tests/cunit/test_async_multicomp.c b/tests/cunit/test_async_multicomp.c index 8d4a2e1f847..9fecc7c839a 100644 --- a/tests/cunit/test_async_multicomp.c +++ b/tests/cunit/test_async_multicomp.c @@ -52,7 +52,7 @@ int main(int argc, char **argv) /* Initialize test. */ if ((ret = pio_test_init2(argc, argv, &my_rank, &ntasks, TARGET_NTASKS, TARGET_NTASKS, - 3, &test_comm))) + -1, &test_comm))) ERR(ERR_INIT); /* Is the current process a computation task? */