Refactoring of benchmark executables (Feature #565)


Added by Christopher Pinke over 4 years ago. Updated over 4 years ago.


Status:Done Start date:10 Jan 2014
Priority:Normal Due date:
Assignee:Alessandro Sciarra % Done:

100%

Category:-
Target version:2013.3

Description

The benchmark executables currently have a lot of code duplication and can be simplified.

  • Inverter and heatbath benchmarks can be seen as extensions of the "real" executables
  • The HMC benchmark does not do anything right now and should be removed
  • The dslash-benchmark is contained in dslash_multidev and can be removed

Related issues

blocks CL2QCD - Feature #548: Refactoring of executables Done 05 Dec 2013

Associated revisions

Revision ce24b679
Added by Christopher Pinke over 4 years ago

added bool enableProfiling to generalExecutable class
refs #565

Revision eb85acc2
Added by Christopher Pinke over 4 years ago

added usage of enableProfiling in generalExecutable class
refs #565

Revision 541711a6
Added by Christopher Pinke over 4 years ago

added enableProfling to generationExecutable class and children
refs #565

Revision a978d863
Added by Christopher Pinke over 4 years ago

added enableProfiling to measurementExecutable and children
refs #565

Revision e68b724d
Added by Christopher Pinke over 4 years ago

added inputparameter enable_profiling
refs #565

Revision 9b2a4802
Added by Christopher Pinke over 4 years ago

removed enable_profiling member from generalExecutable class
added first output of profiling data to file
refs #565

Revision 94f5474f
Added by Christopher Pinke over 4 years ago

adjusted constructor of children of generalExecutable class
refs #565

Revision 0cc680c8
Added by Christopher Pinke over 4 years ago

added pre- and postfix parameters for profiling data filename
refs #565

Revision 947a9ad6
Added by Christopher Pinke over 4 years ago

added fct. to create filename for profiling data
refs #565

Revision c295a055
Added by Christopher Pinke over 4 years ago

added proper fct. to write profiling data to file
refs #565

Revision 08f7180b
Added by Christopher Pinke over 4 years ago

added missing initialization of kernels in molecular_dynamics module
refs #565

Revision 9957c307
Added by Christopher Pinke over 4 years ago

added missing calls to molecular_dynamics module to device class
refs #565

Revision 15058cc0
Added by Christopher Pinke over 4 years ago

removed some comments
refs #565

Revision 893923ab
Added by Christopher Pinke over 4 years ago

added missing init and profiling for inner and outer dslash
refs #565

Revision 28629614
Added by Christopher Pinke over 4 years ago

added basic parameters to profiling_data file
refs #565

Revision 2e762d4c
Added by Christopher Pinke over 4 years ago

removed unused benchmark executables
refs #565

Revision 0fdb60cf
Added by Christopher Pinke over 4 years ago

added benchmarkExecutable class
refs #565

Revision c3577d7b
Added by Christopher Pinke over 4 years ago

added new parameter benchmarksteps
refs #565

Revision e5746475
Added by Christopher Pinke over 4 years ago

added class dslashBenchmark
refs #565

Revision c9339d9e
Added by Christopher Pinke over 4 years ago

added utility fct. to add argument to argv
refs #565

Revision ad811a68
Added by Christopher Pinke over 4 years ago

added Main for dslashBenchmark executable
refs #565

Revision 23c271d8
Added by Christopher Pinke over 4 years ago

append profiling data to existing file
refs #565

Revision 649d669e
Added by Christopher Pinke over 4 years ago

moved device to benchmarkExecutable class
refs #565

Revision 68dcc7ae
Added by Christopher Pinke over 4 years ago

removed old dslash_benchmark executable
refs #565

Revision 8912cf12
Added by Christopher Pinke over 4 years ago

renamed new dslashBenchmark executable
refs #565

Revision a2523312
Added by Christopher Pinke over 4 years ago

added heatbathBenchmark class
refs #565

Revision 3331fa6a
Added by Christopher Pinke over 4 years ago

replaced heatbath benchmark executable by new one
refs #565

Revision df677c1c
Added by Christopher Pinke over 4 years ago

added dslash multidev benchmark to dslashBenchmark class
refs #565

Revision b3ff5997
Added by Christopher Pinke over 4 years ago

refactoring of multiple device dslash benchmark
refs #565

Revision 7372f550
Added by Christopher Pinke over 4 years ago

added new executable for dslash multidev
refs #565

Revision 48d3f48c
Added by Christopher Pinke over 4 years ago

refactoring of new dlsashMultidev executable
refs #565

Revision 31b4b425
Added by Christopher Pinke over 4 years ago

removed unnecessary header inclusion
refs #565

Revision ae71ad26
Added by Christopher Pinke over 4 years ago

removed old dslash_multidev executable
refs #565

Revision a37ff77b
Added by Christopher Pinke over 4 years ago

added check for enable_profiling for benchmarks on multiple devices
refs #565

Revision 848fbad2
Added by Christopher Pinke over 4 years ago

corrected performance timer usage in benchmarkExecutable class
refs #565

Revision 2fdfa3e8
Added by Alessandro Sciarra over 4 years ago

Corrected some typos.
refs #565

Revision e84c288e
Added by Alessandro Sciarra over 4 years ago

Function AddOptionsToArgv updated to a more handy version.
refs #565

Revision 7129d0ee
Added by Alessandro Sciarra over 4 years ago

Added refactored benchmarks for dks kernel on single and multiple devices.
refs #565

Revision 10326417
Added by Alessandro Sciarra over 4 years ago

Removed old executable from benchmarks/CMakeLists.txt file.
refs #565

History

Updated by Christopher Pinke over 4 years ago

I added a new parameter "enable_profiling", which activates profiling of the kernels.
This will cause the execution to be slower as there is a synch after each kernel enqueue.
However, now one can simply call any executable with this parameter turned on and profiling information will be printed to file.

For explicite kernel benchmarking, I created a new class "benchmarkExecutable", which carries out benchmarks on one or multiple devices.
In the first case, the profiling output is simply used.
In the second case, the considered kernel(s) is called multiple times and the total time for these calls is measured.
Thus, in the second case profiling should not be enabled!

The parameter "benchmarksteps" is used to control the number of kernel calls.
The specific kernels can be implemented as children of this class.
I did this for the heatbath and dslash kernels.

  • % Done changed from 0 to 90
  • Status changed from New to In Progress

Updated by Christopher Pinke over 4 years ago

The "dsk_multidev" executable should be ported to the new format.
This is very simple starting from the "dslashBenchmark" class, as the following functions:

  • enqueueSpecificKernelForBenchmarkingMultipleDevices
  • printProfilingDataToScreen

have to be modified accordingly and the spinorfield_eo members have to be changed to staggeredfield_eo.

  • Estimated time set to 0.50
  • Assignee changed from Christopher Pinke to Alessandro Sciarra

Updated by Alessandro Sciarra over 4 years ago

The dks benchmark executable was refactored according to the other ones.

In meta/util.h the function

 char** addOptionToArgv(const char * option, int argc, const char** argv);

was changed to the following:
std::pair<int,std::vector<const char*>> addOptionsToArgv(int argc, const char** argv, 
                                                         std::vector<const char*> op);

This allows a more user-friendly call as, for example, in dksBenchmarkMain.cpp file
std::pair<int,std::vector<const char*>> new_argc_argv = meta::addOptionsToArgv(argc, argv, {"--enable_profiling=true","--fermact=rooted_stagg"});
dksBenchmark dksBenchmarkInstance(new_argc_argv.first, &(new_argc_argv.second[0]));

See e84c288ed2943aadc61d969d2b138574310a7df6 for further information.

  • Estimated time deleted (0.50)
  • % Done changed from 90 to 100
  • Status changed from In Progress to Done

Also available in: Atom PDF