Hi,
I could not find a IOR list. Figured that there are a lot of folks on this
list are using IOR, who might be interested. Here is a patch to eliminate
two oversights of IOR.
1) Conflict in the usage of FILE_DELIMITER ':'
2) Inaccurate reports due to any drift in time
Note:
-- ':' is already taken by ROMIO for long for specifying file system
type. By replacing it with '@', the problem is solved. File system
specification is again possible.
-- Time drift is an annoying problem of IOR. IOR checks on the skew
of timestamps from each process. But it does not calibrate the timer at
the beginning. So it spews numerous warning on systems with big drift
across nodes. In addition, it reports wrong numbers for IO rate. Added
recalibration still makes your numbers more accurate, even if you did not
notice you have a problem before.
Let me know if you may have some comments.
Thanks,
Weikuan
++++++++++++++++++++++++++++
Weikuan Yu <+> 1-865-574-7990
http://www.csm.ornl.gov/~wyu/
diff -pruN IOR-2.9.1/src/C/IOR.c IOR-2.9.1.new/src/C/IOR.c
--- IOR-2.9.1/src/C/IOR.c 2006-09-26 16:13:33.000000000 -0400
+++ IOR-2.9.1.new/src/C/IOR.c 2007-02-08 22:53:24.000000000 -0500
@@ -105,6 +105,8 @@ main(int argc,
/*MPI_CHECK(MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN),
"cannot set errhandler");*/
+ InitTimeStamp();
+
/* setup tests before verifying test validity */
tests = SetupTests(argc, argv);
verbose = tests->testParameters.verbose;
@@ -835,6 +837,32 @@ GetTestFileName(char * testFileName, IOR
}
} /* GetTestFileName() */
+double init_timeval;
+
+double
+InitTimeStamp(void)
+{
+ double timeVal;
+#ifdef _NO_MPI_TIMER
+ struct timeval timer;
+
+ if (gettimeofday(&timer, (struct timezone *)NULL) != 0)
+ ERR("cannot use gettimeofday()");
+ timeVal = (double)timer.tv_sec + ((double)timer.tv_usec/1000000);
+#else /* not _NO_MPI_TIMER */
+ timeVal = MPI_Wtime(); /* no MPI_CHECK(), just check return value */
+ if (timeVal < 0) ERR("cannot use MPI_Wtime()");
+#endif /* _NO_MPI_TIMER */
+
+ /* wall_clock_delta is difference from root node's time. if significant
+ wall clock deviation, this is necessary correction; else it's set to
+ zero. */
+ timeVal -= wall_clock_delta;
+ init_timeval = timeVal;
+
+ return(timeVal);
+} /* initTimeStamp() */
+
/******************************************************************************/
/*
@@ -862,7 +890,7 @@ GetTimeStamp(void)
zero. */
timeVal -= wall_clock_delta;
- return(timeVal);
+ return(timeVal-init_timeval);
} /* GetTimeStamp() */
diff -pruN IOR-2.9.1/src/C/iordef.h IOR-2.9.1.new/src/C/iordef.h
--- IOR-2.9.1/src/C/iordef.h 2006-10-02 13:34:54.000000000 -0400
+++ IOR-2.9.1.new/src/C/iordef.h 2007-02-08 22:02:39.000000000 -0500
@@ -84,7 +84,7 @@ extern int numTasks,
#define WC_OL_THRESHOLD 5 /* outlier threshold in sec */
#define DELIMITERS " \t\r\n=" /* ReadScript() */
-#define FILENAME_DELIMITER ':' /* ParseFileName() */
+#define FILENAME_DELIMITER '@' /* ParseFileName() */
/* MACROs for debugging */
#define HERE fprintf(stdout, "** LINE %d (TASK=%d) **\n", \
diff -pruN IOR-2.9.1/src/C/IOR.h IOR-2.9.1.new/src/C/IOR.h
--- IOR-2.9.1/src/C/IOR.h 2006-07-11 20:04:46.000000000 -0400
+++ IOR-2.9.1.new/src/C/IOR.h 2007-02-08 23:00:00.000000000 -0500
@@ -55,6 +55,7 @@ void FillBuffer (void *,
unsigned long long, int);
void GetPlatformName (char *);
void GetTestFileName (char *, IOR_param_t *);
+double InitTimeStamp (void);
double GetTimeStamp (void);
char * HumanReadable (IOR_offset_t, int);
IOR_offset_t IOR_GetFileSize_POSIX (IOR_param_t *, MPI_Comm, char *);
_______________________________________________
Lustre-discuss mailing list
[email protected]
https://mail.clusterfs.com/mailman/listinfo/lustre-discuss