diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-06-10 19:05:06 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-06-10 19:05:06 (GMT) |
commit | 204b89902904a59f4e14e788bcca065e2c358f0b (patch) | |
tree | 7d44f63b311a95ba467ddb94f1a2f996b35a56a5 /testpar | |
parent | 6ea525228102ecc40e9c5a0fa16c9427366d8b75 (diff) | |
download | hdf5-204b89902904a59f4e14e788bcca065e2c358f0b.zip hdf5-204b89902904a59f4e14e788bcca065e2c358f0b.tar.gz hdf5-204b89902904a59f4e14e788bcca065e2c358f0b.tar.bz2 |
[svn-r7019] Purpose:
Compatibility fix
Description:
The H5P[set|get]_fapl_mpiposix calls changed between v1.4.x and v1.5.x.
Solution:
Wrap them in the v1.4 backward compatibility #ifdefs and update tests, etc.
Platforms tested:
FreeBSD 4.8 (sleipnir) w/paralle & v1.4 compatibility
h5committest pointless
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_ph5basic.c | 18 | ||||
-rw-r--r-- | testpar/testphdf5.c | 4 |
2 files changed, 22 insertions, 0 deletions
diff --git a/testpar/t_ph5basic.c b/testpar/t_ph5basic.c index eb0048b..92c4e61 100644 --- a/testpar/t_ph5basic.c +++ b/testpar/t_ph5basic.c @@ -219,7 +219,9 @@ test_fapl_mpiposix_dup(void) int mpi_size_tmp, mpi_rank_tmp; int mrc; /* MPI return value */ hid_t acc_pl; /* File access properties */ +#ifndef H5_WANT_H5_V1_4_COMPAT hbool_t use_gpfs = FALSE; +#endif /* H5_WANT_H5_V1_4_COMPAT */ herr_t ret; /* hdf5 return value */ if (verbose) @@ -244,7 +246,11 @@ test_fapl_mpiposix_dup(void) acc_pl = H5Pcreate (H5P_FILE_ACCESS); VRFY((acc_pl >= 0), "H5P_FILE_ACCESS"); +#ifdef H5_WANT_H5_V1_4_COMPAT + ret = H5Pset_fapl_mpiposix(acc_pl, comm); +#else /* H5_WANT_H5_V1_4_COMPAT */ ret = H5Pset_fapl_mpiposix(acc_pl, comm, use_gpfs); +#endif /* H5_WANT_H5_V1_4_COMPAT */ VRFY((ret >= 0), ""); /* Case 1: @@ -255,7 +261,11 @@ test_fapl_mpiposix_dup(void) mrc = MPI_Comm_free(&comm); VRFY((mrc==MPI_SUCCESS), "MPI_Comm_free"); +#ifdef H5_WANT_H5_V1_4_COMPAT + ret = H5Pget_fapl_mpiposix(acc_pl, &comm_tmp); +#else /* H5_WANT_H5_V1_4_COMPAT */ ret = H5Pget_fapl_mpiposix(acc_pl, &comm_tmp, &use_gpfs); +#endif /* H5_WANT_H5_V1_4_COMPAT */ VRFY((ret >= 0), "H5Pget_fapl_mpiposix"); MPI_Comm_size(comm_tmp,&mpi_size_tmp); MPI_Comm_rank(comm_tmp,&mpi_rank_tmp); @@ -275,12 +285,20 @@ test_fapl_mpiposix_dup(void) VRFY((mrc==MPI_SUCCESS), "MPI_Comm_free"); /* check NULL argument options. */ +#ifdef H5_WANT_H5_V1_4_COMPAT + ret = H5Pget_fapl_mpiposix(acc_pl, NULL); +#else /* H5_WANT_H5_V1_4_COMPAT */ ret = H5Pget_fapl_mpiposix(acc_pl, NULL, NULL); +#endif /* H5_WANT_H5_V1_4_COMPAT */ VRFY((ret >= 0), "H5Pget_fapl_mpiposix neither"); /* now get it again and check validity too. */ /* Don't free the returned object which is used in the next case. */ +#ifdef H5_WANT_H5_V1_4_COMPAT + ret = H5Pget_fapl_mpiposix(acc_pl, &comm_tmp); +#else /* H5_WANT_H5_V1_4_COMPAT */ ret = H5Pget_fapl_mpiposix(acc_pl, &comm_tmp, &use_gpfs); +#endif /* H5_WANT_H5_V1_4_COMPAT */ VRFY((ret >= 0), "H5Pget_fapl_mpiposix"); MPI_Comm_size(comm_tmp,&mpi_size_tmp); MPI_Comm_rank(comm_tmp,&mpi_rank_tmp); diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 6a4a0b2..7ab3984 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -317,7 +317,11 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, if (l_facc_type == FACC_MPIPOSIX) { /* set Parallel access with communicator */ +#ifdef H5_WANT_H5_V1_4_COMPAT + ret = H5Pset_fapl_mpiposix(ret_pl, comm); +#else /* H5_WANT_H5_V1_4_COMPAT */ ret = H5Pset_fapl_mpiposix(ret_pl, comm, use_gpfs); +#endif /* H5_WANT_H5_V1_4_COMPAT */ VRFY((ret >= 0), "H5Pset_fapl_mpiposix succeeded"); return(ret_pl); } |