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
This commit is contained in:
parent
bd51f81e20
commit
cec784bb10
1 changed files with 14 additions and 1 deletions
|
@ -18,6 +18,7 @@ class Vasp(MakefilePackage):
|
||||||
homepage = "http://vasp.at"
|
homepage = "http://vasp.at"
|
||||||
url = "file://{0}/vasp.5.4.4.pl2.tgz".format(os.getcwd())
|
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.pl2', sha256='98f75fd75399a23d76d060a6155f4416b340a1704f256a00146f89024035bc8e')
|
||||||
version('5.4.4', sha256='5bd2449462386f01e575f9adf629c08cb03a13142806ffb6a71309ca4431cfb3')
|
version('5.4.4', sha256='5bd2449462386f01e575f9adf629c08cb03a13142806ffb6a71309ca4431cfb3')
|
||||||
|
|
||||||
|
@ -76,6 +77,9 @@ def edit(self, spec, prefix):
|
||||||
filter_file('^CPP_OPTIONS[ ]{0,}=[ ]{0,}',
|
filter_file('^CPP_OPTIONS[ ]{0,}=[ ]{0,}',
|
||||||
'CPP_OPTIONS ?= ',
|
'CPP_OPTIONS ?= ',
|
||||||
'makefile.include')
|
'makefile.include')
|
||||||
|
filter_file('^FFLAGS[ ]{0,}=[ ]{0,}',
|
||||||
|
'FFLAGS ?= ',
|
||||||
|
'makefile.include')
|
||||||
|
|
||||||
filter_file('^LIBDIR[ ]{0,}=.*$', '', 'makefile.include')
|
filter_file('^LIBDIR[ ]{0,}=.*$', '', 'makefile.include')
|
||||||
filter_file('^BLAS[ ]{0,}=.*$', 'BLAS ?=', 'makefile.include')
|
filter_file('^BLAS[ ]{0,}=.*$', 'BLAS ?=', 'makefile.include')
|
||||||
|
@ -113,8 +117,13 @@ def setup_build_environment(self, spack_env):
|
||||||
'-Dqd_emulate'])
|
'-Dqd_emulate'])
|
||||||
else:
|
else:
|
||||||
cpp_options.append('-DHOST=\\"LinuxGNU\\"')
|
cpp_options.append('-DHOST=\\"LinuxGNU\\"')
|
||||||
|
if self.spec.satisfies('@6:'):
|
||||||
|
cpp_options.append('-Dvasp6')
|
||||||
|
|
||||||
cflags = ['-fPIC', '-DADD_']
|
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('BLAS', spec['blas'].libs.ld_flags)
|
||||||
spack_env.set('LAPACK', spec['lapack'].libs.ld_flags)
|
spack_env.set('LAPACK', spec['lapack'].libs.ld_flags)
|
||||||
|
@ -141,15 +150,19 @@ def setup_build_environment(self, spack_env):
|
||||||
if '+vaspsol' in spec:
|
if '+vaspsol' in spec:
|
||||||
cpp_options.append('-Dsol_compat')
|
cpp_options.append('-Dsol_compat')
|
||||||
|
|
||||||
|
if spec.satisfies('%gcc@10:'):
|
||||||
|
fflags.append('-fallow-argument-mismatch')
|
||||||
|
|
||||||
# Finally
|
# Finally
|
||||||
spack_env.set('CPP_OPTIONS', ' '.join(cpp_options))
|
spack_env.set('CPP_OPTIONS', ' '.join(cpp_options))
|
||||||
spack_env.set('CFLAGS', ' '.join(cflags))
|
spack_env.set('CFLAGS', ' '.join(cflags))
|
||||||
|
spack_env.set('FFLAGS', ' '.join(fflags))
|
||||||
|
|
||||||
def build(self, spec, prefix):
|
def build(self, spec, prefix):
|
||||||
if '+cuda' in self.spec:
|
if '+cuda' in self.spec:
|
||||||
make('gpu', 'gpu_ncl')
|
make('gpu', 'gpu_ncl')
|
||||||
else:
|
else:
|
||||||
make()
|
make('std', 'gam', 'ncl')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
install_tree('bin/', prefix.bin)
|
install_tree('bin/', prefix.bin)
|
||||||
|
|
Loading…
Reference in a new issue