cp2k: update to 4.1 + update of dependencies (#3561)

* libint: updated version, ported to AutotoolsPackage

* elpa: updated version, ported to AutotoolsPackage

* wannier90: updated version, ported to MakefilePackage

* pexsi: updated version, ported to MakefilePackage

* cp2k: updated version, removed wannier 90 from dependencies if cp2k@4.1

* plumed: updated version

Modifications:

* modules has been turned into a single variant, as different versions
  have different modules available
* added dictionaries for patches

* netlib-scalapack: ported to CMakePackage
This commit is contained in:
Massimiliano Culpo
2017-03-30 16:46:05 +02:00
committed by Adam J. Stewart
parent 73f78cb8c4
commit f9c0348891
8 changed files with 160 additions and 122 deletions

View File

@@ -63,7 +63,7 @@ CXXFLAGS = ${COMPILE_FLAG} ${CPPFLAG} ${PROFILE_FLAG} ${INCLUDES}
CCDEFS = ${COMPILE_DEF}
CPPDEFS = ${COMPILE_DEF}
LOADOPTS = ${PROFILE_FLAG} ${LIBS}
FLOADOPTS = ${PROFILE_FLAG} ${LIBS} ${CPP_LIB}
FLOADOPTS = @FLDFLAGS ${PROFILE_FLAG} ${LIBS} ${CPP_LIB}
# Generate auto-dependencies
%.d: %.c

View File

@@ -30,7 +30,7 @@
from spack import *
class Pexsi(Package):
class Pexsi(MakefilePackage):
"""The PEXSI library is written in C++, and uses message passing interface
(MPI) to parallelize the computation on distributed memory computing
systems and achieve scalability on more than 10,000 processors.
@@ -46,14 +46,20 @@ class Pexsi(Package):
homepage = 'https://math.berkeley.edu/~linlin/pexsi/index.html'
url = 'https://math.berkeley.edu/~linlin/pexsi/download/pexsi_v0.9.0.tar.gz'
version('0.9.2', '0ce491a3a922d271c4edf9b20aa93076')
version('0.9.0', '0c1a2de891ba1445dfc184b2fa270ed8')
depends_on('parmetis')
depends_on('superlu-dist@3.3', when='@0.9.0')
depends_on('superlu-dist@4.3', when='@0.9.2')
variant(
'fortran', default=False, description='Builds the Fortran interface'
)
parallel = False
def install(self, spec, prefix):
def edit(self, spec, prefix):
substitutions = {
'@MPICC': self.spec['mpi'].mpicc,
@@ -70,9 +76,13 @@ def install(self, spec, prefix):
'@LAPACK_LIBS': self.spec['lapack'].libs.joined(),
'@BLAS_LIBS': self.spec['blas'].libs.joined(),
# FIXME : what to do with compiler provided libraries ?
'@STDCXX_LIB': ' '.join(self.compiler.stdcxx_libs)
'@STDCXX_LIB': ' '.join(self.compiler.stdcxx_libs),
'@FLDFLAGS': ''
}
if '@0.9.2' in self.spec:
substitutions['@FLDFLAGS'] = '-Wl,--allow-multiple-definition'
template = join_path(
os.path.dirname(inspect.getmodule(self).__file__),
'make.inc'
@@ -85,20 +95,29 @@ def install(self, spec, prefix):
for key, value in substitutions.items():
filter_file(key, value, makefile)
make()
def build(self, spec, prefix):
super(Pexsi, self).build(spec, prefix)
if '+fortran' in self.spec:
make('-C', 'fortran')
def install(self, spec, prefix):
# 'make install' does not exist, despite what documentation says
mkdirp(self.prefix.lib)
install(
join_path(self.stage.source_path, 'src', 'libpexsi_linux.a'),
join_path(self.prefix.lib, 'libpexsi.a')
)
install_tree(
join_path(self.stage.source_path, 'include'),
self.prefix.include
)
# fortran "interface"
make('-C', 'fortran')
install_tree(
join_path(self.stage.source_path, 'fortran'),
join_path(self.prefix, 'fortran')
)
if '+fortran' in self.spec:
install_tree(
join_path(self.stage.source_path, 'fortran'),
join_path(self.prefix, 'fortran')
)