From a21137be3ecdd7e86cde6b7675308a804479d383 Mon Sep 17 00:00:00 2001 From: Jean-Yves VET Date: Tue, 17 Mar 2020 16:31:56 +0100 Subject: [PATCH] Display outlier host names Display host names when using the -j argument (outlierThreshold) so that IOR could help to better identify slow nodes: WARNING: for client02, task 6, write elapsed transfer time is 65.738326 --- src/ior.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ior.c b/src/ior.c index 9871193..c831a84 100755 --- a/src/ior.c +++ b/src/ior.c @@ -255,8 +255,13 @@ DisplayOutliers(int numTasks, strcpy(accessString, "read"); } if (fabs(timerVal - mean) > (double)outlierThreshold) { - fprintf(out_logfile, "WARNING: for task %d, %s %s is %f\n", - rank, accessString, timeString, timerVal); + char hostname[MAX_STR]; + int ret = gethostname(hostname, MAX_STR); + if (ret != 0) + strcpy(hostname, "unknown"); + + fprintf(out_logfile, "WARNING: for %s, task %d, %s %s is %f\n", + hostname, rank, accessString, timeString, timerVal); fprintf(out_logfile, " (mean=%f, stddev=%f)\n", mean, sd); fflush(out_logfile); }