Application Tuning Parameters


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.

Installation

Requirements

The build procedure for the ATP library requires the following tools to be already
installed:

  • 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.

Download

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

Please do:

cd ATP
mkdir build
cd build

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>
make -j
make install

Usage

  1. Build the application by linking with the ATP library. (-latp)
  2. Specify a search algorithm for the ATP library from among exhaustive_atp and individual_atp strategies. This is done by adding sections in the READEX configuration file (readex_config.xml) used as input for PTF during DTA as shown below:
    <periscope>
    <atp>
    <searchAlgorithm>
    <name>exhaustive_atp</name>
    <name>individual_atp</name>
    </searchAlgorithm>
    </atp>
    </periscope>

    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.
  3. 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 ATP_PARAM_GET function.

    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_MODE environment variable should be set to DTA.
      • The name and location of the ATP description file can be set by the ATP_DESCRIPTION_FILE environment variable. If this variable is not set then the ATP description file will be created in the current working directory as ATP_description_file.json.
      • 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_GET assisgns parameter values decided by RRL. In the first phase, the default value is used.
    • RAT mode
      • Only the parameter exploration phase is running.
      • The ATP_EXECUTION_MODE environment variable should be unset or set to RAT.
      • Declaration functions are shut down, only ATP_PARAM_GET function is working.
      • Details of parameters are loaded from the ATP description file.

Sources

[Download tarball]