diff options
author | Vishwanath Venkatesan <vish@hdfgroup.org> | 2013-08-19 21:42:29 (GMT) |
---|---|---|
committer | Vishwanath Venkatesan <vish@hdfgroup.org> | 2013-08-19 21:42:29 (GMT) |
commit | 0c13d5b4ebe1450d94a8950f16d8e52fc66c94fe (patch) | |
tree | cffdf29de702e5716f86343b4e6d381f580c4a92 | |
parent | 3d6f13a43812ca8af0c158817673518d1654823f (diff) | |
download | hdf5-0c13d5b4ebe1450d94a8950f16d8e52fc66c94fe.zip hdf5-0c13d5b4ebe1450d94a8950f16d8e52fc66c94fe.tar.gz hdf5-0c13d5b4ebe1450d94a8950f16d8e52fc66c94fe.tar.bz2 |
[svn-r24028] Commenting debug printfs
-rw-r--r-- | src/H5VLiod_compactor.c | 34 | ||||
-rw-r--r-- | src/H5VLiod_dset.c | 28 | ||||
-rw-r--r-- | src/H5VLiod_file.c | 4 | ||||
-rw-r--r-- | src/H5VLiod_server.h | 2 | ||||
-rw-r--r-- | testff/compactor_tests/native-parallel-write.c | 1 |
5 files changed, 37 insertions, 32 deletions
diff --git a/src/H5VLiod_compactor.c b/src/H5VLiod_compactor.c index 8a19168..21c540c 100644 --- a/src/H5VLiod_compactor.c +++ b/src/H5VLiod_compactor.c @@ -818,11 +818,14 @@ int H5VL_iod_short_circuit_read (request_list_t *wlist, request_list_t *rlist, int ret_value = CP_SUCCESS; hid_t overlap_space, n_overlap_space; hsize_t *goffsets=NULL; - size_t *glens=NULL, g_entries = 0, k = 0; + size_t *glens=NULL, g_entries = 0; int *return_values = NULL; int nrentries = *read_entries; int modified_rd_cnt = nrentries; +#if DEBUG_COMPACTOR + size_t k; +#endif FUNC_ENTER_NOAPI(NULL); @@ -840,21 +843,24 @@ int H5VL_iod_short_circuit_read (request_list_t *wlist, request_list_t *rlist, #if DEBUG_COMPACTOR fprintf (stderr, "in %s: %d No write entries to play with!\n", __FILE__, __LINE__); + +#endif ret_value = CP_FAIL; goto done; -#endif + } #if DEBUG_COMPACTOR fprintf (stderr, "nentries: %d, nrentries: %d\n", nentries, nrentries); - ret_value = CP_FAIL; #endif + + for (i = 0; i < nrentries; i++){ for (j = 0; j < nentries; j++){ - if (wlist[j].merged == USED_IN_MERGING) + if (wlist[j].merged == MERGED) continue; #if DEBUG_COMPACTOR @@ -889,18 +895,20 @@ int H5VL_iod_short_circuit_read (request_list_t *wlist, request_list_t *rlist, fprintf (stderr,"%zd: OFFSET: %lli, len %zd\n", k, goffsets[k], glens[k]); + } +#endif free(goffsets); free(glens); g_entries = 0; -#endif + if(return_values[1] > 0){ /*There is still some reads that needs to be done We can construct an entry for them and fill the buffer*/ rlist[modified_rd_cnt].selection_id = n_overlap_space; -#if DEBUG_COMPACTOR + H5Sget_offsets(n_overlap_space,rlist[i].elementsize, &goffsets, &glens, &g_entries); @@ -908,7 +916,7 @@ int H5VL_iod_short_circuit_read (request_list_t *wlist, request_list_t *rlist, &modified_rd_cnt, goffsets, glens, g_entries, FALSE); - +#if DEBUG_COMPACTOR fprintf (stderr,"**************************************\n"); fprintf (stderr,"NON-OVERLAPPING OFFSETS\n"); for (k = 0; k < g_entries; k++){ @@ -1449,12 +1457,19 @@ int H5VL_iod_reconstruct_overlapped_request (block_container_t *sf_block, size_t i, size_t j, int *changed, int *changed_cnt_ret){ - size_t rem_len = 0, jj; + size_t rem_len = 0; size_t rev_mblks, rev_fblks; block_container_t *rev_sm_block=NULL, *rev_sf_block=NULL; int ret_value = CP_SUCCESS; hsize_t start_i , start_j, end_i, end_j; - int changed_cnt = 0, ii; + int changed_cnt = 0; + +#if DEBUG_COMPACTOR + int ii; + size_t jj; +#endif + + FUNC_ENTER_NOAPI(NULL) rev_mblks = 0; @@ -2179,6 +2194,7 @@ static void H5VL_print_block_container (block_container_t *cont, #if DEBUG_COMPACTOR fprintf (stderr,"blocks: %zd\n", num); + for (k = 0; k < num; k++){ fprintf (stderr, "%zd: block.offset: %lli, block.len: %zd \n", diff --git a/src/H5VLiod_dset.c b/src/H5VLiod_dset.c index 7f5441d..942ca6f 100644 --- a/src/H5VLiod_dset.c +++ b/src/H5VLiod_dset.c @@ -296,7 +296,7 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, //hid_t space_id, type_id; #if H5_DO_NATIVE - printf("dataset name %s location %d\n", name, loc_handle.cookie); + /* printf("dataset name %s location %d\n", name, loc_handle.cookie); */ dset_oh.cookie = H5Dopen(loc_handle.cookie, name, input->dapl_id); HDassert(dset_oh.cookie); output.space_id = H5Dget_space(dset_oh.cookie); @@ -1143,7 +1143,8 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) { int ret_value = CP_SUCCESS; - int i, *ptr = NULL, request_counter= 0; + int i, request_counter= 0; + int *ptr = NULL; int ndims; request_list_t *list = (request_list_t *)_list; op_data_t *op_data; @@ -1173,7 +1174,7 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) size_t native_length = 0, total_length = 0; char *write_buf = NULL, *write_buf_ptr = NULL; hid_t mem_dataspace; - hsize_t *native_dims = NULL; + hsize_t native_dims[1]; #endif @@ -1195,9 +1196,6 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) for (request_counter = 0; request_counter < num_requests; request_counter++){ if (list[request_counter].merged != USED_IN_MERGING){ -#if H5_DO_NATIVE - native_dims = (hsize_t *) malloc (sizeof(hsize_t)); -#endif op_data = (op_data_t *)list[request_counter].op_data; input = (dset_io_in_t *)op_data->input; @@ -1227,7 +1225,7 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) buf = (void *)list[request_counter].mem_buf; #if H5_DO_NATIVE - *native_dims = (hsize_t)(size/src_size); + native_dims[0] = (hsize_t)(size/src_size); write_buf = (char *)buf; #endif buf_ptr = (uint8_t *)buf; @@ -1239,13 +1237,13 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) for (hi = 0; hi < list[request_counter].num_mblocks; hi++){ total_length += list[request_counter].mblocks[hi].len; } - *native_dims = (hsize_t)(total_length/src_size); + native_dims[0] = (hsize_t)(total_length/src_size); #endif #if PROFILE fprintf (stdout, - "# Requests Merged: %d\n", + "# Requests Merged: %d \n", request_counter); #endif @@ -1263,7 +1261,6 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); opened_locally = TRUE; } - /* get the rank of the dataspace */ if((ndims = H5Sget_simple_extent_ndims(space_id)) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get dataspace dimesnsion"); @@ -1458,8 +1455,8 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) #if DEBUG_COMPACTOR fprintf (stderr, "Printing the native constructed buffer of length :%zd\n", native_length); - ptr = (int *) write_buf; - for (ii = 0; ii < native_length/sizeof(int); ii++){ + ptr = (hsize_t *) write_buf; + for (ii = 0; ii < native_length/sizeof(hsize_t); ii++){ fprintf(stderr, "%d ", ptr[ii]); } fprintf(stderr, "\n"); @@ -1503,12 +1500,7 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) #endif #if H5_DO_NATIVE -#if DEBUG_COMPACTOR - fprintf(stderr,"native_dims : %lli\n", *native_dims); -#endif - mem_dataspace = H5Screate_simple(1, native_dims, NULL); - ret_value = H5Dwrite(iod_oh.cookie,dst_id, mem_dataspace, space_id, H5P_DEFAULT, write_buf); @@ -1516,8 +1508,6 @@ int H5VL_iod_server_compactor_write (void *_list, int num_requests) free(write_buf); write_buf = NULL; } - if (NULL != native_dims) - free(native_dims); #endif if (NULL != mem_desc){ diff --git a/src/H5VLiod_file.c b/src/H5VLiod_file.c index bf41aad..d86fc70 100644 --- a/src/H5VLiod_file.c +++ b/src/H5VLiod_file.c @@ -168,7 +168,7 @@ H5VL_iod_server_file_create_cb(AXE_engine_t UNUSED axe_engine, coh.cookie = H5Fcreate(input->name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); HDassert(coh.cookie); root_oh.cookie = coh.cookie; - fprintf(stderr, "Created Native file %s with ID %d\n", input->name, root_oh.cookie); + /* fprintf(stderr, "Created Native file %s with ID %d\n", input->name, root_oh.cookie);*/ #endif output.coh = coh; @@ -286,7 +286,7 @@ H5VL_iod_server_file_open_cb(AXE_engine_t UNUSED axe_engine, coh.cookie = H5Fopen(input->name, H5F_ACC_RDWR, H5P_DEFAULT); assert(coh.cookie); root_oh.cookie = coh.cookie; - fprintf(stderr, "Opened Native file %s with ID %d\n", input->name, root_oh.cookie); + /* fprintf(stderr, "Opened Native file %s with ID %d\n", input->name, root_oh.cookie); */ } #endif diff --git a/src/H5VLiod_server.h b/src/H5VLiod_server.h index 1b4d91e..f98a7e0 100644 --- a/src/H5VLiod_server.h +++ b/src/H5VLiod_server.h @@ -30,7 +30,7 @@ #define EEXISTS 1 #define H5_DO_NATIVE 1 -#define DEBUG_COMPACTOR 1 +#define DEBUG_COMPACTOR 0 #define PROFILE 1 /* Key names for Metadata stored in KV objects */ diff --git a/testff/compactor_tests/native-parallel-write.c b/testff/compactor_tests/native-parallel-write.c index 66d7cc2..a5ed4cb 100644 --- a/testff/compactor_tests/native-parallel-write.c +++ b/testff/compactor_tests/native-parallel-write.c @@ -28,7 +28,6 @@ int main (int argc, char **argv){ int my_rank, my_size, ret; int provided; hid_t event_q, int_id; - int num_requests = 0; H5_status_t *status = NULL; |