@@ -28,7 +28,8 @@ bool parseArgs(o2::benchmark::benchmarkOpts& conf, int argc, const char* argv[])
2828 " chunkSize,c" , bpo::value<float >()->default_value (1 .f ), " Size of scratch partitions (GB)." )(
2929 " freeMemFraction,f" , bpo::value<float >()->default_value (0 .95f ), " Fraction of free memory to be allocated (min: 0.f, max: 1.f)." )(
3030 " launches,l" , bpo::value<int >()->default_value (10 ), " Number of iterations in reading kernels." )(
31- " nruns,n" , bpo::value<int >()->default_value (1 ), " Number of times each test is run." );
31+ " nruns,n" , bpo::value<int >()->default_value (1 ), " Number of times each test is run." )(
32+ " outfile,o" , bpo::value<std::string>()->default_value (" benchmark_result" ), " Output file name to store results." );
3233 try {
3334 bpo::store (parse_command_line (argc, argv, options), vm);
3435 if (vm.count (" help" )) {
@@ -89,6 +90,8 @@ bool parseArgs(o2::benchmark::benchmarkOpts& conf, int argc, const char* argv[])
8990 }
9091 }
9192
93+ conf.outFileName = vm[" outfile" ].as <std::string>();
94+
9295 return true ;
9396}
9497
@@ -103,7 +106,7 @@ int main(int argc, const char* argv[])
103106 return -1 ;
104107 }
105108
106- std::shared_ptr<ResultWriter> writer = std::make_shared<ResultWriter>(std::to_string (opts.deviceId ) + " _benchmark_results .root" );
109+ std::shared_ptr<ResultWriter> writer = std::make_shared<ResultWriter>(std::to_string (opts.deviceId ) + " _ " + opts. outFileName + " .root" );
107110
108111 o2::benchmark::GPUbenchmark<char > bm_char{opts, writer};
109112 bm_char.run ();
0 commit comments