diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-22 20:46:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-22 20:46:27 (GMT) |
commit | ecd9f0a10ee44c6051054ecccbeb35fb2f26c673 (patch) | |
tree | 6617063423ae1715d3142057f14c9f8d1cf0bec4 /src/H5Dio.c | |
parent | e047136588f35b08b324a8483165d8284568920e (diff) | |
download | hdf5-ecd9f0a10ee44c6051054ecccbeb35fb2f26c673.zip hdf5-ecd9f0a10ee44c6051054ecccbeb35fb2f26c673.tar.gz hdf5-ecd9f0a10ee44c6051054ecccbeb35fb2f26c673.tar.bz2 |
[svn-r8932] Purpose:
Code cleanup
Description:
Clean up collective chunking code a bit.
Also, add '--enable-instrument' configure flag to have a mechanism for
determining that optimized operations happened correctly in the library (instead
of just the "normal" way) by allowing 'flag' properties to be set outside the
library and set when the "right" thing happens. This is mainly for debugging
and regression checks, so we make certain we don't break optimized I/O by
accident. It's enabled by default when --enable-debug is on (which is on by
default in the development branch and off by default in the release branch),
but can also be independently controlled with its own configure flag.
Platforms tested:
FreeBSD 4.10 (sleipnir) w/parallel
IBM p690 (copper) w/parallel
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r-- | src/H5Dio.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c index 9a1403f..5c84efe 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -751,26 +751,29 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from file to memory data space") #ifdef H5_HAVE_PARALLEL +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY /**** Test for collective chunk IO notice the following code should be removed after a more general collective chunk IO algorithm is applied. */ - if(dataset->layout.type == H5D_CHUNKED) { /*only check for chunking storage */ - check_prop = H5Pexist(dxpl_id,"__test__ccfoo___"); - if(check_prop < 0) - HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to check property list"); - if(check_prop > 0) { - if(H5Pget(dxpl_id,"__test__ccfoo___",&prop_value)<0) - HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to get property value"); - if(!use_par_opt_io) { - new_value = 0; - if(H5Pset(dxpl_id,"__test__ccfoo___",&new_value)<0) - HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value"); - } - } - } - /* end Test for collective chunk IO */ + if(dataset->layout.type == H5D_CHUNKED) { /*only check for chunking storage */ + check_prop = H5Pexist(dxpl_id,H5D_XFER_COLL_CHUNK_NAME); + if(check_prop < 0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to check property list"); + if(check_prop > 0) { + if(H5Pget(dxpl_id,H5D_XFER_COLL_CHUNK_NAME,&prop_value)<0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to get property value"); + if(!use_par_opt_io) { + new_value = 0; + if(H5Pset(dxpl_id,H5D_XFER_COLL_CHUNK_NAME,&new_value)<0) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value"); + } + } + } + /* end Test for collective chunk IO */ +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ + /* Don't reset the transfer mode if we can't or won't use it */ if(!use_par_opt_io || !H5T_path_noop(tpath)) H5D_io_assist_mpio(dxpl_id, dxpl_cache, &xfer_mode_changed); @@ -989,6 +992,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from memory to file data space") #ifdef H5_HAVE_PARALLEL +#ifdef H5_HAVE_INSTRUMENTED_LIBRARY /**** Test for collective chunk IO notice the following code should be removed after a more general collective chunk IO algorithm is applied. @@ -996,19 +1000,20 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, if(dataset->layout.type == H5D_CHUNKED) { /*only check for chunking storage */ - check_prop = H5Pexist(dxpl_id,"__test__ccfoo___"); + check_prop = H5Pexist(dxpl_id,H5D_XFER_COLL_CHUNK_NAME); if(check_prop < 0) HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to check property list"); if(check_prop > 0) { - if(H5Pget(dxpl_id,"__test__ccfoo___",&prop_value)<0) + if(H5Pget(dxpl_id,H5D_XFER_COLL_CHUNK_NAME,&prop_value)<0) HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to get property value"); if(!use_par_opt_io) { new_value = 0; - if(H5Pset(dxpl_id,"__test__ccfoo___",&new_value)<0) + if(H5Pset(dxpl_id,H5D_XFER_COLL_CHUNK_NAME,&new_value)<0) HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value"); } } } +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ /* end Test for collective chunk IO */ /* Don't reset the transfer mode if we can't or won't use it */ |