Update CGNS and add CGNS capability to Trilinos (#6568)
* Update CGNS to be able to be used in Trilinos. * Updating Trilinos to be able to use CGNS. * Fixing wrong cmake defines in trilinos for enabling cgns and cleaning up cgns package. * Changing cgns parallel variant to mpi. Removing explicit dependence on parallel-netcdf in trilinos.
This commit is contained in:
parent
01ba69c635
commit
5c43090ceb
@ -33,31 +33,53 @@ class Cgns(CMakePackage):
|
|||||||
homepage = "http://cgns.github.io/"
|
homepage = "http://cgns.github.io/"
|
||||||
url = "https://github.com/CGNS/CGNS/archive/v3.3.0.tar.gz"
|
url = "https://github.com/CGNS/CGNS/archive/v3.3.0.tar.gz"
|
||||||
|
|
||||||
|
version('3.3.1', '65c55998270c3e125e28ec5c3742e15d')
|
||||||
version('3.3.0', '64e5e8d97144c1462bee9ea6b2a81d7f')
|
version('3.3.0', '64e5e8d97144c1462bee9ea6b2a81d7f')
|
||||||
|
|
||||||
variant('hdf5', default=True, description='Enable HDF5 interface')
|
variant('hdf5', default=True, description='Enable HDF5 interface')
|
||||||
|
variant('fortran', default=False, description='Enable Fortran interface')
|
||||||
|
variant('scoping', default=True, description='Enable scoping')
|
||||||
|
variant('mpi', default=True, description='Enable parallel cgns')
|
||||||
|
|
||||||
depends_on('cmake@2.8:', type='build')
|
depends_on('hdf5', when='+hdf5~mpi')
|
||||||
depends_on('hdf5', when='+hdf5')
|
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
||||||
|
depends_on('mpi', when='+mpi')
|
||||||
parallel = False
|
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
cmake_args = []
|
options = []
|
||||||
|
|
||||||
if self.compiler.f77 and self.compiler.fc:
|
options.extend([
|
||||||
cmake_args.append('-DCGNS_ENABLE_FORTRAN=ON')
|
'-DCGNS_ENABLE_FORTRAN:BOOL=%s' % (
|
||||||
else:
|
'ON' if '+fortran' in spec else 'OFF'),
|
||||||
cmake_args.append('-DCGNS_ENABLE_FORTRAN=OFF')
|
'-DCGNS_ENABLE_SCOPING:BOOL=%s' % (
|
||||||
|
'ON' if '+scoping' in spec else 'OFF'),
|
||||||
if '+hdf5' in spec:
|
'-DCGNS_ENABLE_PARALLEL:BOOL=%s' % (
|
||||||
cmake_args.extend([
|
'ON' if '+mpi' in spec else 'OFF'),
|
||||||
'-DCGNS_ENABLE_HDF5=ON',
|
'-DCGNS_ENABLE_TESTS:BOOL=OFF',
|
||||||
'-DHDF5_DIR=%s' % spec['hdf5'].prefix
|
'-DCGNS_BUILD_CGNSTOOLS:BOOL=OFF'
|
||||||
])
|
])
|
||||||
|
|
||||||
else:
|
if '+mpi' in spec:
|
||||||
cmake_args.append('-DCGNS_ENABLE_HDF5=OFF')
|
options.extend([
|
||||||
|
'-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc,
|
||||||
|
'-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx,
|
||||||
|
'-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc
|
||||||
|
])
|
||||||
|
|
||||||
return cmake_args
|
if '+hdf5' in spec:
|
||||||
|
options.extend([
|
||||||
|
'-DCGNS_ENABLE_HDF5:BOOL=ON',
|
||||||
|
'-DHDF5_NEED_ZLIB:BOOL=ON',
|
||||||
|
'-DHDF5_INCLUDE_DIR:PATH=%s' % spec['hdf5'].prefix.include,
|
||||||
|
'-DHDF5_LIBRARY_DIR:PATH=%s' % spec['hdf5'].prefix.lib
|
||||||
|
])
|
||||||
|
if '+mpi' in spec:
|
||||||
|
options.extend([
|
||||||
|
'-DHDF5_NEED_MPI:BOOL=ON',
|
||||||
|
'-DHDF5_ENABLE_PARALLEL:BOOL=ON'
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
options.extend(['-DCGNS_ENABLE_HDF5=OFF'])
|
||||||
|
|
||||||
|
return options
|
||||||
|
@ -164,6 +164,8 @@ class Trilinos(CMakePackage):
|
|||||||
description='Enable Intrepid')
|
description='Enable Intrepid')
|
||||||
variant('intrepid2', default=False,
|
variant('intrepid2', default=False,
|
||||||
description='Enable Intrepid2')
|
description='Enable Intrepid2')
|
||||||
|
variant('cgns', default=False,
|
||||||
|
description='Enable CGNS')
|
||||||
|
|
||||||
resource(name='dtk',
|
resource(name='dtk',
|
||||||
git='https://github.com/ornl-cees/DataTransferKit',
|
git='https://github.com/ornl-cees/DataTransferKit',
|
||||||
@ -206,6 +208,7 @@ class Trilinos(CMakePackage):
|
|||||||
depends_on('netcdf+mpi', when="~pnetcdf")
|
depends_on('netcdf+mpi', when="~pnetcdf")
|
||||||
depends_on('netcdf+mpi+parallel-netcdf', when="+pnetcdf@master,12.12.1:")
|
depends_on('netcdf+mpi+parallel-netcdf', when="+pnetcdf@master,12.12.1:")
|
||||||
depends_on('parmetis', when='+metis')
|
depends_on('parmetis', when='+metis')
|
||||||
|
depends_on('cgns', when='+cgns')
|
||||||
# Trilinos' Tribits config system is limited which makes it very tricky to
|
# Trilinos' Tribits config system is limited which makes it very tricky to
|
||||||
# link Amesos with static MUMPS, see
|
# link Amesos with static MUMPS, see
|
||||||
# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html
|
# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html
|
||||||
@ -340,7 +343,8 @@ def cmake_args(self):
|
|||||||
'-DTrilinos_ENABLE_STKTopology:BOOL=ON',
|
'-DTrilinos_ENABLE_STKTopology:BOOL=ON',
|
||||||
'-DTrilinos_ENABLE_STKUnit_tests:BOOL=ON',
|
'-DTrilinos_ENABLE_STKUnit_tests:BOOL=ON',
|
||||||
'-DTrilinos_ENABLE_STKUnit_test_utils:BOOL=ON',
|
'-DTrilinos_ENABLE_STKUnit_test_utils:BOOL=ON',
|
||||||
'-DTrilinos_ENABLE_STKClassic:BOOL=OFF'
|
'-DTrilinos_ENABLE_STKClassic:BOOL=OFF',
|
||||||
|
'-DTrilinos_ENABLE_STKExprEval:BOOL=ON'
|
||||||
])
|
])
|
||||||
|
|
||||||
if '+dtk' in spec:
|
if '+dtk' in spec:
|
||||||
@ -539,6 +543,17 @@ def cmake_args(self):
|
|||||||
'-DTPL_ENABLE_Zlib:BOOL=OFF'
|
'-DTPL_ENABLE_Zlib:BOOL=OFF'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if '+cgns' in spec:
|
||||||
|
options.extend([
|
||||||
|
'-DTPL_ENABLE_CGNS:BOOL=ON',
|
||||||
|
'-DCGNS_INCLUDE_DIRS:PATH=%s' % spec['cgns'].prefix.include,
|
||||||
|
'-DCGNS_LIBRARY_DIRS:PATH=%s' % spec['cgns'].prefix.lib
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
options.extend([
|
||||||
|
'-DTPL_ENABLE_GGNS:BOOL=OFF'
|
||||||
|
])
|
||||||
|
|
||||||
# ################# Miscellaneous Stuff ######################
|
# ################# Miscellaneous Stuff ######################
|
||||||
|
|
||||||
# OpenMP
|
# OpenMP
|
||||||
|
Loading…
Reference in New Issue
Block a user