From d8564df0e6af7d96a179ed1d2615f29dcca856c0 Mon Sep 17 00:00:00 2001 From: Luka Stanisic <luka.stanisic@mpcdf.mpg.de> Date: Fri, 30 Jun 2017 13:53:30 +0200 Subject: [PATCH] nicer output of the execution (adding GPU workload values) --- bioem.cpp | 11 +++++++++-- bioem_cuda.cu | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bioem.cpp b/bioem.cpp index 25bdea2..130b9bd 100644 --- a/bioem.cpp +++ b/bioem.cpp @@ -615,7 +615,7 @@ int bioem::run() (((double) param.param_device.NumberPixels - (double) param.param_device.maxDisplaceCenter / 2.) * ((double) param.param_device.NumberPixels - (double) param.param_device.maxDisplaceCenter / 2.) * 2. + 8.) * (double) sizeof(myfloat_t) / compTime; const double nGBs2 = (double) RefMap.ntotRefMap * ((double) param.param_device.NumberPixels * (double) param.param_device.NumberPixels + 8.) * (double) sizeof(myfloat_t) / compTime; - printf("\t\tTime Comparison %d %d: %f sec (%f GFlops, %f GB/s (cached), %f GB/s) (rank %d)\n", iOrient, iConv, compTime, nFlops / 1000000000., nGBs / 1000000000., nGBs2 / 1000000000., mpi_rank); + printf("\t\tTime Comparison %d %d: %f sec (%f GFlops, %f GB/s (cached), %f GB/s, with GPU workload %d%%) (rank %d)\n", iOrient, iConv, compTime, nFlops / 1000000000., nGBs / 1000000000., nGBs2 / 1000000000., workload, mpi_rank); } if (Autotuning == 1 && !stopTuning && STABLE_ITERATION(iConv)) { @@ -688,7 +688,14 @@ int bioem::run() x = (c-b > b-a) ? (int)(b+(c-b)/2) : (int)(a+(b-a+1)/2); } - if ( (c-b == limit) && ( b-a == limit) ) stopTuning=true; + if ((c - b == limit) && (b - a == limit)) + { + stopTuning=true; + if (DebugOutput >= 2) + { + printf("\t\tOptimal GPU workload %d%% (rank %d)\n", workload, mpi_rank); + } + } workload=x; rebalance(x); diff --git a/bioem_cuda.cu b/bioem_cuda.cu index 331ccff..d567ebd 100644 --- a/bioem_cuda.cu +++ b/bioem_cuda.cu @@ -684,7 +684,7 @@ void bioem_cuda::rebalance(int workload) if (DebugOutput >= 2) { - printf("\t\tSetting GPU workload to %d%%\n", workload); + printf("\t\tSetting GPU workload to %d%% (rank %d)\n", workload, mpi_rank); } GPUWorkload = workload; -- GitLab