From 9c8d0bf2438bcac009fc2e1ddfb40a2a94b1122e Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Tue, 24 Jun 2014 08:17:37 -0500 Subject: [svn-r25346] minor changes --- src/H5VLiod_common.h | 2 +- src/H5VLiod_dset.c | 79 +++++----------------------------------------------- 2 files changed, 8 insertions(+), 73 deletions(-) diff --git a/src/H5VLiod_common.h b/src/H5VLiod_common.h index f0257be..d16010c 100644 --- a/src/H5VLiod_common.h +++ b/src/H5VLiod_common.h @@ -30,7 +30,7 @@ #define IOD_OH_UNDEFINED ((uint64_t)0)//(pow(2.0,64.0) - 1) #define IOD_ID_UNDEFINED ((uint64_t)(-1))//(pow(2.0,64.0) - 1) #define IOD_COUNT_UNDEFINED ((uint64_t)(-1))//(pow(2.0,64.0) - 1) -#define H5_EFF_DEBUG 1 +#define H5_EFF_DEBUG 0 /* function shipper IDs for different routines */ extern hg_id_t H5VL_EFF_INIT_ID; diff --git a/src/H5VLiod_dset.c b/src/H5VLiod_dset.c index 39a2914..c6c574a 100644 --- a/src/H5VLiod_dset.c +++ b/src/H5VLiod_dset.c @@ -697,11 +697,7 @@ H5VL_iod_server_dset_read_cb(AXE_engine_t axe_engine, /* calculate a checksum for the data to be sent */ cs = H5_checksum_crc64(buf, size); } -#if H5_EFF_DEBUG - else { - fprintf(stderr, "NO TRANSFER DATA INTEGRITY CHECKS ON RAW DATA\n"); - } -#endif + /* MSC - check if client requested to corrupt data */ if(H5Pget_dxpl_inject_corruption(dxpl_id, &flag) < 0) HGOTO_ERROR_FF(FAIL, "can't read property list"); @@ -1180,11 +1176,6 @@ H5VL_iod_server_dset_write_cb(AXE_engine_t UNUSED axe_engine, goto done; } } -#if H5_EFF_DEBUG - else { - fprintf(stderr, "NO TRANSFER DATA INTEGRITY CHECKS ON RAW DATA\n"); - } -#endif buf_size = 0; @@ -1488,8 +1479,6 @@ H5VL__iod_server_final_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_id, HGOTO_ERROR_FF(FAIL, "unable to generate IOD file descriptor from dataspace selection"); } - - if(NULL == (array_io = (iod_array_io_t *)calloc (sizeof(iod_array_io_t), (size_t)num_descriptors))) HGOTO_ERROR_FF(FAIL, "can't allocate list array"); @@ -1533,83 +1522,29 @@ H5VL__iod_server_final_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_id, array_io[n].cs = NULL; array_io[n].ret = &ret_list[n]; - buf_ptr += num_bytes; - } - - if(write_op) { - /* write to array */ - ret = iod_array_write_list(coh, tid, num_descriptors, array_io, NULL); - if(ret < 0) - HGOTO_ERROR_FF(ret, "can't write to array object"); - } - else { - /* Read from array */ - ret = iod_array_read_list(coh, tid, num_descriptors, array_io, NULL); - if(ret < 0) - HGOTO_ERROR_FF(ret, "can't read from array object"); - } - - - -#if 0 - - file_desc = (iod_array_iodesc_t *)hslabs; - buf_ptr = (uint8_t *)buf; - - if(cs_scope & H5_CHECKSUM_IOD) { - /* allocate cs array */ - if(NULL == (cs_list = (iod_checksum_t *)calloc - (sizeof(iod_checksum_t), (size_t)num_descriptors))) - HGOTO_ERROR_FF(FAIL, "can't allocate checksum array"); - } -#if H5_EFF_DEBUG - else { - fprintf(stderr, "NO IOD DATA INTEGRITY CHECKS ON RAW DATA\n"); - } -#endif - - /* set the memory descriptor */ - mem_desc = (iod_mem_desc_t *)malloc(sizeof(iod_mem_desc_t) + - (size_t)num_descriptors * sizeof(iod_mem_frag_t)); - mem_desc->nfrag = (long unsigned)num_descriptors; - for(n=0 ; nfrag[n].addr = (void *)buf_ptr; - mem_desc->frag[n].len = (iod_size_t)num_bytes; - - if(write_op && (cs_scope & H5_CHECKSUM_IOD)) - cs_list[n] = H5_checksum_crc64(buf_ptr, (size_t)num_bytes); - #if H5_EFF_DEBUG for(i=0 ; istart[i], (size_t)file_desc->stride[i], - (size_t)file_desc->block[i], (size_t)file_desc->count[i]); + i, (size_t)hslabs[n].start[i], (size_t)hslabs[n].stride[i], + (size_t)hslabs[n].block[i], (size_t)hslabs[n].count[i]); } #endif + + buf_ptr += num_bytes; } if(write_op) { /* write to array */ - ret = iod_array_write(iod_oh, tid, NULL, mem_desc, file_desc, cs_list, NULL); + ret = iod_array_write_list(coh, tid, num_descriptors, array_io, NULL); if(ret < 0) HGOTO_ERROR_FF(ret, "can't write to array object"); } else { /* Read from array */ - ret = iod_array_read(iod_oh, tid, NULL, mem_desc, file_desc, cs_list, NULL); + ret = iod_array_read_list(coh, tid, num_descriptors, array_io, NULL); if(ret < 0) HGOTO_ERROR_FF(ret, "can't read from array object"); } -#endif /* If this is a read operation, compute checksum for each IOD read, and compare it against checksum returned from IOD */ -- cgit v0.12