From 4fa8fe270ccc29c93b6fd898e39220377c71e446 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 23 Apr 2003 16:19:51 -0500 Subject: [svn-r6741] Purpose: code cleanup. Description: Rename test_comm_info_delete to test_fapl_mpio_dup to better decribe what it does. Updated the comments to describe more accurate. Platforms tested: Did not run h5commmittest since the changes were all in parallel area. Ran parallel tests on modi4 and eirene. Misc. update: --- testpar/t_ph5basic.c | 12 ++++++++---- testpar/testphdf5.c | 4 ++-- testpar/testphdf5.h | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/testpar/t_ph5basic.c b/testpar/t_ph5basic.c index 75cbc60..ef44152 100644 --- a/testpar/t_ph5basic.c +++ b/testpar/t_ph5basic.c @@ -21,10 +21,11 @@ /*------------------------------------------------------------------------- - * Function: test_comm_info_delete + * Function: test_fapl_mpio_dup * - * Purpose: Test if communicator and INFO object can be safely deleted - * after calling H5Pset_fapl_mpio. + * Purpose: Test if fapl_mpio property list keeps a duplicate of the + * communicator and INFO objects given when set; and returns + * duplicates of its components when H5Pget_fapl_mpio is called. * * Return: Success: None * @@ -37,7 +38,7 @@ *------------------------------------------------------------------------- */ void -test_comm_info_delete(void) +test_fapl_mpio_dup(void) { int mpi_size, mpi_rank; MPI_Comm comm, comm_tmp; @@ -56,6 +57,8 @@ test_comm_info_delete(void) /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); + if (verbose) + printf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size); /* Create a new communicator that has the same processes as MPI_COMM_WORLD. * Use MPI_Comm_split because it is simplier than MPI_Comm_create @@ -144,6 +147,7 @@ test_comm_info_delete(void) VRFY((ret >= 0), "H5Pget_fapl_mpio neither"); /* now get both and check validity too. */ + /* Donot free the returned objects which are used in the next case. */ ret = H5Pget_fapl_mpio(acc_pl, &comm_tmp, &info_tmp); VRFY((ret >= 0), "H5Pget_fapl_mpio"); MPI_Comm_size(comm_tmp,&mpi_size_tmp); diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 98d394a..7aee5cd 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -355,8 +355,8 @@ int main(int argc, char **argv) goto finish; } - MPI_BANNER("test_comm_info_delete..."); - test_comm_info_delete(); + MPI_BANNER("test_fapl_mpio_dup..."); + test_fapl_mpio_dup(); if (ndatasets){ MPI_BANNER("multiple datasets write ..."); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 827f3b0..ced5841 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -120,6 +120,7 @@ void multiple_group_write(char *filename, int ngroups); void multiple_group_read(char *filename, int ngroups); void collective_group_write(char *filename, int ngroups); void independent_group_read(char *filename, int ngroups); +void test_fapl_mpio_dup(void); void test_split_comm_access(char *filename); void dataset_writeInd(char *filename); void dataset_writeAll(char *filename); -- cgit v0.12