adding AOCC support for CP2K 7.1 (#22641)

This commit is contained in:
AMD Toolchain Support 2021-03-31 16:52:04 +05:30 committed by GitHub
parent fa6e30c6a7
commit 9a453b2e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -272,6 +272,7 @@ def edit(self, spec, prefix):
elif '%aocc' in spec:
fcflags += [
'-ffree-form',
'-Mbackslash',
]
elif '%pgi' in spec or '%nvhpc' in spec:
fcflags += ['-Mfreeform', '-Mextend']

View File

@ -80,6 +80,9 @@ def setup_build_environment(self, env):
if '%intel' in self.spec and which('xiar'):
env.set('AR', 'xiar')
if '%aocc' in self.spec:
env.append_flags('FCFLAGS', '-fPIC')
if '+cuda' in self.spec:
nvcc = self.spec['cuda'].prefix.bin.nvcc
env.set('CCLD', '{0} -ccbin {1}'.format(nvcc, spack_cc))
@ -100,6 +103,15 @@ def configure_args(self):
return args
@run_after('configure')
def patch_libtool(self):
"""AOCC support for LIBXC"""
if '%aocc' in self.spec:
filter_file(
r'\$wl-soname \$wl\$soname',
r'-fuse-ld=ld -Wl,-soname,\$soname',
'libtool', string=True)
def check(self):
# libxc provides a testsuite, but many tests fail
# http://www.tddft.org/pipermail/libxc/2013-February/000032.html