In addition to hardware and system tuning parameters, READEX also targets application level parameters, i.e., parts of the code itself, which could be used as tuning parameters. The simplest example of this is the case where different implementations of the same algorithm are available, each having its own impact on performance and energy. Some examples of application tuning parameters include, i.e., choosing between different decomposition algorithms, preconditioners, or also blocking factors. The aim of using Application Tuning Parameters (ATPs) is to exploit the possibility to switch between different implementations or, in a more general sense, the possibility for READEX to choose between code level alternatives at runtime. More information can be found here.
The build procedure for the ATP library requires the following tools to be already
- READEX Runtime Library (RRL) as described [here].
Intel compiler version 2017.2.174/2018.1.163 or GCC (G++ and GFortran) version 6.3.0/7.1.0. Other Intel or GCC compiler versions can also be used, but have not been explicitly tested by the READEX developers.
- CMake version 3.11 or higher.
Please make sure that the RRL version is also compiled with the same compiler as the one used for the ATP library.
Please [download] the ATP library and unpack it:
wget -c http://www.readex.eu/wp-content/uploads/2018/08/ATP.tar.gz
tar -xzvf ATP.tar.gz
Preparing the ATP library directory
Configuring and installing the ATP library
You may use the following naming scheme for “–DCMAKE_INSTALL_PREFIX”:
<Desired path for ATP library installation>/readex-atp/atp_readex_
<mpi version>_<compiler version>
<day of build>: current date in the form YYYY-MM-DD
<compiler>: for example: intel2017.2.174
<mpi version>: for example: intelmpi2017.2.174
To build the ATP please now do:
cmake ../ -DCMAKE_INSTALL_PREFIX=<Desired path for ATP library installation>/readex-atp/atp_readex_<mpi version>_<compiler version>
- Build the application by linking with the ATP library. (
- Specify a search algorithm for the ATP library from among
individual_atpstrategies. This is done by adding sections in the READEX configuration file (
readex_config.xml) used as input for PTF during DTA as shown below:
For building the individual strategy, the keep factor is always 1. Updating/extending the READEX configuration file is explained in detail in Section 3.2 (page 7) of the usage guide.
- Running the application: there are two phases for running the application with ATP:
- parameter collection phase – parameters, constraints and explorations defined in application are collected and saved for the tuning system to explore.
- parameter exploration phase – declaration functions are turned off and the tuning system can explore the parameter combinations by providing parameter values through the
There are two ATP modes available that allow to enable which phase will be used in the application, although the parameter collection phase needs to be run at least once for the application to allow parameter collection and ATP configuration file creation.
- DTA mode
- Includes both ATP phases.
ATP_EXECUTION_MODEenvironment variable should be set to DTA.
- The name and location of the ATP description file can be set by the
ATP_DESCRIPTION_FILEenvironment variable. If this variable is not set then the ATP description file will be created in the current working directory as
- Starts with parameter collection phase: parameter, constraint and exploration declaration functions are executed only once.
- The second time the same parameter declarations is executed, it triggers the end of parameter collection phase, generates the ATP descriptions file and begins the exploration phase.
ATP_PARAM_GETassisgns parameter values decided by RRL. In the first phase, the default value is used.
- RAT mode
- Only the parameter exploration phase is running.
ATP_EXECUTION_MODEenvironment variable should be unset or set to RAT.
- Declaration functions are shut down, only
ATP_PARAM_GETfunction is working.
- Details of parameters are loaded from the ATP description file.