User Tools

Site Tools


hpc:linking_libraries

This is an old revision of the document!


How to link libraries

Numerous details given in: Tutorial from the 2019 ABINIT School

The bottom line is you should first try to get a system administrator to compile ABINIT for you on their machine (they may already have done so!). They are most knowledgeable about optimization and library dependencies, toolchains, etc… and can make the executable available to all users. For a number of machines we use regularly, configuration files are provided for your own use, or to give the sysadmins a starting point.

Libraries are set up at configuration time using command line arguments or lines in the configuration file. As an example for FFTs:

./configure --with-fft-flavor=fftw3 --with-fft-libs="-L/usr/local/lib/ -lfftw3 -lfftw3f" --with-fft-incs="-I/usr/local/include"

or in your .ac configuration file (note the dashes become underscores)

with_fft_flavor=fftw3
with_fft_libs="-L/usr/local/lib/ -lfftw3 -lfftw3f"
with_fft_incs="-I/usr/local/include"

Other library dependencies will have similar libs and incs flags for the library objects and for the header / fortran module files.

Libraries

Using optimized libraries is essential to get the full performance out of ABINIT. HPC will provide vendor-optimized versions of the libraries which are tuned to processor models, architecture, network topology, memory distribution, etc… MKL, ESSL, FFTW3, ACML and others can be included to provide linear algebra, FFTs and other central components to ABINIT.

Modules

Most modern HPC infrastructures work with the module framework. You load modules which set up your environment to use a specific set of compilers, MPI, libraries etc… Then you compile ABINIT and make sure you load the same modules before running it (typically load them in your .bashrc or .tcshrc file).

easybuild

to be completed

Anaconda

Anaconda provides a systematic package management environment, which can install a full stack of software to get you up and running with ABINIT. It was started for python but works for any kind of software with dependencies. Anaconda supports virtual environments such that you can install several versions. There is a channel devoted to ABINIT and another for abipy.

to be completed

hpc/linking_libraries.1553779813.txt.gz · Last modified: 2019/03/28 14:30 by Marc Torrent