build:fallbacks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
developers:fallbacks [2017/11/07 14:50] – Yann Pouillon | build:fallbacks [2020/08/19 12:42] – [Building the fallbacks with Abinit] Jean-Michel Beuken | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Fallbacks ====== | ====== Fallbacks ====== | ||
+ | |||
+ | ===== In brief ===== | ||
+ | |||
+ | |||
+ | Abinit Fallbacks is a package builder for the external dependencies of Abinit, | ||
+ | in development environments lacking these components. They do not provide full | ||
+ | support for the advanced features of Abinit nor HPC-grade calculation | ||
+ | capabilities. They are designed to let developers quickly test new versions of | ||
+ | these external dependencies in various situations before proposing upgrades, as | ||
+ | well as to allow end-users to run calculations on their favorite PCs. | ||
===== Objectives ===== | ===== Objectives ===== | ||
- | In case some dependencies are missing on your computers, Abinit provides fallback libraries that you can build and install from their sources before compiling Abinit itself. | + | In case some dependencies are missing on your computers, Abinit provides fallback libraries that you can build and install from their sources before compiling Abinit itself. |
Fallbacks are also useful for developers who want to test a new version of an external dependency before setting it as a default for future releases of Abinit and have it deployed on the Abinit Test Farm. Except when this new version fixes a bug affecting significantly the accuracy and/or stability of production calculations, | Fallbacks are also useful for developers who want to test a new version of an external dependency before setting it as a default for future releases of Abinit and have it deployed on the Abinit Test Farm. Except when this new version fixes a bug affecting significantly the accuracy and/or stability of production calculations, | ||
Line 14: | Line 24: | ||
Here are the most relevant links to get useful information about the project and its status: | Here are the most relevant links to get useful information about the project and its status: | ||
- | * https:// | + | * [[https:// |
- | * https:// | + | * [[https:// |
- | * https:// | + | * [[https:// |
- | + | ||
- | For historical reasons, a secondary repository is still kept on Launchpad, where the contents of the home repository are periodically mirrored: | + | |
- | * https:// | + | |
===== Minimum requirements ===== | ===== Minimum requirements ===== | ||
Line 27: | Line 33: | ||
* the [[http:// | * the [[http:// | ||
If your network configuration does not allow for the downloading of remote packages, you will have to place the source tarballs in the // | If your network configuration does not allow for the downloading of remote packages, you will have to place the source tarballs in the // | ||
- | |||
- | Since the recommended way of getting the Abinit Fallbacks is by cloning its repository from the Abinit Website, we highly recommend you to install the GNU Autotools on your system first: | ||
- | * [[http:// | ||
- | * [[http:// | ||
- | * [[http:// | ||
- | * [[http:// | ||
To build the fallbacks, you will also need a working development environment, | To build the fallbacks, you will also need a working development environment, | ||
Line 47: | Line 47: | ||
Since the fallbacks evolve at a very different pace from Abinit and have very different objectives, they are available as a separate package. Typically, in one year, there will be 3 minor releases of Abinit, while 2 or 3 of the fallbacks at most will be upgraded asynchronously, | Since the fallbacks evolve at a very different pace from Abinit and have very different objectives, they are available as a separate package. Typically, in one year, there will be 3 minor releases of Abinit, while 2 or 3 of the fallbacks at most will be upgraded asynchronously, | ||
- | The independent fallbacks can be downloaded either from the Abinit Website | + | The independent fallbacks can be downloaded either from the [[https:// |
+ | ==== Requirements ==== | ||
+ | |||
+ | Since the recommended way of getting the Abinit Fallbacks is by cloning its repository from the Abinit Website, we highly recommend you to install the GNU Autotools on your system first: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
==== Getting the source code from the Abinit Website ==== | ==== Getting the source code from the Abinit Website ==== | ||
- | The official Abinit Fallbacks project page is there: | + | The official Abinit Fallbacks project page is [[https:// |
If you are an active Abinit Developer, we highly recommend you to [[developers: | If you are an active Abinit Developer, we highly recommend you to [[developers: | ||
To get the latest version, just type the following: | To get the latest version, just type the following: | ||
- | <code bash>git clone abinit-forge: | + | <code bash>git clone abinit-forge: |
- | ==== Getting the source code from Launchpad ==== | ||
- | |||
- | The Launchpad mirror project page is there: [[https:// | ||
- | |||
- | It is provided for historical reasons and convenience, | ||
- | |||
- | The first time you download the fallbacks from Launchpad, we highly recommend you to set your environment as described in the [[developers: | ||
- | |||
- | To get the latest version of the fallbacks, type: | ||
- | <code bash>git clone lp: | ||
==== Downloading a source tarball ==== | ==== Downloading a source tarball ==== | ||
Line 73: | Line 70: | ||
When a new major or minor version of Abinit is about to be released, we usually package a snapshot of the fallbacks and distribute it as a source tarball. This file is called // | When a new major or minor version of Abinit is about to be released, we usually package a snapshot of the fallbacks and distribute it as a source tarball. This file is called // | ||
- | Source tarballs generated so far can be downloaded from Launchpad (https:// | + | /* Source tarballs generated so far can be downloaded from Launchpad (https:// |
+ | */ | ||
<WRAP info> | <WRAP info> | ||
Line 103: | Line 101: | ||
===== Building the fallbacks with Abinit ===== | ===== Building the fallbacks with Abinit ===== | ||
- | For convenience, | + | For convenience, |
+ | It is possible to build it along with Abinit, although much more efficient to build it and install it separately, since you do not have to rebuild the fallbacks each time you wish to make a new build of Abinit.\\ | ||
+ | Please note that the version of the fallbacks you may find within the Abinit source tree will always be outdated. | ||
- | Building the fallbacks within Abinit is mainly of interest to developers who want to experiment with compile flags and explore issues related to compilers and portability. It can also help - to a reduced extent only - users who are stuck within very rigid configurations and restricted build environments. Here is the way to proceed: | + | Building the fallbacks within Abinit is mainly of interest to developers who want to experiment with compile flags and explore issues related to compilers and portability. It can also help - to a reduced extent only - users who are stuck within very rigid configurations and restricted build environments.\\ |
+ | Here is the way to proceed: | ||
<code bash> | <code bash> | ||
tar xvzf abinit-x.y.z.tar.gz | tar xvzf abinit-x.y.z.tar.gz | ||
Line 111: | Line 112: | ||
mkdir tmp-build | mkdir tmp-build | ||
cd tmp-build | cd tmp-build | ||
- | ../ | + | |
- | | + | # Create a " |
- | # Abinit | + | ../ |
- | # fails because | + | </ |
- | cd transient | + | |
- | # Edit the build-abinit-fallbacks.sh script and set its install prefix | + | What happens in this case is that we first configure |
- | # as instructed therein | + | At this stage, |
+ | |||
+ | <code bash> | ||
+ | cd fallbacks | ||
./ | ./ | ||
- | make | + | |
- | make install | + | # At the end of the process, the script provides the options with prefixes to fallbacks. |
+ | # e.g. | ||
+ | # | ||
+ | # | ||
+ | # You can link these fallbacks with Abinit by copying the options to your ac9 file. | ||
cd .. | cd .. | ||
- | ../ | + | ../ |
- | | + | |
- | ... options ... | + | |
make -j8 # For example, if you have at least 8 cores available | make -j8 # For example, if you have at least 8 cores available | ||
make check | make check | ||
make install | make install | ||
</ | </ | ||
- | + | /* ../configure --prefix=/ | |
- | What happens in this case is that we first configure Abinit, so that it generates all the necessary information to build the fallbacks for missing external dependencies. The configure | + | * --with-fallbacks-prefix="/ |
+ | * | ||
+ | */ | ||
Once the information is available to the configure script of the fallbacks, we can build them within the Abinit source tree and install them outside. Next, Abinit uses them during its own build and we can install it normally after checking that everything is fine. In further builds with the same compiler, the same fallbacks can be reused, i.e. no need to rebuild them. | Once the information is available to the configure script of the fallbacks, we can build them within the Abinit source tree and install them outside. Next, Abinit uses them during its own build and we can install it normally after checking that everything is fine. In further builds with the same compiler, the same fallbacks can be reused, i.e. no need to rebuild them. | ||
- | One line must be changed in the //transient/ | + | By default, the fallbacks are installed in "/ |
+ | The variable // | ||
+ | Please note that this path must be absolute, i.e. start with a slash. | ||
<code bash> | <code bash> | ||
+ | #!/bin/bash | ||
+ | |||
+ | # Init | ||
+ | fallbacks_prefix=" | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | |||
+ | /* ------------------------------------------------------------------------------------------------- | ||
+ | One line must be changed in the // | ||
+ | |||
#!/bin/sh | #!/bin/sh | ||
Line 151: | Line 175: | ||
... | ... | ||
- | </code> | + | */ |
===== Using installed fallbacks ===== | ===== Using installed fallbacks ===== | ||
Line 185: | Line 209: | ||
. | . | ||
</ | </ | ||
- | where files are ordered by compiler vendor, then compiler version, and finally build variant. Each variant corresponds to a set of build parameters and is summarized by a keyword: | + | where files are ordered by compiler vendor |
* //gpu// for a GPU-aware configuration; | * //gpu// for a GPU-aware configuration; | ||
- | * //mpi// for a MPI-aware configuration; | + | * //openmpi// or //mpich// for a MPI-aware configuration; |
* //omp// for an OpenMP-aware configuration; | * //omp// for an OpenMP-aware configuration; | ||
* //sdebug// for a serial configuration with enhanced debug flags; | * //sdebug// for a serial configuration with enhanced debug flags; | ||
Line 206: | Line 230: | ||
==== The configuration of a package fails ==== | ==== The configuration of a package fails ==== | ||
- | Errors may appear at configure time when you build the fallbacks. In order to help you diagnose the problems, most packages provide a // | + | Errors may appear at configure time when you build the fallbacks. In order to help you diagnose the problems, most packages provide a // |
==== " | ==== " | ||
Line 222: | Line 246: | ||
* or restrict the execution of the program to the nodes which are compatible with the optimization flags the program has been built with. | * or restrict the execution of the program to the nodes which are compatible with the optimization flags the program has been built with. | ||
- | ===== Frequently Asked Querstions | + | ===== Frequently Asked Questions |
==== Do I need to build the fallbacks with the same build flags as Abinit? ==== | ==== Do I need to build the fallbacks with the same build flags as Abinit? ==== | ||
Line 244: | Line 268: | ||
===== Contributing to the fallbacks ===== | ===== Contributing to the fallbacks ===== | ||
- | Advanced developers may contribute to the Abinit Fallbacks. Please read our //[[developers: | + | Advanced developers may contribute to the Abinit Fallbacks. Please read our //[[build: |
build/fallbacks.txt · Last modified: 2020/08/19 12:55 by Jean-Michel Beuken