User Tools

Site Tools


hpc:linking_libraries

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
hpc:linking_libraries [2017/05/25 10:42] Matthieu Verstraetehpc:linking_libraries [2019/03/28 14:30] Marc Torrent
Line 1: Line 1:
 ====== How to link libraries ====== ====== How to link libraries ======
 +
 +Numerous details given in: 
 +{{ :howto:installing_abinit.pdf |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, [[hpc:submission_scripts|configuration files]] are provided for your own use, or to give the sysadmins a starting point. 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, [[hpc:submission_scripts|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:
 +<code>
 +./configure --with-fft-flavor=fftw3 --with-fft-libs="-L/usr/local/lib/ -lfftw3 -lfftw3f" --with-fft-incs="-I/usr/local/include"
 +</code>
 +or in your .ac configuration file (note the dashes become underscores)
 +<code>
 +with_fft_flavor=fftw3
 +with_fft_libs="-L/usr/local/lib/ -lfftw3 -lfftw3f"
 +with_fft_incs="-I/usr/local/include"
 +</code>
 +Other library dependencies will have similar libs and incs flags for the library objects and for the header / fortran module files.
  
 ==== Libraries ==== ==== Libraries ====
hpc/linking_libraries.txt · Last modified: 2020/08/09 10:27 by Jean-Michel Beuken