diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2013-09-23 20:20:54 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2013-09-23 20:20:54 (GMT) |
commit | 558150495335bce91ee680093d0f2ec8974333ce (patch) | |
tree | 1c3014d73d69bea49f1df0b2aa0402d60c6ed4da | |
parent | 0209e8d3fdab55d2e86fe4c4b2a37294fcaa1f25 (diff) | |
download | hdf5-558150495335bce91ee680093d0f2ec8974333ce.zip hdf5-558150495335bce91ee680093d0f2ec8974333ce.tar.gz hdf5-558150495335bce91ee680093d0f2ec8974333ce.tar.bz2 |
[svn-r24191] CHANGES:
- Removed multi-chunk-opt code and tests. (#ifdef JK_MCHUNK_OPT_REMOVE, #ifndef JK_TODO_MCHUNK_OPT)
- Make H5Dwrite go through multi-dset path.
- Undo the patch from Quincey , which checked in previous check-in. Code still left with #ifdef JK_FCLOSE_PATH, thus no effect. Just keep it now for later test. This is for testing purpose and will be removed when merge to trunk.
-rw-r--r-- | src/H5Dio.c | 2 | ||||
-rw-r--r-- | src/H5Dmpio.c | 74 | ||||
-rw-r--r-- | src/H5Dprivate.h | 2 | ||||
-rw-r--r-- | src/H5FDmpio.c | 8 | ||||
-rw-r--r-- | src/H5FDmpiposix.c | 2 | ||||
-rw-r--r-- | src/H5Fsuper_cache.c | 2 | ||||
-rw-r--r-- | src/H5Ppublic.h | 4 | ||||
-rw-r--r-- | src/H5trace.c | 2 | ||||
-rw-r--r-- | testpar/t_coll_chunk.c | 19 | ||||
-rw-r--r-- | testpar/t_dset.c | 83 | ||||
-rw-r--r-- | testpar/t_shapesame.c | 10 | ||||
-rw-r--r-- | testpar/testphdf5.c | 6 | ||||
-rw-r--r-- | testpar/testphdf5.h | 14 |
13 files changed, 161 insertions, 67 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c index b4b4afc..34e6784 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -369,7 +369,7 @@ done: * *------------------------------------------------------------------------- */ -#ifndef JK_ORI +#ifdef JK_ORI herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, const void *buf) diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 2ae3e90..64b7438 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -53,12 +53,15 @@ /* Macros to represent different IO options */ #define H5D_ONE_LINK_CHUNK_IO 0 +#ifdef JK_MCHUNK_OPT_REMOVE // ---I #define H5D_MULTI_CHUNK_IO 1 #define H5D_ONE_LINK_CHUNK_IO_MORE_OPT 2 #define H5D_MULTI_CHUNK_IO_MORE_OPT 3 -#ifndef JK_WORK -#define H5D_ALL_CHUNK_IND_IO 4 -#endif +#endif // JK_MCHUNK_OPT_REMOVE ---O +/* TODO: add this as part of HDFFV-8244 work for collectively + * independent IO feature + * #define H5D_ALL_PIECE_IND_IO 1 + */ /***** Macros for One linked collective IO case. *****/ /* The default value to do one linked collective IO for all chunks. @@ -80,9 +83,11 @@ collective IO is done for this chunk. */ +#ifdef JK_MCHUNK_OPT_REMOVE /* Macros to represent different IO modes(NONE, Independent or collective)for multiple chunk IO case */ #define H5D_CHUNK_IO_MODE_IND 0 #define H5D_CHUNK_IO_MODE_COL 1 +#endif /* Macros to represent the regularity of the selection for multiple chunk IO case. */ #define H5D_CHUNK_SELECT_REG 1 @@ -113,9 +118,11 @@ static herr_t H5D__chunk_collective_io(H5D_io_info_t *io_info, static herr_t H5D__piece_mdset_io(const hid_t file_id, const size_t count, H5D_io_info_md_t *io_info_md); #endif +#ifdef JK_MCHUNK_OPT_REMOVE static herr_t H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist); +#endif static herr_t H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, int sum_chunk, H5P_genplist_t *dx_plist); @@ -139,8 +146,10 @@ static herr_t H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm, static herr_t H5D__sort_piece(H5D_io_info_md_t *io_info_md, H5D_chunk_addr_info_t chunk_addr_info_array[], int sum_chunk); #endif +#ifdef JK_MCHUNK_OPT_REMOVE static herr_t H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist, uint8_t assign_io_mode[], haddr_t chunk_addr[]); +#endif static herr_t H5D__ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist, H5FD_mpio_xfer_t xfer_mode); static herr_t H5D__ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist, @@ -1010,11 +1019,17 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf { H5P_genplist_t *dx_plist; /* Pointer to DXPL */ H5FD_mpio_chunk_opt_t chunk_opt_mode; + #ifdef JK_MCHUNK_OPT_REMOVE int io_option = H5D_MULTI_CHUNK_IO_MORE_OPT; + #else // NEW + int io_option = H5D_ONE_LINK_CHUNK_IO; + #endif int sum_chunk = -1; +#ifdef JK_MCHUNK_OPT_REMOVE #ifdef H5_HAVE_INSTRUMENTED_LIBRARY htri_t temp_not_link_io = FALSE; #endif +#endif // JK_MCHUNK_OPT_REMOVE herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC @@ -1034,6 +1049,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf if(H5FD_MPIO_CHUNK_ONE_IO == chunk_opt_mode) io_option = H5D_ONE_LINK_CHUNK_IO; /*no opt*/ /* direct request to multi-chunk-io */ +#ifdef JK_MCHUNK_OPT_REMOVE else if(H5FD_MPIO_CHUNK_MULTI_IO == chunk_opt_mode) io_option = H5D_MULTI_CHUNK_IO; /* via default path. branch by num threshold */ @@ -1057,6 +1073,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf temp_not_link_io = TRUE; #endif } /* end else */ +#endif // JK_MCHUNK_OPT_REMOVE #ifdef H5_HAVE_INSTRUMENTED_LIBRARY { @@ -1077,6 +1094,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value") } /* end if */ } /* end if */ +#ifdef JK_MCHUNK_OPT_REMOVE check_prop = H5P_exist_plist(plist, H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME); if(check_prop > 0) { if(H5D_MULTI_CHUNK_IO == io_option) { @@ -1101,14 +1119,20 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value") } /* end if */ } /* end if */ +#endif // JK_MCHUNK_OPT_REMOVE } #endif /* step 2: Go ahead to do IO.*/ - if(H5D_ONE_LINK_CHUNK_IO == io_option || H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option) { + if(H5D_ONE_LINK_CHUNK_IO == io_option + #ifdef JK_MCHUNK_OPT_REMOVE + || H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option + #endif + ) { if(H5D__link_chunk_collective_io(io_info, type_info, fm, sum_chunk, dx_plist) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO") } /* end if */ + #ifdef JK_MCHUNK_OPT_REMOVE /* direct request to multi-chunk-io */ else if(H5D_MULTI_CHUNK_IO == io_option) { if(H5D__multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0) @@ -1118,6 +1142,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf if(H5D__multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish optimized multiple chunk MPI-IO") } /* end else */ + #endif // JK_MCHUNK_OPT_REMOVE done: FUNC_LEAVE_NOAPI(ret_value) @@ -1130,9 +1155,9 @@ H5D__piece_mdset_io(const hid_t file_id, const size_t count, H5D_io_info_md_t *i { H5P_genplist_t *dx_plist; /* Pointer to DXPL */ H5FD_mpio_chunk_opt_t chunk_opt_mode; - #ifdef JK_ORI + #ifdef JK_MCHUNK_OPT_REMOVE int io_option = H5D_MULTI_CHUNK_IO_MORE_OPT; - #else + #else // NEW int io_option = H5D_ONE_LINK_CHUNK_IO; #endif int sum_chunk = -1; @@ -1157,8 +1182,13 @@ H5D__piece_mdset_io(const hid_t file_id, const size_t count, H5D_io_info_md_t *i chunk_opt_mode = (H5FD_mpio_chunk_opt_t)H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME); if(H5FD_MPIO_CHUNK_ONE_IO == chunk_opt_mode) io_option = H5D_ONE_LINK_CHUNK_IO; /*no opt*/ + /* TODO: add this as part of HDFFV-8244 work for collectively + * independent IO feature */ + /* else if (H5FD_MPIO_ALL_PIECE_IND_IO == chunk_opt_mode) + io_option = H5D_ALL_PIECE_IND_IO; + */ + #ifdef JK_MCHUNK_OPT_REMOVE /* direct request to multi-chunk-io */ - #ifdef JK_TODO_LATER_ORI_REMOVE // else if(H5FD_MPIO_CHUNK_MULTI_IO == chunk_opt_mode) io_option = H5D_MULTI_CHUNK_IO; /* via default path. branch by num threshold */ @@ -1182,11 +1212,7 @@ H5D__piece_mdset_io(const hid_t file_id, const size_t count, H5D_io_info_md_t *i temp_not_link_io = TRUE; #endif } /* end else */ - #else - // JK_TODO add this as part of HDFFV-8244 work - // else if (H5FD_MPIO_ALL_CHUNK_IND_IO == chunk_opt_mode) - // io_option = H5D_ALL_CHUNK_IND_IO; - #endif // JK_TODO_LATER_ORI_REMOVE + #endif // JK_MCHUNK_OPT_REMOVE #ifdef H5_HAVE_INSTRUMENTED_LIBRARY htri_t check_prop; @@ -1201,6 +1227,7 @@ H5D__piece_mdset_io(const hid_t file_id, const size_t count, H5D_io_info_md_t *i HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value") } /* end if */ } /* end if */ +#ifdef JK_MCHUNK_OPT_REMOVE check_prop = H5Pexist(io_info_md->dxpl_id, H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME); if(check_prop > 0) { if(H5D_MULTI_CHUNK_IO == io_option) { @@ -1225,10 +1252,15 @@ H5D__piece_mdset_io(const hid_t file_id, const size_t count, H5D_io_info_md_t *i HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value") } /* end if */ } /* end if */ +#endif // JK_MCHUNK_OPT_REMOVE #endif /* step 2: Go ahead to do IO.*/ - if(H5D_ONE_LINK_CHUNK_IO == io_option || H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option) { + if(H5D_ONE_LINK_CHUNK_IO == io_option + #ifdef JK_MCHUNK_OPT_REMOVE + || H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option + #endif + ) { #ifdef JK_ORI if(H5D__link_chunk_collective_io(io_info, type_info, fm, sum_chunk, dx_plist) < 0) #else @@ -1236,7 +1268,7 @@ H5D__piece_mdset_io(const hid_t file_id, const size_t count, H5D_io_info_md_t *i #endif HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO") } /* end if */ - #ifdef JK_SKIP1 //------------------------I + #ifdef JK_MCHUNK_OPT_REMOVE /* direct request to multi-chunk-io */ else if(H5D_MULTI_CHUNK_IO == io_option) { if(H5D__multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0) @@ -1247,7 +1279,7 @@ H5D__piece_mdset_io(const hid_t file_id, const size_t count, H5D_io_info_md_t *i HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish optimized multiple chunk MPI-IO") } /* end else */ - #endif // JK_SKIP + #endif // JK_MCHUNK_OPT_REMOVE done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__piece_mdset_io */ @@ -1693,8 +1725,14 @@ H5D__all_piece_collective_io(UNUSED const hid_t file_id, const size_t count, #ifndef JK_ACTUALIO_MDSET if (io_info_md->dsets_info[i].layout->type == H5D_CHUNKED) actual_io_mode |= H5D_MPIO_CHUNK_COLLECTIVE; - else if (io_info_md->dsets_info[i].layout->type == H5D_CONTIGUOUS) + else if (io_info_md->dsets_info[i].layout->type == H5D_CONTIGUOUS) { actual_io_mode |= H5D_MPIO_CONTIGUOUS_COLLECTIVE; + #ifndef JK_TODO_MCHUNK_OPT + /* if only single-dset */ + if (1 == count) + actual_chunk_opt_mode = H5D_MPIO_NO_CHUNK_OPTIMIZATION; + #endif + } else HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") #endif @@ -2125,6 +2163,7 @@ if(H5DEBUG(D)) * *------------------------------------------------------------------------- */ +#ifdef JK_MCHUNK_OPT_REMOVE static herr_t H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist) @@ -2314,6 +2353,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__multi_chunk_collective_io */ +#endif // JK_MCHUNK_OPT_REMOVE @@ -2821,6 +2861,7 @@ done: * *------------------------------------------------------------------------- */ +#ifdef JK_MCHUNK_OPT_REMOVE static herr_t H5D__obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist, uint8_t assign_io_mode[], haddr_t chunk_addr[]) @@ -2990,4 +3031,5 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__obtain_mpio_mode() */ #endif /* H5_HAVE_PARALLEL */ +#endif // JK_MCHUNK_OPT_REMOVE diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 7adc231..538531f 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -82,11 +82,13 @@ #ifdef H5_HAVE_INSTRUMENTED_LIBRARY /* Collective chunk instrumentation properties */ #define H5D_XFER_COLL_CHUNK_LINK_HARD_NAME "coll_chunk_link_hard" +#ifdef JK_MCHUNK_OPT_REMOVE #define H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME "coll_chunk_multi_hard" #define H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME "coll_chunk_link_true" #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" +#endif // JK_MCHUNK_OPT_REMOVE /* Definitions for all collective chunk instrumentation properties */ #define H5D_XFER_COLL_CHUNK_SIZE sizeof(unsigned) diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 508cff3..a2075e5 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -632,6 +632,9 @@ done: * *------------------------------------------------------------------------- */ +/* TODO: This can be removed as we decided to remove multi-chunk-opt feature. + * For now, leave it here to make 'enc_dec_plist_with_endianess' test pass. + * This can be removed after HDFFV-8281 done */ herr_t H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc) { @@ -677,6 +680,9 @@ done: * *------------------------------------------------------------------------- */ +/* TODO: This can be removed as we decided to remove multi-chunk-opt feature. + * For now, leave it here to make 'enc_dec_plist_with_endianess' test pass. + * This can be removed after HDFFV-8281 done */ herr_t H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_chunk) { @@ -1999,7 +2005,7 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing) HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "cannot convert from haddr_t to MPI_Offset") /* Extend the file's size */ - #ifndef JK_FCLOSE_PATCH // from Quincey to make Fclose faster + #ifdef JK_FCLOSE_PATCH // from Quincey to make Fclose faster // Suren's modifications to disable truncate // Original code: commented out the following 2 lines // if(MPI_SUCCESS != (mpi_code = MPI_File_set_size(file->f, mpi_off))) diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c index 9797502..e8f1e4b 100644 --- a/src/H5FDmpiposix.c +++ b/src/H5FDmpiposix.c @@ -1380,7 +1380,7 @@ H5FD_mpiposix_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closi if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position") #endif /* H5_VMS */ - #ifndef JK_FCLOSE_PATCH // from Quincey to make Fclose faster + #ifdef JK_FCLOSE_PATCH // from Quincey to make Fclose faster // Suren modification to disable file_truncate // Original code: two lines commented out // if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index debf948..7b88336 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -475,7 +475,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata) /* (Account for the stored EOA being absolute offset -QAK) */ if((eof + sblock->base_addr) < stored_eoa) - #ifndef JK_FCLOSE_PATCH // from Quincey to make Fclose faster + #ifdef JK_FCLOSE_PATCH // from Quincey to make Fclose faster if((shared->flags & H5F_ACC_RDWR) || getenv("HDF5_TRUNCATE")) { HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, NULL, "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eoa = %llu", (unsigned long long)eof, (unsigned long long)sblock->base_addr, (unsigned long long)stored_eoa) } diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 6b17e0b..2962e12 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -130,8 +130,12 @@ typedef enum H5D_mpio_actual_chunk_opt_mode_t { * I/O and contiguous collective I/O. */ H5D_MPIO_NO_CHUNK_OPTIMIZATION = 0, + #ifdef JK_MCHUNK_OPT_REMOVE H5D_MPIO_LINK_CHUNK, H5D_MPIO_MULTI_CHUNK + #else + H5D_MPIO_LINK_CHUNK + #endif } H5D_mpio_actual_chunk_opt_mode_t; typedef enum H5D_mpio_actual_io_mode_t { diff --git a/src/H5trace.c b/src/H5trace.c index 2babcd4..5a98f16 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -608,9 +608,11 @@ H5_trace(const double *returning, const char *func, const char *type, ...) fprintf(out, "H5D_MPIO_LINK_CHUNK"); break; + #ifdef JK_MCHUNK_OPT_REMOVE case H5D_MPIO_MULTI_CHUNK: fprintf(out, "H5D_MPIO_MULTI_CHUNK"); break; + #endif default: fprintf(out, "%ld", (long)chunk_opt_mode); diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index 73e7f09..2c04358 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -292,7 +292,7 @@ coll_chunk5(void) * * ------------------------------------------------------------------------ */ - +#ifdef JK_MCHUNK_OPT_REMOVE void coll_chunk6(void) { @@ -300,6 +300,7 @@ coll_chunk6(void) coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_MULTI_HARD); } +#endif /*------------------------------------------------------------------------- * Function: coll_chunk7 @@ -337,6 +338,7 @@ coll_chunk6(void) * ------------------------------------------------------------------------ */ +#ifdef JK_MCHUNK_OPT_REMOVE void coll_chunk7(void) { @@ -344,6 +346,7 @@ coll_chunk7(void) coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_LINK_TRUE); } +#endif /*------------------------------------------------------------------------- * Function: coll_chunk8 @@ -381,6 +384,7 @@ coll_chunk7(void) * ------------------------------------------------------------------------ */ +#ifdef JK_MCHUNK_OPT_REMOVE void coll_chunk8(void) { @@ -388,6 +392,7 @@ coll_chunk8(void) coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_LINK_FALSE); } +#endif /*------------------------------------------------------------------------- * Function: coll_chunk9 @@ -424,7 +429,7 @@ coll_chunk8(void) * * ------------------------------------------------------------------------ */ - +#ifdef JK_MCHUNK_OPT_REMOVE void coll_chunk9(void) { @@ -432,6 +437,7 @@ coll_chunk9(void) coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_MULTI_COLL); } +#endif /*------------------------------------------------------------------------- * Function: coll_chunk10 @@ -469,6 +475,7 @@ coll_chunk9(void) * ------------------------------------------------------------------------ */ +#ifdef JK_MCHUNK_OPT_REMOVE void coll_chunk10(void) { @@ -476,7 +483,7 @@ coll_chunk10(void) coll_chunktest(filename, 4, BYROW_SELECTINCHUNK, API_MULTI_IND); } - +#endif /*------------------------------------------------------------------------- * Function: coll_chunktest @@ -605,6 +612,7 @@ coll_chunktest(const char* filename, status = H5Pset_dxpl_mpio_chunk_opt(xfer_plist,H5FD_MPIO_CHUNK_ONE_IO); VRFY((status>= 0),"collective chunk optimization succeeded"); break; +#ifdef JK_MCHUNK_OPT_REMOVE case API_MULTI_HARD: status = H5Pset_dxpl_mpio_chunk_opt(xfer_plist,H5FD_MPIO_CHUNK_MULTI_IO); VRFY((status>= 0),"collective chunk optimization succeeded "); @@ -629,6 +637,7 @@ coll_chunktest(const char* filename, status = H5Pset_dxpl_mpio_chunk_opt_ratio(xfer_plist,100); VRFY((status>= 0),"collective chunk optimization set chunk ratio succeeded"); break; +#endif default: ; } @@ -644,6 +653,7 @@ coll_chunktest(const char* filename, break; +#ifdef JK_MCHUNK_OPT_REMOVE case API_MULTI_HARD: prop_value = H5D_XFER_COLL_CHUNK_DEF; status = H5Pinsert2(xfer_plist, H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME, H5D_XFER_COLL_CHUNK_SIZE, &prop_value, @@ -679,6 +689,7 @@ coll_chunktest(const char* filename, NULL, NULL, NULL, NULL, NULL, NULL); VRFY((status >= 0),"testing property list inserted succeeded"); break; +#endif // JK_MCHUNK_OPT_REMOVE default: ; @@ -699,6 +710,7 @@ coll_chunktest(const char* filename, VRFY((status >= 0),"testing property list get succeeded"); VRFY((prop_value == 0),"API to set LINK COLLECTIVE IO directly succeeded"); break; +#ifdef JK_MCHUNK_OPT_REMOVE case API_MULTI_HARD: status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME,&prop_value); VRFY((status >= 0),"testing property list get succeeded"); @@ -724,6 +736,7 @@ coll_chunktest(const char* filename, VRFY((status >= 0),"testing property list get succeeded"); VRFY((prop_value == 0),"API to set MULTI-CHUNK IO transferring to independent IO succeeded"); break; +#endif // JK_MCHUNK_OPT_REMOVE default: ; } diff --git a/testpar/t_dset.c b/testpar/t_dset.c index f1dd856..d9648e8 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -2510,26 +2510,6 @@ none_selection_chunk(void) * as some dxpl flags to get collective I/O to break in different ways. * * The relevant I/O function and expected response for each mode: - * TEST_ACTUAL_IO_MULTI_CHUNK_IND: - * H5D_mpi_chunk_collective_io, each process reports independent I/O - * - * TEST_ACTUAL_IO_MULTI_CHUNK_COL: - * H5D_mpi_chunk_collective_io, each process reports collective I/O - * - * TEST_ACTUAL_IO_MULTI_CHUNK_MIX: - * H5D_mpi_chunk_collective_io, each process reports mixed I/O - * - * TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE: - * H5D_mpi_chunk_collective_io, processes disagree. The root reports - * collective, the rest report independent I/O - * - * TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_IND: - * Same test TEST_ACTUAL_IO_MULTI_CHUNK_IND. - * Set directly go to multi-chunk-io without num threshold calc. - * TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_COL: - * Same test TEST_ACTUAL_IO_MULTI_CHUNK_COL. - * Set directly go to multi-chunk-io without num threshold calc. - * * TEST_ACTUAL_IO_LINK_CHUNK: * H5D_link_chunk_collective_io, processes report linked chunk I/O * @@ -2543,9 +2523,8 @@ none_selection_chunk(void) * TEST_ACTUAL_IO_RESET: * Perfroms collective and then independent I/O wit hthe same dxpl to * make sure the peroperty is correctly reset to the default on each use. - * Specifically, this test runs TEST_ACTUAL_IO_MULTI_CHUNK_NO_OPT_MIX_DISAGREE - * (The most complex case that works on all builds) and then performs - * an independent read and write with the same dxpls. + * This test shares with TEST_ACTUAL_IO_LINK_CHUNK case + * and then performs an independent read and write with the same dxpls. * * Note: DIRECT_MULTI_CHUNK_MIX and DIRECT_MULTI_CHUNK_MIX_DISAGREE * is not needed as they are covered by DIRECT_CHUNK_MIX and @@ -2553,6 +2532,11 @@ none_selection_chunk(void) * path way to multi-chunk-io by H5FD_MPIO_CHUNK_MULTI_IO insted of num-threshold. * * Modification: + * - Work for HDFFV-8313. Removed multi-chunk-opt related cases + * - by decision to remove multi-chunk-opt feature. + * - Jonathan Kim (2013-09-19) + * + * Modification: * - Refctore to remove multi-chunk-without-opimization test and update for * testing direct to multi-chunk-io * Programmer: Jonathan Kim @@ -2572,8 +2556,10 @@ test_actual_io_mode(int selection_mode) { H5D_mpio_actual_io_mode_t actual_io_mode_expected = -1; const char * filename; const char * test_name; + #ifdef JK_MCHUNK_OPT_REMOVE hbool_t direct_multi_chunk_io; hbool_t multi_chunk_io; + #endif hbool_t is_chunked; hbool_t is_collective; int mpi_size = -1; @@ -2603,6 +2589,7 @@ test_actual_io_mode(int selection_mode) { char message[256]; herr_t ret; + #ifdef JK_MCHUNK_OPT_REMOVE /* Set up some flags to make some future if statements slightly more readable */ direct_multi_chunk_io = ( selection_mode == TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_IND || @@ -2617,6 +2604,7 @@ test_actual_io_mode(int selection_mode) { selection_mode == TEST_ACTUAL_IO_MULTI_CHUNK_MIX || selection_mode == TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE || selection_mode == TEST_ACTUAL_IO_RESET ); + #endif is_chunked = ( selection_mode != TEST_ACTUAL_IO_CONTIGUOUS && @@ -2678,6 +2666,7 @@ test_actual_io_mode(int selection_mode) { * and also set up some selection-dependeent test info. */ switch(selection_mode) { + #ifdef JK_MCHUNK_OPT_REMOVE /* Independent I/O with optimization */ case TEST_ACTUAL_IO_MULTI_CHUNK_IND: case TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_IND: @@ -2787,13 +2776,31 @@ test_actual_io_mode(int selection_mode) { actual_io_mode_expected = H5D_MPIO_CHUNK_MIXED; break; + #endif // JK_MCHUNK_OPT_REMOVE + #ifndef JK_TODO_MCHUNK_OPT + /* RESET tests that the properties are properly reset to defaults each time I/O is + * performed. To acheive this, we have RESET perform collective I/O (which would change + * the values from the defaults) followed by independent I/O (which should report the + * default values). RESET doesn't need to have a unique selection, so we just reuse + * LINK_CHUNK, The independent section of RESET can be found at the end of this function. + */ + case TEST_ACTUAL_IO_RESET: + #endif /* Linked Chunk I/O */ case TEST_ACTUAL_IO_LINK_CHUNK: /* Nothing special; link chunk I/O is forced in the dxpl settings. */ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYROW); + #ifndef JK_TODO_MCHUNK_OPT + /* If the testname was not already set by the RESET case */ + if (selection_mode == TEST_ACTUAL_IO_RESET) + test_name = "RESET"; + else + test_name = "Link Chunk"; + #else // ORI test_name = "Link Chunk"; + #endif actual_chunk_opt_mode_expected = H5D_MPIO_LINK_CHUNK; actual_io_mode_expected = H5D_MPIO_CHUNK_COLLECTIVE; break; @@ -2863,6 +2870,7 @@ test_actual_io_mode(int selection_mode) { ret = H5Pset_dxpl_mpio(dxpl_write, H5FD_MPIO_COLLECTIVE); VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); + #ifdef JK_MCHUNK_OPT_REMOVE /* Set the threshold number of processes per chunk to twice mpi_size. * This will prevent the threshold from ever being met, thus forcing * multi chunk io instead of link chunk io. @@ -2885,6 +2893,7 @@ test_actual_io_mode(int selection_mode) { ret = H5Pset_dxpl_mpio_chunk_opt(dxpl_write, H5FD_MPIO_CHUNK_MULTI_IO); VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); } + #endif } /* Make a copy of the dxpl to test the read operation */ @@ -2935,6 +2944,9 @@ test_actual_io_mode(int selection_mode) { /* To test that the property is succesfully reset to the default, we perform some * independent I/O after the collective I/O + * For the above collective I/O actual_chunk_opt_mode for read/write was + * expected as H5D_MPIO_LINK_CHUNK, but they are expected as + * H5D_MPIO_NO_CHUNK_OPTIMIZATION for independent I/O here. */ if (selection_mode == TEST_ACTUAL_IO_RESET) { if (mpi_rank == 0) { @@ -2995,6 +3007,11 @@ test_actual_io_mode(int selection_mode) { * * Purpose: Tests all possible cases of the actual_io_mode property. * + * Modification: + * - Work base for HDFFV-8313. Removed multi-chunk-opt related cases + * - by decision to remove multi-chunk-opt feature. + * - Jonathan Kim (2013-09-19) + * * Programmer: Jacob Gruber * Date: 2011-04-06 */ @@ -3007,25 +3024,27 @@ actual_io_mode_tests(void) { test_actual_io_mode(TEST_ACTUAL_IO_NO_COLLECTIVE); + #ifdef JK_MCHUNK_OPT_REMOVE /* * Test multi-chunk-io via proc_num threshold */ - test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_IND); - test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_COL); + //test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_IND); // FAIL + //test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_COL); // FAIL /* The Multi Chunk Mixed test requires atleast three processes. */ - if (mpi_size > 2) - test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX); - else - HDfprintf(stdout, "Multi Chunk Mixed test requires 3 proceses minimum\n"); + //if (mpi_size > 2) + // test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX); // FAIL + //else + // HDfprintf(stdout, "Multi Chunk Mixed test requires 3 proceses minimum\n"); - test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE); + //test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE); // FAIL /* * Test multi-chunk-io via setting direct property */ - test_actual_io_mode(TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_IND); - test_actual_io_mode(TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_COL); + //test_actual_io_mode(TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_IND); // FAIL + //test_actual_io_mode(TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_COL); // FAIL + #endif // JK_MCHUNK_OPT_REMOVE test_actual_io_mode(TEST_ACTUAL_IO_LINK_CHUNK); test_actual_io_mode(TEST_ACTUAL_IO_CONTIGUOUS); diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index a5c6f0a..d4fa7f9 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -1517,7 +1517,7 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) * need for another inner loop. */ - #ifndef JK_TEST_MAN_ORI + #ifndef JK_TEST_MAN_ORI /* zero out this rank's slice of the on disk small data set */ ret = H5Dwrite(tv_ptr->small_dataset, H5T_NATIVE_UINT32, @@ -2221,7 +2221,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, * the memory and file selections. */ -#ifndef JK_TEST_SKIP_ISSUE1 +#ifndef JK_TEST_SKIP_ISSUE1 // OK now #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if ( MAINPROCESS ) { HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_l2s.\n", test_num); @@ -4512,7 +4512,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, * in memory small small cube */ -#ifndef JK_TEST_OK +#ifndef JK_TEST_SKIP_OK ckrbrd_hs_dr_pio_test__d2m_l2s(tv_ptr); @@ -4536,7 +4536,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, * the memory and file selections. */ -#ifndef JK_TEST_ISSUE1 +#ifndef JK_TEST_ISSUE1 // OK now ckrbrd_hs_dr_pio_test__m2d_l2s(tv_ptr); #endif @@ -4549,7 +4549,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, * and file selections. */ -#ifndef JK_TEST_OK2 +#ifndef JK_TEST_SKIP_OK2 ckrbrd_hs_dr_pio_test__m2d_s2l(tv_ptr); #endif diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 20ff4b2..baae21f 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -438,7 +438,7 @@ int main(int argc, char **argv) AddTest((mpi_size <3)? "-cchunk5":"cchunk5" , coll_chunk5,NULL, "linked chunk collective IO without optimization",PARATESTFILE); - #ifdef JK_TODO_TESTP_SKIP + #ifdef JK_MCHUNK_OPT_REMOVE AddTest((mpi_size < 3)? "-cchunk6" : "cchunk6", coll_chunk6,NULL, "multi-chunk collective IO with direct request",PARATESTFILE); @@ -454,7 +454,7 @@ int main(int argc, char **argv) AddTest((mpi_size < 3)? "-cchunk10" : "cchunk10", coll_chunk10,NULL, "multiple chunk collective IO transferring to independent IO",PARATESTFILE); - #endif // JK_ + #endif // JK_MCHUNK_OPT_REMOVE @@ -504,12 +504,10 @@ int main(int argc, char **argv) "test mpi derived type management", PARATESTFILE); - #ifdef JK_TODO_TESTP_SKIP AddTest("actualio", actual_io_mode_tests, NULL, "test actual io mode proprerty", PARATESTFILE); - #endif // JK_ AddTest("nocolcause", no_collective_cause_tests, NULL, "test cause for broken collective io", PARATESTFILE); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 15ff884..5358ea2 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -20,10 +20,13 @@ #include "testpar.h" +#ifdef JK_MCHUNK_OPT_REMOVE enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD, API_MULTI_HARD,API_LINK_TRUE,API_LINK_FALSE, API_MULTI_COLL,API_MULTI_IND}; - +#else // NEW +enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD, API_IND_HARD}; +#endif #ifndef FALSE #define FALSE 0 #endif @@ -165,14 +168,16 @@ enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD, /* Definitions of the selection mode for the test_actual_io_function. */ #define TEST_ACTUAL_IO_NO_COLLECTIVE 0 #define TEST_ACTUAL_IO_RESET 1 +#ifdef JK_MCHUNK_OPT_REMOVE #define TEST_ACTUAL_IO_MULTI_CHUNK_IND 2 #define TEST_ACTUAL_IO_MULTI_CHUNK_COL 3 #define TEST_ACTUAL_IO_MULTI_CHUNK_MIX 4 #define TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE 5 #define TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_IND 6 #define TEST_ACTUAL_IO_DIRECT_MULTI_CHUNK_COL 7 -#define TEST_ACTUAL_IO_LINK_CHUNK 8 -#define TEST_ACTUAL_IO_CONTIGUOUS 9 +#endif // JK_MCHUNK_OPT_REMOVE +#define TEST_ACTUAL_IO_LINK_CHUNK 2 +#define TEST_ACTUAL_IO_CONTIGUOUS 3 /* Definitions of the selection mode for the no_collective_cause_tests function. */ #define TEST_COLLECTIVE 0x001 @@ -290,6 +295,9 @@ void file_image_daisy_chain_test(void); void compress_readAll(void); #endif /* H5_HAVE_FILTER_DEFLATE */ void test_dense_attr(void); +#ifdef JK_PETER_FIX // REMOVE +void test_zero_size_contiguous(void); +#endif /* commonly used prototypes */ hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, hbool_t use_gpfs); |