summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2003-04-28 23:08:35 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2003-04-28 23:08:35 (GMT)
commit51dd09ec042dd87515c4576c5f878917768f951f (patch)
treef50b1592d81f260104c29853fabac81cf12e61cb
parent158d164b9104cee57020e23af7fa7abdc2e567a8 (diff)
downloadhdf5-51dd09ec042dd87515c4576c5f878917768f951f.zip
hdf5-51dd09ec042dd87515c4576c5f878917768f951f.tar.gz
hdf5-51dd09ec042dd87515c4576c5f878917768f951f.tar.bz2
[svn-r6769] Purpose:
Minor improvement Description: Moved the H5FD_mpio_Debug initialization to H5FD_mpio_init() so that it is done only once instead of every file open. Fixed blocked out patch that checks on INFO object so that H5FD_mpio_Debug can be set via the INFO object. (All these had been done to v1.4, now folded them int v1.5) Platforms tested: Did not h5committest since this is purely parallel code. The changes were made in an isolated copy in Copper. Tested in Copper parallel. Misc. update:
-rw-r--r--src/H5FDmpio.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 4fb7a68..32f6a1c 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -196,13 +196,32 @@ static int interface_initialize_g = 0;
hid_t
H5FD_mpio_init(void)
{
- hid_t ret_value=H5FD_MPIO_g; /* Return value */
+#ifdef H5FDmpio_DEBUG
+ static int H5FD_mpio_Debug_inited=0;
+#endif /* H5FDmpio_DEBUG */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_init, FAIL);
if (H5I_VFL!=H5Iget_type(H5FD_MPIO_g))
H5FD_MPIO_g = H5FDregister(&H5FD_mpio_g);
+#ifdef H5FDmpio_DEBUG
+ if (!H5FD_mpio_Debug_inited)
+ {
+ /* set debug mask */
+ /* Should this be done in H5F global initialization instead of here? */
+ const char *s = HDgetenv ("H5FD_mpio_Debug");
+ if (s) {
+ while (*s){
+ H5FD_mpio_Debug[(int)*s]++;
+ s++;
+ }
+ }
+ H5FD_mpio_Debug_inited++;
+ }
+#endif /* H5FDmpio_DEBUG */
+
/* Set return value */
ret_value=H5FD_MPIO_g;
@@ -1043,25 +1062,11 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
if (flags&H5F_ACC_EXCL) mpi_amode |= MPI_MODE_EXCL;
#ifdef H5FDmpio_DEBUG
- {
- /* set debug mask */
- /* Should this be done in H5F global initialization instead of here? */
- const char *s = HDgetenv ("H5FD_mpio_Debug");
- if (s) {
- while (*s){
- H5FD_mpio_Debug[(int)*s]++;
- s++;
- }
- }
- }
-
/* Check for debug commands in the info parameter */
-#if 0
- /* Temporary KLUGE rky 2000-06-29, because fa->info is invalid (-1)*/
{
char debug_str[128];
int infoerr, flag, i;
- if (fa->info) {
+ if (MPI_INFO_NULL != info_dup) {
infoerr = MPI_Info_get(fa->info, H5F_MPIO_DEBUG_KEY, 127,
debug_str, &flag);
if (flag) {
@@ -1074,8 +1079,6 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
}
}
}
- /* END Temporary KLUGE rky 2000-06-29, because fa->info is invalid (-1) */
-#endif
#endif
/*OKAY: CAST DISCARDS CONST*/