hpgmg package: add debug option and new version (#7175)
This adds a static version of hpgmg (up to now only the latest commit from the master branch was available). This also adds a debug variant and sets optimization flags for ~debug when the compiler is gcc, intel, or clang
This commit is contained in:
parent
ec162e69b2
commit
74ffd8b6be
1 changed files with 13 additions and 3 deletions
|
@ -37,10 +37,11 @@ class Hpgmg(Package):
|
|||
the second coarsening 6 times, etc."""
|
||||
|
||||
homepage = "https://bitbucket.org/hpgmg/hpgmg"
|
||||
url = "https://bitbucket.org/hpgmg/hpgmg/get/master.tar.gz"
|
||||
url = "https://hpgmg.org/static/hpgmg-0.tar.gz"
|
||||
tags = ['proxy-app']
|
||||
|
||||
version('master', '4a2b139e1764c84ed7fe06334d3f8d8a')
|
||||
version('a0a5510df23b', 'b9c50f25e541428d4735fb07344d1d0ed9fc821bdde918d8e0defa78c0d9b4f9')
|
||||
version('develop', git='https://bitbucket.org/hpgmg/hpgmg.git', branch='master')
|
||||
|
||||
variant(
|
||||
'fe', default=True, description='Build finite element solver')
|
||||
|
@ -48,6 +49,7 @@ class Hpgmg(Package):
|
|||
'fv', default='mpi', values=('serial', 'mpi', 'none'),
|
||||
description='Build finite volume solver with or without MPI support')
|
||||
variant('cuda', default=False, description='Build with CUDA')
|
||||
variant('debug', default=False, description='Build in debug mode')
|
||||
|
||||
depends_on('petsc', when='+fe')
|
||||
depends_on('mpi', when='+fe')
|
||||
|
@ -68,10 +70,18 @@ def configure_args(self):
|
|||
if 'mpi' in self.spec:
|
||||
args.append('--CC={0}'.format(self.spec['mpi'].mpicc))
|
||||
|
||||
cflags = []
|
||||
if 'fv=none' in self.spec:
|
||||
args.append('--no-fv')
|
||||
else:
|
||||
args.append('--CFLAGS=' + self.compiler.openmp_flag)
|
||||
cflags.append(self.compiler.openmp_flag)
|
||||
|
||||
if '+debug' in self.spec:
|
||||
cflags.append('-g')
|
||||
elif any(map(self.spec.satisfies, ['%gcc', '%clang', '%intel'])):
|
||||
cflags += ['-O3', '-march=native']
|
||||
|
||||
args.append('--CFLAGS=' + ' '.join(cflags))
|
||||
|
||||
return args
|
||||
|
||||
|
|
Loading…
Reference in a new issue