Complete cleanup of the adios2 package configuration (#13107)
Provide up to date specs for build options Remove non-production versions Format using autopep8 and flake8 Separate cmake options in adios2 2.4.0 version Keep default as True as much as possible Support for Python 2 and 3 for adios2 versions <= 2.4.0 Starting v2.5.0 only Python 3 is supported Addressing review suggestions
This commit is contained in:
parent
be8f8856ce
commit
dafee9df31
@ -7,57 +7,58 @@
|
|||||||
|
|
||||||
|
|
||||||
class Adios2(CMakePackage):
|
class Adios2(CMakePackage):
|
||||||
"""Next generation of ADIOS developed in the Exascale Computing Program"""
|
"""The Adaptable Input Output System version 2,
|
||||||
|
developed in the Exascale Computing Program"""
|
||||||
|
|
||||||
homepage = "https://www.olcf.ornl.gov/center-projects/adios/"
|
homepage = "https://csmd.ornl.gov/software/adios2"
|
||||||
url = "https://github.com/ornladios/ADIOS2/archive/v2.0.0.tar.gz"
|
url = "https://github.com/ornladios/ADIOS2/archive/v2.5.0.tar.gz"
|
||||||
git = "https://github.com/ornladios/ADIOS2.git"
|
git = "https://github.com/ornladios/ADIOS2.git"
|
||||||
|
|
||||||
maintainers = ['ax3l', 'chuckatkins']
|
maintainers = ['ax3l', 'chuckatkins', 'williamfgc']
|
||||||
|
|
||||||
version('develop', branch='master')
|
version('develop', branch='master')
|
||||||
version('2.5.0', sha256='7c8ff3bf5441dd662806df9650c56a669359cb0185ea232ecb3578de7b065329')
|
version('2.5.0', sha256='7c8ff3bf5441dd662806df9650c56a669359cb0185ea232ecb3578de7b065329')
|
||||||
version('2.4.0', sha256='50ecea04b1e41c88835b4b3fd4e7bf0a0a2a3129855c9cc4ba6cf6a1575106e2')
|
version('2.4.0', sha256='50ecea04b1e41c88835b4b3fd4e7bf0a0a2a3129855c9cc4ba6cf6a1575106e2')
|
||||||
version('2.3.1', sha256='3bf81ccc20a7f2715935349336a76ba4c8402355e1dc3848fcd6f4c3c5931893')
|
version('2.3.1', sha256='3bf81ccc20a7f2715935349336a76ba4c8402355e1dc3848fcd6f4c3c5931893')
|
||||||
version('2.2.0', sha256='77058ea2ff7224dc02ea519733de42d89112cf21ffe7474fb2fa3c5696152948')
|
|
||||||
version('2.1.0', sha256='d4df3b3035b4236b51c77b59d68e756e825834b2ea3cb17439927a027831453b')
|
|
||||||
version('2.0.0', sha256='4eeedf4404824d8de6e4ef580b8a703c0aedb5c03f900f5ce6f85f0b35980135')
|
|
||||||
|
|
||||||
|
# general build options
|
||||||
|
variant('mpi', default=True, description='Enable MPI')
|
||||||
|
variant('build_type', default='Release',
|
||||||
|
description='CMake build type',
|
||||||
|
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
|
||||||
variant('shared', default=True,
|
variant('shared', default=True,
|
||||||
description='Also build shared libraries')
|
description='Also build shared libraries')
|
||||||
variant('pic', default=True,
|
variant('pic', default=True,
|
||||||
description='Enable position independent code '
|
description='Enable position independent code '
|
||||||
'(for usage of static in shared downstream deps)')
|
'(for usage of static in shared downstream deps)')
|
||||||
variant('mpi', default=True,
|
variant('endian_reverse', default=False,
|
||||||
description='Enable MPI')
|
description='Enable Endian Interoperability')
|
||||||
|
|
||||||
# transforms
|
# compression libraries
|
||||||
variant('blosc', default=True,
|
variant('blosc', default=True,
|
||||||
description='Enable Blosc transforms')
|
description='Enable Blosc compression')
|
||||||
variant('bzip2', default=True,
|
variant('bzip2', default=True,
|
||||||
description='Enable BZip2 transforms')
|
description='Enable BZip2 compression')
|
||||||
variant('zfp', default=True,
|
variant('zfp', default=True,
|
||||||
description='Enable ZFP transforms')
|
description='Enable ZFP compression')
|
||||||
variant('png', default=True,
|
variant('png', default=True,
|
||||||
description='Enable ZFP transforms')
|
description='Enable PNG compression')
|
||||||
|
variant('sz', default=True,
|
||||||
|
description='Enable SZ compression')
|
||||||
|
|
||||||
# sz is broken in 2.2.0: https://github.com/ornladios/ADIOS2/issues/705
|
|
||||||
# variant('sz', default=True,
|
|
||||||
# description='Enable SZ compression')
|
|
||||||
# transport engines
|
# transport engines
|
||||||
|
variant('sst', default=True,
|
||||||
|
description='Enable the SST staging engine')
|
||||||
variant('dataman', default=True,
|
variant('dataman', default=True,
|
||||||
description='Enable the DataMan engine for WAN transports')
|
description='Enable the DataMan engine for WAN transports')
|
||||||
# currently required by DataMan, optional in the future
|
variant('ssc', default=True,
|
||||||
# variant('zeromq', default=False,
|
description='Enable the SSC staging engine')
|
||||||
# description='Enable ZeroMQ for the DataMan engine')
|
|
||||||
variant('hdf5', default=False,
|
variant('hdf5', default=False,
|
||||||
description='Enable the HDF5 engine')
|
description='Enable the HDF5 engine')
|
||||||
variant('adios1', default=False,
|
|
||||||
description='Enable the ADIOS 1.x engine '
|
# optional language bindings, C++11 and C always provided
|
||||||
'(in 2.3.0+ integrated in BPFile engine)')
|
variant('python', default=True,
|
||||||
# language bindings
|
description='Enable the Python bindings')
|
||||||
variant('python', default=False,
|
|
||||||
description='Enable the Python >= 2.7 bindings')
|
|
||||||
variant('fortran', default=True,
|
variant('fortran', default=True,
|
||||||
description='Enable the Fortran bindings')
|
description='Enable the Fortran bindings')
|
||||||
|
|
||||||
@ -72,33 +73,26 @@ class Adios2(CMakePackage):
|
|||||||
# DataMan needs dlopen
|
# DataMan needs dlopen
|
||||||
conflicts('+dataman', when='~shared')
|
conflicts('+dataman', when='~shared')
|
||||||
|
|
||||||
# BPFile engine was emulated via a ADIOS1 engine prior to v2.3.0
|
|
||||||
conflicts('+adios1', when='@2.3.0:')
|
|
||||||
|
|
||||||
depends_on('cmake@3.6.0:', type='build')
|
depends_on('cmake@3.6.0:', type='build')
|
||||||
depends_on('pkgconfig', type='build', when='@2.2.0:')
|
depends_on('pkgconfig', type='build')
|
||||||
# The included ffs requires bison and flex but using them makes
|
|
||||||
# the build fail due to an undefined reference.
|
|
||||||
# depends_on('bison', type='build', when='@2.2.0:')
|
|
||||||
# depends_on('flex', when='@2.2.0:')
|
|
||||||
|
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
depends_on('zeromq', when='+dataman')
|
depends_on('zeromq', when='+dataman')
|
||||||
|
depends_on('zeromq', when='@2.4: +ssc')
|
||||||
|
|
||||||
depends_on('hdf5', when='+hdf5')
|
depends_on('hdf5', when='+hdf5')
|
||||||
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
||||||
depends_on('adios', when='@:2.2.99 +adios1')
|
|
||||||
depends_on('adios+mpi', when='@:2.2.99 +adios1+mpi')
|
|
||||||
|
|
||||||
depends_on('c-blosc', when='@2.4.0: +blosc')
|
depends_on('c-blosc', when='@2.4: +blosc')
|
||||||
depends_on('bzip2', when='+bzip2')
|
depends_on('bzip2', when='@2.4: +bzip2')
|
||||||
depends_on('libpng@1.6:', when='@2.4.0: +png')
|
depends_on('libpng@1.6:', when='@2.4: +png')
|
||||||
# depends_on('mgard', when='@2.3.0: +mgard')
|
|
||||||
depends_on('zfp@0.5.1:', when='+zfp')
|
depends_on('zfp@0.5.1:', when='+zfp')
|
||||||
# depends_on('sz@:1.4.12', when='+sz')
|
depends_on('sz@:2.0.2.0', when='+sz')
|
||||||
|
|
||||||
extends('python', when='+python')
|
extends('python', when='+python')
|
||||||
depends_on('python@2.7:', type=('build', 'run'), when='+python')
|
depends_on('python@2.7:2.8,3.5:',
|
||||||
|
when='@:2.4.0 +python', type=('build', 'run'))
|
||||||
|
depends_on('python@3.5:', when='@2.5.0: +python', type=('build', 'run'))
|
||||||
depends_on('py-numpy@1.6.1:', type=('build', 'run'), when='+python')
|
depends_on('py-numpy@1.6.1:', type=('build', 'run'), when='+python')
|
||||||
depends_on('py-mpi4py@2.0.0:', type=('build', 'run'), when='+mpi +python')
|
depends_on('py-mpi4py@2.0.0:', type=('build', 'run'), when='+mpi +python')
|
||||||
|
|
||||||
@ -113,10 +107,9 @@ def cmake_args(self):
|
|||||||
'-DBUILD_SHARED_LIBS:BOOL={0}'.format(
|
'-DBUILD_SHARED_LIBS:BOOL={0}'.format(
|
||||||
'ON' if '+shared' in spec else 'OFF'),
|
'ON' if '+shared' in spec else 'OFF'),
|
||||||
'-DADIOS2_BUILD_TESTING=OFF',
|
'-DADIOS2_BUILD_TESTING=OFF',
|
||||||
|
'-DADIOS2_BUILD_EXAMPLES=OFF',
|
||||||
'-DADIOS2_USE_MPI={0}'.format(
|
'-DADIOS2_USE_MPI={0}'.format(
|
||||||
'ON' if '+mpi' in spec else 'OFF'),
|
'ON' if '+mpi' in spec else 'OFF'),
|
||||||
'-DADIOS2_USE_BZip2={0}'.format(
|
|
||||||
'ON' if '+bzip2' in spec else 'OFF'),
|
|
||||||
'-DADIOS2_USE_MGARD=OFF',
|
'-DADIOS2_USE_MGARD=OFF',
|
||||||
'-DADIOS2_USE_ZFP={0}'.format(
|
'-DADIOS2_USE_ZFP={0}'.format(
|
||||||
'ON' if '+zfp' in spec else 'OFF'),
|
'ON' if '+zfp' in spec else 'OFF'),
|
||||||
@ -124,31 +117,34 @@ def cmake_args(self):
|
|||||||
'ON' if '+sz' in spec else 'OFF'),
|
'ON' if '+sz' in spec else 'OFF'),
|
||||||
'-DADIOS2_USE_DataMan={0}'.format(
|
'-DADIOS2_USE_DataMan={0}'.format(
|
||||||
'ON' if '+dataman' in spec else 'OFF'),
|
'ON' if '+dataman' in spec else 'OFF'),
|
||||||
'-DADIOS2_USE_ZeroMQ={0}'.format(
|
'-DADIOS2_USE_SST={0}'.format(
|
||||||
'ON' if '+dataman' in spec else 'OFF'),
|
'ON' if '+sst' in spec else 'OFF'),
|
||||||
'-DADIOS2_USE_HDF5={0}'.format(
|
'-DADIOS2_USE_HDF5={0}'.format(
|
||||||
'ON' if '+hdf5' in spec else 'OFF'),
|
'ON' if '+hdf5' in spec else 'OFF'),
|
||||||
'-DADIOS2_USE_Python={0}'.format(
|
'-DADIOS2_USE_Python={0}'.format(
|
||||||
'ON' if '+python' in spec else 'OFF'),
|
'ON' if '+python' in spec else 'OFF'),
|
||||||
'-DADIOS2_USE_Fortran={0}'.format(
|
'-DADIOS2_USE_Fortran={0}'.format(
|
||||||
'ON' if '+fortran' in spec else 'OFF')
|
'ON' if '+fortran' in spec else 'OFF'),
|
||||||
|
'-DADIOS2_USE_Endian_Reverse={0}'.format(
|
||||||
|
'ON' if '+endian_reverse' in spec else 'OFF'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# option removed and integrated in internal BPFile engine
|
|
||||||
if self.spec.version < Version('2.3.0'):
|
|
||||||
args.append('-DADIOS2_USE_ADIOS1={0}'.format(
|
|
||||||
'ON' if '+adios1' in spec else 'OFF'))
|
|
||||||
|
|
||||||
if self.spec.version >= Version('2.4.0'):
|
if self.spec.version >= Version('2.4.0'):
|
||||||
args.append('-DADIOS2_USE_Blosc={0}'.format(
|
args.append('-DADIOS2_USE_Blosc={0}'.format(
|
||||||
'ON' if '+blosc' in spec else 'OFF'))
|
'ON' if '+blosc' in spec else 'OFF'))
|
||||||
|
args.append('-DADIOS2_USE_BZip2={0}'.format(
|
||||||
|
'ON' if '+bzip2' in spec else 'OFF'))
|
||||||
args.append('-DADIOS2_USE_PNG={0}'.format(
|
args.append('-DADIOS2_USE_PNG={0}'.format(
|
||||||
'ON' if '+png' in spec else 'OFF'))
|
'ON' if '+png' in spec else 'OFF'))
|
||||||
|
args.append('-DADIOS2_USE_SSC={0}'.format(
|
||||||
|
'ON' if '+ssc' in spec else 'OFF'))
|
||||||
|
|
||||||
if spec.satisfies('~shared'):
|
if spec.satisfies('~shared'):
|
||||||
args.append('-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL={0}'.format(
|
args.append('-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL={0}'.format(
|
||||||
'ON' if '+pic' in spec else 'OFF'))
|
'ON' if '+pic' in spec else 'OFF'))
|
||||||
|
|
||||||
if spec.satisfies('+python'):
|
if spec.satisfies('+python'):
|
||||||
args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s'
|
args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s'
|
||||||
% self.spec['python'].command.path)
|
% self.spec['python'].command.path)
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user