From 94d14191fa5c770ba0ee56f36024e57645a9d456 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Wed, 23 Oct 2019 14:41:45 -0400 Subject: Change API names for get/set bitio_count. Also added H5_mpi_set_bigio_count to H5private.h. --- src/H5Smpio.c | 10 +++++----- src/H5mpi.c | 10 +++++----- src/H5private.h | 3 ++- testpar/t_bigio.c | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/H5Smpio.c b/src/H5Smpio.c index 9112d24..f605a8a 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -140,7 +140,7 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, H5_CHECKED_ASSIGN(nelmts, hsize_t, snelmts, hssize_t); total_bytes = (hsize_t)elmt_size * nelmts; - bigio_count = H5_mpio_get_bigio_count(); + bigio_count = H5_mpi_get_bigio_count(); /* Verify that the size can be expressed as a 32 bit integer */ if(bigio_count >= total_bytes) { @@ -229,7 +229,7 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code) elmt_type_created = TRUE; - bigio_count = H5_mpio_get_bigio_count(); + bigio_count = H5_mpi_get_bigio_count(); /* Check whether standard or BIGIO processing will be employeed */ if(bigio_count >= num_points) { @@ -668,7 +668,7 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, HDassert(space); HDassert(sizeof(MPI_Aint) >= sizeof(elmt_size)); - bigio_count = H5_mpio_get_bigio_count(); + bigio_count = H5_mpi_get_bigio_count(); /* Initialize selection iterator */ if(H5S_select_iter_init(&sel_iter, space, elmt_size, 0) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") @@ -988,7 +988,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, HDassert(space->select.sel_info.hslab->span_lst); HDassert(space->select.sel_info.hslab->span_lst->head); - bigio_count = H5_mpio_get_bigio_count(); + bigio_count = H5_mpi_get_bigio_count(); /* Create the base type for an element */ if(bigio_count >= elmt_size) { if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &elmt_type))) @@ -1117,7 +1117,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, HDassert(spans); HDassert(type_list); - bigio_count = H5_mpio_get_bigio_count(); + bigio_count = H5_mpi_get_bigio_count(); /* Check if we've visited this span tree before */ if(spans->op_gen != op_gen) { H5S_mpio_mpitype_node_t *type_node; /* Pointer to new node in MPI data type list */ diff --git a/src/H5mpi.c b/src/H5mpi.c index f01e16a..f529b3d 100644 --- a/src/H5mpi.c +++ b/src/H5mpi.c @@ -38,7 +38,7 @@ static hsize_t bigio_count = H5_MAX_MPI_COUNT; /*------------------------------------------------------------------------- - * Function: H5_mpio_set_bigio_count + * Function: H5_mpi_set_bigio_count * * Purpose: Allow us to programatically change the switch point * when we utilize derived datatypes. This is of @@ -51,7 +51,7 @@ static hsize_t bigio_count = H5_MAX_MPI_COUNT; *------------------------------------------------------------------------- */ hsize_t -H5_mpio_set_bigio_count(hsize_t new_count) +H5_mpi_set_bigio_count(hsize_t new_count) { hsize_t orig_count = bigio_count; @@ -59,11 +59,11 @@ H5_mpio_set_bigio_count(hsize_t new_count) bigio_count = new_count; } return orig_count; -} /* end H5_mpio_set_bigio_count() */ +} /* end H5_mpi_set_bigio_count() */ /*------------------------------------------------------------------------- - * Function: H5_mpio_get_bigio_count + * Function: H5_mpi_get_bigio_count * * Purpose: Allow other HDF5 library functions to access * the current value for bigio_count. @@ -75,7 +75,7 @@ H5_mpio_set_bigio_count(hsize_t new_count) *------------------------------------------------------------------------- */ hsize_t -H5_mpio_get_bigio_count() +H5_mpi_get_bigio_count() { return bigio_count; } diff --git a/src/H5private.h b/src/H5private.h index 4ae9f12..0bfc91b 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -2670,7 +2670,8 @@ H5_DLL herr_t H5_combine_path(const char *path1, const char *path2, char **ful #ifdef H5_HAVE_PARALLEL /* Generic MPI functions */ -H5_DLL hsize_t H5_mpio_get_bigio_count(); +H5_DLL hsize_t H5_mpi_set_bigio_count(hsize_t new_count); +H5_DLL hsize_t H5_mpi_get_bigio_count(); H5_DLL herr_t H5_mpi_comm_dup(MPI_Comm comm, MPI_Comm *comm_new); H5_DLL herr_t H5_mpi_info_dup(MPI_Info info, MPI_Info *info_new); H5_DLL herr_t H5_mpi_comm_free(MPI_Comm *comm); diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index fe96c83..c6a1178 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -53,7 +53,7 @@ static void coll_chunktest(const char* filename, int chunk_factor, int select_fa int api_option, int file_selection, int mem_selection, int mode); hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type); -hsize_t H5_mpio_set_bigio_count(hsize_t new_count); +hsize_t H5_mpi_set_bigio_count(hsize_t new_count); /* * Setup the coordinates for point selection. @@ -1928,7 +1928,7 @@ int main(int argc, char **argv) int ExpressMode = 0; hsize_t newsize = 1048576; /* Set the bigio processing limit to be 'newsize' bytes */ - hsize_t oldsize = H5_mpio_set_bigio_count(newsize); + hsize_t oldsize = H5_mpi_set_bigio_count(newsize); /* Having set the bigio handling to a size that is managable, * we'll set our 'bigcount' variable to be 2X that limit so -- cgit v0.12 From 299c9ed5fe19edac37cab27bc04d587fa67568c2 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Fri, 25 Oct 2019 11:28:21 -0400 Subject: Removed set_bigio_count prototype since it has been added to H5private.h --- testpar/t_bigio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index c6a1178..12c1023 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -53,8 +53,6 @@ static void coll_chunktest(const char* filename, int chunk_factor, int select_fa int api_option, int file_selection, int mem_selection, int mode); hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type); -hsize_t H5_mpi_set_bigio_count(hsize_t new_count); - /* * Setup the coordinates for point selection. */ -- cgit v0.12