summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-03-01 00:27:20 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-03-01 00:27:20 (GMT)
commit0004361cc73d835300d38d65cf3b17d69404083a (patch)
tree4cf72644182fa550d750e736d5ad81c447eb707d
parent30952f892ce2f131ee301edb4674d7a0077d9239 (diff)
downloadhdf5-0004361cc73d835300d38d65cf3b17d69404083a.zip
hdf5-0004361cc73d835300d38d65cf3b17d69404083a.tar.gz
hdf5-0004361cc73d835300d38d65cf3b17d69404083a.tar.bz2
[svn-r11991] Purpose:
Porting. Description: Red Storm's lustre used srand and rand to initialize their user mode of lustre. HDF5 also uses srand and that messes up Lustre. Solution: Use -DRED_STORM to block out the HDF5 code that calls srand. This is a temporary fix since Lustre has fixed its code from calling srand and rand but the fix is not deployed at Red_storm yet. Platforms tested: Tested at Red-Storm.
-rw-r--r--src/H5.c15
-rw-r--r--src/H5SL.c7
2 files changed, 7 insertions, 15 deletions
diff --git a/src/H5.c b/src/H5.c
index 917d5f3..0476dbb 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -76,21 +76,6 @@ H5_init_library(void)
herr_t ret_value=SUCCEED;
FUNC_ENTER_NOAPI(H5_init_library, FAIL)
-#if defined(H5_HAVE_PARALLEL) && defined(RED_STORM)
-/* A temporary patch for redstorm, must open a file in the same parallel
- * data filesystem before H5_init_library. Otherwise, it hangs with error:
- * (client.c:568:ptlrpc_check_status()) @@@ type == PTL_RPC_MSG_ERR, err == -114 req@0x57a9660 x1/t0 o38->mds_l2@MDS_PEER_UUID:12 lens 240/272 ref 1 fl Rpc:R/100000/0 rc 0/-114
- */
-#define H5_redstorm_patch(scr_dir) \
-{ \
-char *fname=scr_dir "/hdf5/junk"; \
-/* printf("redstorm parallel patch on %s\n", scr_dir); */ \
-fclose(fopen(fname, "w+")); remove(fname); \
-}
-
-H5_redstorm_patch("/scratch1");
-H5_redstorm_patch("/scratch2");
-#endif
/*
* Make sure the package information is updated.
*/
diff --git a/src/H5SL.c b/src/H5SL.c
index 610870f..4f1305c 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -210,9 +210,16 @@ H5SL_init_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_init_interface)
+/* A temporary patch for redstorm because Lustre there also uses srand.
+ * This causes Lustre on Redstorm to hang with following errors. (Lustre
+ * has fix it, but not deployed at RedStorm yet.
+ * (client.c:568:ptlrpc_check_status()) @@@ type == PTL_RPC_MSG_ERR, err == -114 req@0x57a9660 x1/t0 o38->mds_l2@MDS_PEER_UUID:12 lens 240/272 ref 1 fl Rpc:R/100000/0 rc 0/-114
+ */
+#ifndef RED_STORM
/* Create randomized set of numbers */
curr_time=HDtime(NULL);
HDsrand((unsigned)curr_time);
+#endif
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SL_init_interface() */