Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Commit

Permalink
Allow user to hide a test's output with verbose<0.
Browse files Browse the repository at this point in the history
  • Loading branch information
morrone committed Jan 13, 2012
1 parent 0665dea commit bbcc9c2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/ior.c
Expand Up @@ -138,6 +138,9 @@ int main(int argc, char **argv)
TestIoSys(tptr);
}

if (verbose < 0)
/* always print final summary */
verbose = 0;
PrintLongSummaryAllTests(tests_head);

/* display finish time */
Expand Down Expand Up @@ -1217,7 +1220,7 @@ static void ReduceIterResults(IOR_test_t *test, double **timer, int rep,

static void PrintRemoveTiming(double start, double finish, int rep)
{
if (rank != 0)
if (rank != 0 || verbose < VERBOSE_0)
return;

printf("remove - - - - - - ");
Expand Down Expand Up @@ -1639,7 +1642,7 @@ static void PrintLongSummaryOneOperation(IOR_test_t *test, double *times, char *
struct results *bw;
int reps;

if (rank != 0)
if (rank != 0 || verbose < VERBOSE_0)
return;

reps = params->repetitions;
Expand Down Expand Up @@ -1686,6 +1689,9 @@ static void PrintLongSummaryOneTest(IOR_test_t *test)

static void PrintLongSummaryHeader()
{
if (rank != 0 || verbose < VERBOSE_0)
return;

fprintf(stdout, "\n");
fprintf(stdout, "%-9s %10s %10s %10s %10s %10s",
"Operation", "Max(MiB)", "Min(MiB)", "Mean(MiB)", "StdDev",
Expand All @@ -1698,7 +1704,7 @@ static void PrintLongSummaryAllTests(IOR_test_t *tests_head)
{
IOR_test_t *tptr;

if (rank !=0)
if (rank != 0 || verbose < VERBOSE_0)
return;

fprintf(stdout, "\n");
Expand Down Expand Up @@ -1951,7 +1957,7 @@ static void TestIoSys(IOR_test_t *test)
params->timeStampSignatureValue,
params->timeStampSignatureValue);
}
if (rep == 0) {
if (rep == 0 && verbose >= VERBOSE_0) {
fprintf(stdout, "\n");
fprintf(stdout, "access bw(MiB/s) block(KiB) xfer(KiB) open(s) wr/rd(s) close(s) total(s) iter\n");
fprintf(stdout, "------ --------- ---------- --------- -------- -------- -------- -------- ----\n");
Expand Down

0 comments on commit bbcc9c2

Please sign in to comment.