enzo: build extra tools, add optimization variant (#25401)
* added inits and rings tools to be built * added opt variant
This commit is contained in:
parent
344b37730b
commit
72cabcf454
@ -21,6 +21,14 @@ class Enzo(MakefilePackage):
|
||||
depends_on('hdf5~mpi')
|
||||
depends_on('sse2neon', when='target=aarch64:')
|
||||
|
||||
variant(
|
||||
'opt', default='high',
|
||||
description='Optimization, some compilers do not ' +
|
||||
'produce stable code with high+ optimizations',
|
||||
values=('warn', 'debug', 'cudadebug', 'high', 'aggressive'),
|
||||
multi=False
|
||||
)
|
||||
|
||||
patch('for_aarch64.patch', when='target=aarch64:')
|
||||
|
||||
# https://github.com/enzo-project/enzo-dev/pull/158
|
||||
@ -41,6 +49,7 @@ def edit(self, spec, prefix):
|
||||
|
||||
with working_dir('src/enzo'):
|
||||
copy('Make.mach.linux-gnu', 'Make.mach.spack')
|
||||
|
||||
filter_file('^MACH_FILE.*',
|
||||
'MACH_FILE = Make.mach.spack',
|
||||
'Make.mach.spack')
|
||||
@ -57,12 +66,17 @@ def edit(self, spec, prefix):
|
||||
def build(self, spec, prefix):
|
||||
with working_dir('src/enzo'):
|
||||
make('machine-spack')
|
||||
make('opt-high')
|
||||
make('opt-' + self.spec.variants['opt'].value)
|
||||
make('show-config')
|
||||
make()
|
||||
with working_dir('src/inits'):
|
||||
make()
|
||||
with working_dir('src/ring'):
|
||||
make()
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree('bin', prefix.bin)
|
||||
install_tree('doc', prefix.doc)
|
||||
install_tree('input', prefix.input)
|
||||
install_tree('run', prefix.run)
|
||||
install(join_path('src', 'ring', 'ring.exe'), join_path(prefix.bin, 'ring'))
|
||||
|
Loading…
Reference in New Issue
Block a user