adios2: Bump version and cleanup package code (#29779)
This commit is contained in:
parent
c7b9354810
commit
542f46065a
@ -8,12 +8,12 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class Adios2(CMakePackage):
|
||||
class Adios2(CMakePackage, CudaPackage):
|
||||
"""The Adaptable Input Output System version 2,
|
||||
developed in the Exascale Computing Program"""
|
||||
|
||||
homepage = "https://csmd.ornl.gov/software/adios2"
|
||||
url = "https://github.com/ornladios/ADIOS2/archive/v2.6.0.tar.gz"
|
||||
url = "https://github.com/ornladios/ADIOS2/archive/v2.8.0.tar.gz"
|
||||
git = "https://github.com/ornladios/ADIOS2.git"
|
||||
|
||||
maintainers = ['ax3l', 'chuckatkins', 'williamfgc']
|
||||
@ -21,6 +21,8 @@ class Adios2(CMakePackage):
|
||||
tags = ['e4s']
|
||||
|
||||
version('master', branch='master')
|
||||
version('2.8.0', sha256='5af3d950e616989133955c2430bd09bcf6bad3a04cf62317b401eaf6e7c2d479',
|
||||
preferred=True)
|
||||
version('2.7.1', sha256='c8e237fd51f49d8a62a0660db12b72ea5067512aa7970f3fcf80b70e3f87ca3e')
|
||||
version('2.7.0', sha256='4b5df1a1f92d7ff380416dec7511cfcfe3dc44da27e486ed63c3e6cffb173924')
|
||||
version('2.6.0', sha256='45b41889065f8b840725928db092848b8a8b8d1bfae1b92e72f8868d1c76216c')
|
||||
@ -28,61 +30,56 @@ class Adios2(CMakePackage):
|
||||
version('2.4.0', sha256='50ecea04b1e41c88835b4b3fd4e7bf0a0a2a3129855c9cc4ba6cf6a1575106e2')
|
||||
version('2.3.1', sha256='3bf81ccc20a7f2715935349336a76ba4c8402355e1dc3848fcd6f4c3c5931893')
|
||||
|
||||
# general build options
|
||||
variant('mpi', default=True, description='Enable MPI')
|
||||
# General build options
|
||||
variant('build_type', default='Release',
|
||||
description='CMake build type',
|
||||
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
|
||||
variant('shared', default=True,
|
||||
description='Also build shared libraries')
|
||||
variant('pic', default=True,
|
||||
description='Enable position independent code '
|
||||
'(for usage of static in shared downstream deps)')
|
||||
variant('endian_reverse', default=False,
|
||||
description='Enable endian conversion if a different '
|
||||
'endianness is detected between write and read.')
|
||||
|
||||
# compression libraries
|
||||
variant('blosc', default=True,
|
||||
description='Enable Blosc compression')
|
||||
variant('bzip2', default=True,
|
||||
description='Enable BZip2 compression')
|
||||
variant('zfp', default=True,
|
||||
description='Enable ZFP compression')
|
||||
variant('png', default=True,
|
||||
description='Enable PNG compression')
|
||||
variant('sz', default=True,
|
||||
description='Enable SZ compression')
|
||||
# There's not really any consistency about how static and shared libs are
|
||||
# implemented across spack. What we're trying to support is specifically three
|
||||
# library build types:
|
||||
# shared (which is implicitly w/ pic)
|
||||
# Implemented by +shared +pic
|
||||
# static w/o pic
|
||||
# Implemented by ~shared ~pic
|
||||
# static w/ pic
|
||||
# Implemented by ~shared +pic
|
||||
# shared w/o pic is not a valid configuration because shared libraries are Position
|
||||
# Independent # Code by design. We're not inherently tied to this approach and can
|
||||
# change how we're supporting differnt library types in the package at anytime if
|
||||
# spack decides on a standardized way of doing it across packages
|
||||
variant('shared', default=True, when='+pic', description='Build shared libraries')
|
||||
variant('pic', default=True, description='Build pic-enabled static libraries')
|
||||
|
||||
# transport engines
|
||||
variant('sst', default=True,
|
||||
description='Enable the SST staging engine')
|
||||
variant('dataman', default=False,
|
||||
# Features
|
||||
variant('mpi', default=True, description='Enable MPI')
|
||||
|
||||
# Compression libraries
|
||||
variant('blosc', default=True, when='@2.4:', description='Enable Blosc compression')
|
||||
variant('bzip2', default=True, when='@2.4:', description='Enable BZip2 compression')
|
||||
variant('zfp', default=True, description='Enable ZFP compression')
|
||||
variant('png', default=True, when='@2.4:', description='Enable PNG compression')
|
||||
variant('sz', default=True, description='Enable SZ compression')
|
||||
|
||||
# Rransport engines
|
||||
variant('sst', default=True, description='Enable the SST staging engine')
|
||||
variant('dataman', default=False, when='+shared',
|
||||
description='Enable the DataMan engine for WAN transports')
|
||||
variant('dataspaces', default=False,
|
||||
variant('dataspaces', default=False, when='@2.5:',
|
||||
description='Enable support for DATASPACES')
|
||||
variant('ssc', default=True,
|
||||
description='Enable the SSC staging engine')
|
||||
variant('hdf5', default=False,
|
||||
description='Enable the HDF5 engine')
|
||||
variant('ssc', default=True, description='Enable the SSC staging engine')
|
||||
variant('hdf5', default=False, description='Enable the HDF5 engine')
|
||||
|
||||
# optional language bindings, C++11 and C always provided
|
||||
variant('python', default=False,
|
||||
description='Enable the Python bindings')
|
||||
variant('fortran', default=True,
|
||||
description='Enable the Fortran bindings')
|
||||
# Optional language bindings, C++11 and C always provided
|
||||
variant('cuda', default=False, when='@2.8:', description='Enable CUDA support')
|
||||
variant('python', default=False, description='Enable the Python bindings')
|
||||
variant('fortran', default=True, description='Enable the Fortran bindings')
|
||||
|
||||
# requires mature C++11 implementations
|
||||
# Requires mature C++11 implementations
|
||||
conflicts('%gcc@:4.7')
|
||||
conflicts('%intel@:15')
|
||||
conflicts('%pgi@:14')
|
||||
|
||||
# shared libs must have position-independent code
|
||||
conflicts('+shared ~pic')
|
||||
|
||||
# DataMan needs dlopen
|
||||
conflicts('+dataman', when='~shared')
|
||||
|
||||
depends_on('cmake@3.12.0:', type='build')
|
||||
depends_on('pkgconfig', type='build')
|
||||
|
||||
@ -98,19 +95,19 @@ class Adios2(CMakePackage):
|
||||
depends_on('hdf5~mpi', when='+hdf5~mpi')
|
||||
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
||||
|
||||
depends_on('c-blosc', when='@2.4: +blosc')
|
||||
depends_on('bzip2', when='@2.4: +bzip2')
|
||||
depends_on('libpng@1.6:', when='@2.4: +png')
|
||||
depends_on('c-blosc', when='+blosc')
|
||||
depends_on('bzip2', when='+bzip2')
|
||||
depends_on('libpng@1.6:', when='+png')
|
||||
depends_on('zfp@0.5.1:', when='+zfp')
|
||||
depends_on('sz@2.0.2.0:', when='+sz')
|
||||
|
||||
extends('python', 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('python@2.7:2.8,3.5:', when='@:2.4.0', type='test')
|
||||
depends_on('python@3.5:', when='@2.5.0: +python', type=('build', 'run'))
|
||||
depends_on('python@3.5:', when='@2.5.0:', type='test')
|
||||
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-numpy@1.6.1:', when='+python', type=('build', 'run'))
|
||||
depends_on('py-mpi4py@2.0.0:', when='+mpi +python', type=('build', 'run'))
|
||||
|
||||
# Fix findmpi when called by dependees
|
||||
# See https://github.com/ornladios/ADIOS2/pull/1632
|
||||
@ -154,33 +151,29 @@ def cmake_args(self):
|
||||
from_variant = self.define_from_variant
|
||||
|
||||
args = [
|
||||
from_variant('CMAKE_POSITION_INDEPENDENT_CODE', 'pic'),
|
||||
from_variant('BUILD_SHARED_LIBS', 'shared'),
|
||||
'-DADIOS2_BUILD_EXAMPLES=OFF',
|
||||
from_variant('ADIOS2_USE_MPI', 'mpi'),
|
||||
'-DADIOS2_USE_MGARD=OFF',
|
||||
from_variant('ADIOS2_USE_ZFP', 'zfp'),
|
||||
from_variant('ADIOS2_USE_SZ', 'sz'),
|
||||
from_variant('ADIOS2_USE_Blosc', 'blosc'),
|
||||
from_variant('ADIOS2_USE_BZip2', 'bzip2'),
|
||||
from_variant('ADIOS2_USE_DataMan', 'dataman'),
|
||||
from_variant('ADIOS2_USE_SST', 'sst'),
|
||||
from_variant('ADIOS2_USE_HDF5', 'hdf5'),
|
||||
from_variant('ADIOS2_USE_Python', 'python'),
|
||||
from_variant('ADIOS2_USE_DataSpaces', 'dataspaces'),
|
||||
from_variant('ADIOS2_USE_Fortran', 'fortran'),
|
||||
from_variant('ADIOS2_USE_Endian_Reverse', 'endian_reverse'),
|
||||
from_variant('ADIOS2_USE_HDF5', 'hdf5'),
|
||||
from_variant('ADIOS2_USE_MPI', 'mpi'),
|
||||
from_variant('ADIOS2_USE_PNG', 'png'),
|
||||
from_variant('ADIOS2_USE_Python', 'python'),
|
||||
from_variant('ADIOS2_USE_SSC', 'ssc'),
|
||||
from_variant('ADIOS2_USE_SST', 'sst'),
|
||||
from_variant('ADIOS2_USE_SZ', 'sz'),
|
||||
from_variant('ADIOS2_USE_ZFP', 'zfp'),
|
||||
from_variant('ADIOS2_USE_CUDA', 'cuda'),
|
||||
self.define('BUILD_TESTING', self.run_tests),
|
||||
self.define('ADIOS2_BUILD_EXAMPLES', False),
|
||||
self.define('ADIOS2_USE_Endian_Reverse', True),
|
||||
self.define('ADIOS2_USE_IME', False),
|
||||
self.define('ADIOS2_USE_MGARD', False)
|
||||
]
|
||||
|
||||
if spec.version >= Version('2.4.0'):
|
||||
args.append(from_variant('ADIOS2_USE_Blosc', 'blosc'))
|
||||
args.append(from_variant('ADIOS2_USE_BZip2', 'bzip2'))
|
||||
args.append(from_variant('ADIOS2_USE_PNG', 'png'))
|
||||
args.append(from_variant('ADIOS2_USE_SSC', 'ssc'))
|
||||
|
||||
if spec.version >= Version('2.5.0'):
|
||||
args.append(from_variant('ADIOS2_USE_DataSpaces', 'dataspaces'))
|
||||
|
||||
if spec.version >= Version('2.6.0'):
|
||||
args.append('-DADIOS2_USE_IME=OFF')
|
||||
|
||||
if '+sst' in spec:
|
||||
args.extend([
|
||||
# Broken dependency package
|
||||
@ -193,18 +186,14 @@ def cmake_args(self):
|
||||
'-DCMAKE_DISABLE_FIND_PACKAGE_NVSTREAM=TRUE'
|
||||
])
|
||||
|
||||
if spec.satisfies('~shared'):
|
||||
args.append(from_variant('CMAKE_POSITION_INDEPENDENT_CODE', 'pic'))
|
||||
|
||||
if spec.satisfies('%fj'):
|
||||
if '%fj' in spec:
|
||||
args.extend([
|
||||
'-DCMAKE_Fortran_SUBMODULE_EXT=.smod',
|
||||
'-DCMAKE_Fortran_SUBMODULE_SEP=.'
|
||||
])
|
||||
|
||||
if spec.satisfies('+python') or self.run_tests:
|
||||
args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s'
|
||||
% spec['python'].command.path)
|
||||
if '+python' in spec or self.run_tests:
|
||||
args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s' % spec['python'].command.path)
|
||||
|
||||
return args
|
||||
|
||||
@ -213,7 +202,7 @@ def libs(self):
|
||||
spec = self.spec
|
||||
libs_to_seek = set()
|
||||
|
||||
if spec.satisfies('@2.6:'):
|
||||
if '@2.6:' in spec:
|
||||
libs_to_seek.add('libadios2_core')
|
||||
libs_to_seek.add('libadios2_c')
|
||||
libs_to_seek.add('libadios2_cxx11')
|
||||
@ -227,8 +216,7 @@ def libs(self):
|
||||
if '+fortran' in spec:
|
||||
libs_to_seek.add('libadios2_fortran_mpi')
|
||||
|
||||
if (self.spec.satisfies('@2.7: +shared+hdf5') and
|
||||
self.spec['hdf5'].satisfies('@1.12:')):
|
||||
if '@2.7: +shared+hdf5' in spec and '@1.12:' in spec['hdf5']:
|
||||
libs_to_seek.add('libadios2_h5vol')
|
||||
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user