Add libint package (#1264)

* Add libint package

* Add Intel optimization flags recommended by CP2K

* Add new version and Intel compiler optimization flags for libxc

* Add older version of libint

* Libint depends on GMP C++ library
This commit is contained in:
Adam J. Stewart
2016-09-29 14:35:10 -05:00
committed by Todd Gamblin
parent a77b48f491
commit deb1cb4805
3 changed files with 127 additions and 5 deletions

View File

@@ -32,11 +32,27 @@ class Libxc(Package):
homepage = "http://www.tddft.org/programs/octopus/wiki/index.php/Libxc"
url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz"
version('3.0.0', '8227fa3053f8fc215bd9d7b0d36de03c')
version('2.2.2', 'd9f90a0d6e36df6c1312b6422280f2ec')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix,
# Optimizations for the Intel compiler, suggested by CP2K
optflags = '-O2'
if self.compiler.name == 'intel':
optflags += ' -xAVX -axCORE-AVX2 -ipo'
if which('xiar'):
env['AR'] = 'xiar'
env['CFLAGS'] = optflags
env['FCFLAGS'] = optflags
configure('--prefix={0}'.format(prefix),
'--enable-shared')
make()
make("install")
# libxc provides a testsuite, but many tests fail
# http://www.tddft.org/pipermail/libxc/2013-February/000032.html
# make('check')
make('install')