Development and optimisations

Pierre Aubert




Introduction



This tutorial aims to highlight the performances we can obtain with several implementations : with object programmation and table programmation.

Prerequisites

Compiler

We are going to use the GCC-7 compiler (or GCC-8 or GCC-9 at least newer than GCC-6). If you are stucked with an other compiler or with an older version of GCC you can install it with Anaconda (in your tutorial environement) :

conda install gcc7



Follow with Container

This lecture can be followed with a docker image via apptainer on your laptop or on a remote server or via docker:

  • Light image 127 MB OK : docker://gitlab-registry.in2p3.fr/cta-lapp/cours/development_and_optimisation/development_and_optimisation_alpine_light:latest
  • Code server 309 MB OK : docker://gitlab-registry.in2p3.fr/cta-lapp/cours/development_and_optimisation/development_and_optimisation_alpine_micromamba_code_server:latest
  • Jupyter-hub OK : docker://gitlab-registry.in2p3.fr/cta-lapp/cours/development_and_optimisation/development_and_optimisation_alpine_micromamba_vscode:latest


Usages are explained in the lecture demo.

Compilation tools

We will use CMake and Make to compile our programs.

Ploting tools

We will use Gnuplot to plot the results of our tests.

Optimisations

We are going to focus on the optimisation of single precision floating points computations. Basically, you can divide all the following speed-up by 2 to have the equivalent for double precision.

Correction

The correction sources can be found here.