1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
"""User provided customizations.
Here one changes the default arguments for compiling _gpaw.so.
Here are all the lists that can be modified:
* libraries
List of libraries to link: -l<lib1> -l<lib2> ...
* library_dirs
Library search directories: -L<dir1> -L<dir2> ...
* include_dirs
Header search directories: -I<dir1> -I<dir2> ...
* extra_link_args
Arguments forwarded directly to linker
* extra_compile_args
Arguments forwarded directly to compiler
* runtime_library_dirs
Runtime library search directories: -Wl,-rpath=<dir1> -Wl,-rpath=<dir2> ...
* extra_objects
* define_macros
To override use the form:
libraries = ['somelib', 'otherlib']
To append use the form
libraries += ['somelib', 'otherlib']
"""
# flake8: noqa
# compiler = 'gcc'
# platform_id = ''
# MPI:
mpi = True
if mpi:
compiler = 'mpicc'
# FFTW3:
fftw = True
if fftw:
libraries += ['fftw3']
# ScaLAPACK (version 2.0.1+ required):
scalapack = True
# Enable advanced IntelMKL specific scalapack functions (pzgeevx)
# intelmkl = True
if scalapack:
libraries += ['scalapack']
# Use Elpa (requires ScaLAPACK and Elpa API 20171201):
if 0:
elpa = True
elpadir = '/home/user/elpa'
libraries += ['elpa']
library_dirs += ['{}/lib'.format(elpadir)]
runtime_library_dirs += ['{}/lib'.format(elpadir)]
include_dirs += ['{}/include/elpa-xxxx.xx.xxx'.format(elpadir)]
# LibXC:
# In order to link libxc installed in a non-standard location
# (e.g.: configure --prefix=/home/user/libxc-2.0.1-1), use:
# - static linking:
if 0:
xc = '/home/user/libxc-4.0.4/'
include_dirs += [xc + 'include']
extra_link_args += [xc + 'lib/libxc.a']
if 'xc' in libraries:
libraries.remove('xc')
# - dynamic linking (requires rpath or setting LD_LIBRARY_PATH at runtime):
if 0:
xc = '/home/user/libxc-4.0.4/'
include_dirs += [xc + 'include']
library_dirs += [xc + 'lib']
# You can use rpath to avoid changing LD_LIBRARY_PATH:
runtime_library_dirs += [xc + 'lib']
if 'xc' not in libraries:
libraries.append('xc')
# Enable this, if your MPI doesn't support MPI_INPLACE
if 0:
undef_macros.append('GPAW_MPI_INPLACE')
# libvdwxc:
if 0:
libvdwxc = True
path = '/home/user/libvdwxc'
include_dirs += ['%s/include' % path]
library_dirs += ['%s/lib' % path]
runtime_library_dirs += ['%s/lib' % path]
libraries += ['vdwxc']
|