summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kuron <mkuron@users.noreply.github.com>2021-01-18 23:54:52 +0100
committerGitHub <noreply@github.com>2021-01-18 16:54:52 -0600
commitcec784bb103df102fde2942e0bc2cd2c5225deda (patch)
tree4e8a072890d941267e0c7ed306fa8556643e0597
parentbd51f81e207c5de31b5c81b2ce5548cfedc5ca2c (diff)
downloadspack-cec784bb103df102fde2942e0bc2cd2c5225deda.tar.gz
spack-cec784bb103df102fde2942e0bc2cd2c5225deda.tar.bz2
spack-cec784bb103df102fde2942e0bc2cd2c5225deda.tar.xz
spack-cec784bb103df102fde2942e0bc2cd2c5225deda.zip
vasp: fix build with gfortran 10 and add version 6.1.1 (#20900)
* vasp: fix build with gfortran 10 Avoid Error: Type mismatch between actual argument at (1) and actual argument at (2) * vasp: add version 6.1.1 * vasp 6: allow building without CUDA
-rw-r--r--var/spack/repos/builtin/packages/vasp/package.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/vasp/package.py b/var/spack/repos/builtin/packages/vasp/package.py
index 8b85eaaa30..842cc3bb35 100644
--- a/var/spack/repos/builtin/packages/vasp/package.py
+++ b/var/spack/repos/builtin/packages/vasp/package.py
@@ -18,6 +18,7 @@ class Vasp(MakefilePackage):
homepage = "http://vasp.at"
url = "file://{0}/vasp.5.4.4.pl2.tgz".format(os.getcwd())
+ version('6.1.1', sha256='e37a4dfad09d3ad0410833bcd55af6b599179a085299026992c2d8e319bf6927')
version('5.4.4.pl2', sha256='98f75fd75399a23d76d060a6155f4416b340a1704f256a00146f89024035bc8e')
version('5.4.4', sha256='5bd2449462386f01e575f9adf629c08cb03a13142806ffb6a71309ca4431cfb3')
@@ -76,6 +77,9 @@ class Vasp(MakefilePackage):
filter_file('^CPP_OPTIONS[ ]{0,}=[ ]{0,}',
'CPP_OPTIONS ?= ',
'makefile.include')
+ filter_file('^FFLAGS[ ]{0,}=[ ]{0,}',
+ 'FFLAGS ?= ',
+ 'makefile.include')
filter_file('^LIBDIR[ ]{0,}=.*$', '', 'makefile.include')
filter_file('^BLAS[ ]{0,}=.*$', 'BLAS ?=', 'makefile.include')
@@ -113,8 +117,13 @@ class Vasp(MakefilePackage):
'-Dqd_emulate'])
else:
cpp_options.append('-DHOST=\\"LinuxGNU\\"')
+ if self.spec.satisfies('@6:'):
+ cpp_options.append('-Dvasp6')
cflags = ['-fPIC', '-DADD_']
+ fflags = []
+ if '%gcc' in spec or '%intel' in spec:
+ fflags.append('-w')
spack_env.set('BLAS', spec['blas'].libs.ld_flags)
spack_env.set('LAPACK', spec['lapack'].libs.ld_flags)
@@ -141,15 +150,19 @@ class Vasp(MakefilePackage):
if '+vaspsol' in spec:
cpp_options.append('-Dsol_compat')
+ if spec.satisfies('%gcc@10:'):
+ fflags.append('-fallow-argument-mismatch')
+
# Finally
spack_env.set('CPP_OPTIONS', ' '.join(cpp_options))
spack_env.set('CFLAGS', ' '.join(cflags))
+ spack_env.set('FFLAGS', ' '.join(fflags))
def build(self, spec, prefix):
if '+cuda' in self.spec:
make('gpu', 'gpu_ncl')
else:
- make()
+ make('std', 'gam', 'ncl')
def install(self, spec, prefix):
install_tree('bin/', prefix.bin)