AOCC support for CloverLeaf (#25106)
* AOCC support for CloverLeaf * removing patch as it is upstreamed to source Co-authored-by: mohan002 <mohbabul@amd.com>
This commit is contained in:
parent
88d24150e6
commit
d1ee325ecd
1 changed files with 19 additions and 0 deletions
|
@ -12,14 +12,18 @@ class Cloverleaf(MakefilePackage):
|
|||
|
||||
homepage = "http://uk-mac.github.io/CloverLeaf"
|
||||
url = "http://downloads.mantevo.org/releaseTarballs/miniapps/CloverLeaf/CloverLeaf-1.1.tar.gz"
|
||||
git = "https://github.com/UK-MAC/CloverLeaf.git"
|
||||
|
||||
tags = ['proxy-app']
|
||||
|
||||
version('master', tag='master', submodules=True)
|
||||
version('1.1', sha256='de87f7ee6b917e6b3d243ccbbe620370c62df890e3ef7bdbab46569b57be132f')
|
||||
|
||||
variant('build', default='ref', description='Type of Parallelism Build',
|
||||
values=('cuda', 'mpi_only', 'openacc_cray',
|
||||
'openmp_only', 'ref', 'serial'))
|
||||
variant('ieee', default=False, description='Build with IEEE standards')
|
||||
variant('debug', default=False, description='Build with DEBUG flags')
|
||||
|
||||
depends_on('mpi', when='build=cuda')
|
||||
depends_on('mpi', when='build=mpi_only')
|
||||
|
@ -27,6 +31,11 @@ class Cloverleaf(MakefilePackage):
|
|||
depends_on('mpi', when='build=ref')
|
||||
depends_on('cuda', when='build=cuda')
|
||||
|
||||
conflicts('build=cuda', when='%aocc', msg="Currently AOCC supports only ref variant")
|
||||
conflicts('build=openacc_cray', when='%aocc', msg="Currently AOCC supports only ref variant")
|
||||
conflicts('build=serial', when='%aocc', msg="Currently AOCC supports only ref variant")
|
||||
conflicts('@1.1', when='%aocc', msg="AOCC support is provided from version v.1.3 and above")
|
||||
|
||||
@property
|
||||
def type_of_build(self):
|
||||
build = 'ref'
|
||||
|
@ -67,6 +76,8 @@ def build_targets(self):
|
|||
targets.append('COMPILER=INTEL')
|
||||
targets.append('FLAGS_INTEL=')
|
||||
targets.append('CFLAGS_INTEL=')
|
||||
elif '%aocc' in self.spec:
|
||||
targets.append('COMPILER=AOCC')
|
||||
elif '%pgi' in self.spec:
|
||||
targets.append('COMPILER=PGI')
|
||||
targets.append('FLAGS_PGI=')
|
||||
|
@ -76,6 +87,14 @@ def build_targets(self):
|
|||
targets.append('FLAGS_XLF=')
|
||||
targets.append('CFLAGS_XLF=')
|
||||
|
||||
# Explicit mention of else clause is not working as expected
|
||||
# So, not mentioning them
|
||||
if '+debug' in self.spec:
|
||||
targets.append('DEBUG=1')
|
||||
|
||||
if '+ieee' in self.spec:
|
||||
targets.append('IEEE=1')
|
||||
|
||||
return targets
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
|
Loading…
Reference in a new issue