build:fallbacks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
build:fallbacks [2020/08/19 09:35] – [Using installed fallbacks] Jean-Michel Beuken | build:fallbacks [2020/08/19 12:42] – [Building the fallbacks with Abinit] Jean-Michel Beuken | ||
---|---|---|---|
Line 101: | 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 109: | 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 149: | Line 175: | ||
... | ... | ||
- | </code> | + | */ |
===== Using installed fallbacks ===== | ===== Using installed fallbacks ===== |
build/fallbacks.txt · Last modified: 2020/08/19 12:55 by Jean-Michel Beuken