From 0a654a9df918d312ec2b463e2337d643f76b8aef Mon Sep 17 00:00:00 2001 From: MuQun Yang Date: Mon, 15 Sep 2008 17:20:16 -0500 Subject: [svn-r15624] This check-in fixes a bug inside parallel HDF5 testsuite. When enable-debug is turned on, a special macro block H5_HAVE_INSTRUMENTED_LIBRARY inside HDF5 will be executed to check if some collective chunk IO test cases are being run with the correct settings(one link, multiple chunk etc.). However,when complicated derived datatype in some mpi-io packages are not supported, the library has to switch one link IO with/without the optimization to multiple chunk IO with/without the optimization. The current testsuite doesn't know this and generates a false assertion failure message. This check-in fix this problem by providing a second property to avoid the false faiure message. --- src/H5Dmpio.c | 30 ++++++++++++++++++++++++++++-- src/H5Dprivate.h | 4 ++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index a87c9d3..868fbe0 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -637,10 +637,36 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info } /* end else */ #ifndef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS - if(io_option == H5D_ONE_LINK_CHUNK_IO) + if(io_option == H5D_ONE_LINK_CHUNK_IO) { io_option = H5D_MULTI_CHUNK_IO; /* We can not do this with one chunk IO. */ - if(io_option == H5D_ONE_LINK_CHUNK_IO_MORE_OPT) +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY + { int new_value; + htri_t check_prop; + check_prop = H5Pexist(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_LINK_TO_MULTI); + if(check_prop > 0) { + new_value = 1; + if(H5Pset(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_LINK_TO_MULTI, &new_value) < 0) + HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value") + + } + }/* add this property because the library changes the option from one link to multiple chunks.*/ +#endif + } + if(io_option == H5D_ONE_LINK_CHUNK_IO_MORE_OPT){ io_option = H5D_MULTI_CHUNK_IO_MORE_OPT; +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY + { int new_value; + htri_t check_prop; + check_prop = H5Pexist(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_LINK_TO_MULTI_OPT); + if(check_prop > 0) { + new_value = 1; + if(H5Pset(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_LINK_TO_MULTI_OPT, &new_value) < 0) + HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value") + + } + }/* add this property because the library changes the option from one link to multiple chunks.*/ +#endif + } #endif #ifdef H5_HAVE_INSTRUMENTED_LIBRARY diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index f1180a3..dcf3aa3 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -82,9 +82,13 @@ #define H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME "coll_chunk_link_false" #define H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME "coll_chunk_multi_coll" #define H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME "coll_chunk_multi_ind" +#define H5D_XFER_COLL_CHUNK_LINK_TO_MULTI "coll_chunk_link_mul"/* Internal transferring from link to multiple chunk */ +#define H5D_XFER_COLL_CHUNK_LINK_TO_MULTI_OPT "coll_chunk_link_mul_opt"/* Internal transferring from link opt to multiple chunk opt*/ + /* Definitions for all collective chunk instrumentation properties */ #define H5D_XFER_COLL_CHUNK_SIZE sizeof(unsigned) #define H5D_XFER_COLL_CHUNK_DEF 1 +#define H5D_XFER_COLL_CHUNK_FIX 0 #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ /* Default temporary buffer size */ -- cgit v0.12