summaryrefslogtreecommitdiffstats
path: root/testpar/testphdf5.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2003-04-18 03:04:56 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2003-04-18 03:04:56 (GMT)
commit49fa61246edc571924884c9cd9a112cec53ade2a (patch)
treef8fab274e42a41d3fc8de914a16dce20a207b6cf /testpar/testphdf5.c
parent3585f15d915ad6c28abbfc45961db274dccf1684 (diff)
downloadhdf5-49fa61246edc571924884c9cd9a112cec53ade2a.zip
hdf5-49fa61246edc571924884c9cd9a112cec53ade2a.tar.gz
hdf5-49fa61246edc571924884c9cd9a112cec53ade2a.tar.bz2
[svn-r6709] Purpose:
Bug fixes/API changes Description: Previously, the Communicator and Info object arguments supplied to H5Pset_fapl_mpio() are stored in the property with its handle values. This meant changes to the communicator or the Info object after calling H5Pset_fapl_mpio would affect the how the property list function. This was also the case when H5Fopen/create operated. They just stored the handle value. This is not according to the MPI-2 defined behavior of how Info objects should be handled. (MPI-2 defines Info objects must be parsed when called.) The old design was trying to avoid numerous duplicates of the same information (e.g., every property object holds one version, every file opened holds another version, when all of them are referring to the same original version.) Nevertheless it is safer to implement it according to MPI-2 definition. Futhermore, the library often needs to do message passing using the supplied communicator. Using the same communicator as the application version may result in some messages mix up. Solution: H5Pset_fapl_mpio now stores a duplicate of each of the communicator and Info object. H5Pget_fapl_mpio returns a duplicate of its stored communicator and Info object. It is now the responsibility of the applications to free those objects when done. H5Fopen/create also stores a duplicate of the communicator and Info object supplied by the File Access Property list. H5Fclose frees those duplicates. There are a few more internal VFL call back functions that they follow this "make duplicates" requirement. Platforms tested: "h5committested". What other platforms/configurations were tested? Eirene (mpicc), sol(mpicc), copper(parallel) Misc. update: Need to update MANIFEST for the added t_ph5basic.c which tests the correctness of duplicated communicator and INFO object.
Diffstat (limited to 'testpar/testphdf5.c')
-rw-r--r--testpar/testphdf5.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index f7846d7..98d394a 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -343,6 +343,7 @@ int main(int argc, char **argv)
printf("PHDF5 TESTS START\n");
printf("===================================\n");
}
+ H5open();
h5_show_hostname();
fapl = H5Pcreate (H5P_FILE_ACCESS);
@@ -354,6 +355,9 @@ int main(int argc, char **argv)
goto finish;
}
+ MPI_BANNER("test_comm_info_delete...");
+ test_comm_info_delete();
+
if (ndatasets){
MPI_BANNER("multiple datasets write ...");
multiple_dset_write(filenames[3], ndatasets);
@@ -431,6 +435,10 @@ int main(int argc, char **argv)
}
finish:
+ /* make sure all processes are finished before final report, cleanup
+ * and exit.
+ */
+ MPI_Barrier(MPI_COMM_WORLD);
if (MAINPROCESS){ /* only process 0 reports */
printf("===================================\n");
if (nerrors){
@@ -441,9 +449,6 @@ finish:
}
printf("===================================\n");
}
-
- /* make sure all processes are finished before starting cleanup and exit */
- MPI_Barrier(MPI_COMM_WORLD);
if (dowrite){
h5_cleanup(FILENAME, fapl);
} else {
@@ -453,6 +458,7 @@ finish:
/* close HDF5 library */
H5close();
+
/* MPI_Finalize must be called AFTER H5close which may use MPI calls */
MPI_Finalize();
return(nerrors);