diff options
author | Nikolay Simakov <nikolays@buffalo.edu> | 2021-09-26 04:59:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-26 10:59:06 +0200 |
commit | 72cabcf45492940724aa750d393761894e4120fa (patch) | |
tree | 72c9581293b574bf639e33a1bcc83ceaaf01e94a | |
parent | 344b37730bfe5ebe9f205b47a03f2c6f4e791391 (diff) | |
download | spack-72cabcf45492940724aa750d393761894e4120fa.tar.gz spack-72cabcf45492940724aa750d393761894e4120fa.tar.bz2 spack-72cabcf45492940724aa750d393761894e4120fa.tar.xz spack-72cabcf45492940724aa750d393761894e4120fa.zip |
enzo: build extra tools, add optimization variant (#25401)
* added inits and rings tools to be built
* added opt variant
-rw-r--r-- | var/spack/repos/builtin/packages/enzo/package.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/enzo/package.py b/var/spack/repos/builtin/packages/enzo/package.py index e242d0da12..4b0c49011d 100644 --- a/var/spack/repos/builtin/packages/enzo/package.py +++ b/var/spack/repos/builtin/packages/enzo/package.py @@ -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 @@ class Enzo(MakefilePackage): 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 @@ class Enzo(MakefilePackage): 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')) |