Skip to content

Commit dafb704

Browse files
author
Martin Belanger
committed
Print the name of the program being executed
One thing missing from the stdout of each performance test is the name of the test that is actually being run. This patch adds 2 new messages to the stdout. At the beginning of the execution of a test (e.g. sendrecv_perf) we will now see this message: Collective test starting: sendrecv_perf And at the end, we will now see this: Collective test concluded: sendrecv_perf This is needed when running several tests consecutively and we're trying to parse the stdout to collect the results. For example, using a Python script to parse the stdout, one could retrieve the results for each test and plot them on a graph. This patch makes it easier to implement such a script. Signed-off-by: Martin Belanger <martin.belanger@dell.com>
1 parent 5290298 commit dafb704

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/common.cu‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <string.h>
1414
#include <ctype.h>
1515
#include "cuda.h"
16+
#include <errno.h> /* program_invocation_short_name */
1617

1718
#include "../verifiable/verifiable.h"
1819

@@ -1006,6 +1007,7 @@ testResult_t run() {
10061007
#endif
10071008
is_main_thread = is_main_proc = (proc == 0) ? 1 : 0;
10081009

1010+
PRINT("# Collective test starting: %s\n", program_invocation_short_name);
10091011
PRINT("# nThread %d nGpus %d minBytes %ld maxBytes %ld step: %ld(%s) warmup iters: %d iters: %d agg iters: %d validation: %d graph: %d\n",
10101012
nThreads, nGpus, minBytes, maxBytes,
10111013
(stepFactor > 1)?stepFactor:stepBytes, (stepFactor > 1)?"factor":"bytes",
@@ -1257,6 +1259,7 @@ testResult_t run() {
12571259
PRINT("# Out of bounds values : %d %s\n", errors[0], errors[0] ? "FAILED" : "OK");
12581260
PRINT("# Avg bus bandwidth : %g %s\n", bw[0], check_avg_bw == -1 ? "" : (bw[0] < check_avg_bw*(0.9) ? "FAILED" : "OK"));
12591261
PRINT("#\n");
1262+
PRINT("# Collective test concluded: %s\n", program_invocation_short_name);
12601263
#ifdef MPI_SUPPORT
12611264
MPI_Comm_free(&mpi_comm);
12621265
MPI_Finalize();

0 commit comments

Comments
 (0)