User Tools

Site Tools


developers:buildsys:internals

This is an old revision of the document!


Build-system internals

Target audience

This document is for all Abinit developers who want to understand how the build system works, for Abinit maintainers who want to hack the build system, and for collaborators who want to enhance the interoperability of their projects with Abinit.

Linear algebra

The following simplified diagram summarizes how the build system detects linear algebra features. The starting point is colored in blue, the ending point in green, and the decision points in pink. Enhancements are framed with dashed lines.

<ditaa>

                                                 /-----------+
                                                 |cBLU Start |
                                                 +-----+-----/
                                                       |
                                                       v
                                        no /-----------+-----------\ yes
                            +--------------+cPNK with_linalg_libs? +--------------+
                            |              \-----------------------/              |
                            v                                                     v
             no /-----------+-------------\ yes                    +--------------+----------------+
          +-----+cPNK with_linalg_flavor? +-----+                  | Identify available components +
          |     \-------------------------/     |                  +--------------+----------------+
          v                                     v                                 |
 +--------+---------+                 +---------+---------+                       v
 | Look for generic |                 | Look for flavored |          /------------+------------\ no
 | BLAS and LAPACK  |                 |  BLAS and LAPACK  |          |cPNK with_linalg_flavor? +-------+
 +--------+---------+                 |  (multhreading    |          \------------+------------/       |
          |                           |    included)      |                       |yes                 |
          v                           +---------+---------+                       v                    |
/---------+----------\ no                       |                 +---------------+----------------+   |
|cPNK Multithreaded? +-----+                    v                 | Check flavor-specific features |   |
\---------+----------/     |               /----+-----\ no        +---------------+----------------+   |
          |yes             |               |cPNK MPI? +---------+                 |                    |
          v                |               \----+-----/         |                 +---------*----------+
 +--------+--------+       |                    |yes            |                           |
 | Look for PLASMA |       |                    v               |                           |
 +--------+--------+       |        +-----------+-----------+   |                           |
          |                |        |   Look for flavored   |   v                           v
          *<---------------+        |  BLACS and ScaLAPACK  +-->*-------------------------->*------------+
          |                         | (MPI and GPU included)|                                            |
          v                         +-----------------------+                                            |
     /----+-----\ no                                                                                     |
     |cPNK MPI? +--------------------------------------+                                                 |
     \----+-----/                                      |                                                 |
          |yes                                         |                                                 |
          v                                            |                                                 |

+———-+———-+ | | | Look for generic | +-=————-+ v /———-\ yes +—————-+ v | +———>+ Look for ELPA +——*——>|cPNK GPU? +——–>+ Look for MAGMA +–>* | BLACS and ScaLAPACK | +—————+ \—–+—-/ +—————-+ | +———————+ |no |

                                                                     v                                   |
                                            +------------------------*-----------------------------------+
                                            |
                                            v
                                       /----+-----+
                                       |cGRE Done |
                                       +----------/

</ditaa>

The driving parameter of the detection process is the with_linalg_libs option. When specified, the locations of the libraries are known but their features are unknown. When not specified, the other options of configure provide hints on what should be looked for, but the possible locations and names of the libraries are only partly known. Enters the with_linalg_flavor option into play, orientating the search for libraries and/or features. As can be seen here, the most influencing parameters are the kinds of parallelisms selected at configure-time. They determine the number of tests performed and the priorities attributed to each linear algebra component. For sake of simplicity, we will not go any further into the details, the essential being the overall picture and the interactions between the involved options of configure.

developers/buildsys/internals.1459970877.txt.gz · Last modified: 2016/04/06 21:27 by Yann Pouillon