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/"
|
||||
url = "https://github.com/CGNS/CGNS/archive/v3.3.0.tar.gz"
|
||||
|
||||
version('3.3.1', '65c55998270c3e125e28ec5c3742e15d')
|
||||
version('3.3.0', '64e5e8d97144c1462bee9ea6b2a81d7f')
|
||||
|
||||
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')
|
||||
|
||||
parallel = False
|
||||
depends_on('hdf5', when='+hdf5~mpi')
|
||||
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
||||
depends_on('mpi', when='+mpi')
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
cmake_args = []
|
||||
options = []
|
||||
|
||||
if self.compiler.f77 and self.compiler.fc:
|
||||
cmake_args.append('-DCGNS_ENABLE_FORTRAN=ON')
|
||||
else:
|
||||
cmake_args.append('-DCGNS_ENABLE_FORTRAN=OFF')
|
||||
options.extend([
|
||||
'-DCGNS_ENABLE_FORTRAN:BOOL=%s' % (
|
||||
'ON' if '+fortran' in spec else 'OFF'),
|
||||
'-DCGNS_ENABLE_SCOPING:BOOL=%s' % (
|
||||
'ON' if '+scoping' in spec else 'OFF'),
|
||||
'-DCGNS_ENABLE_PARALLEL:BOOL=%s' % (
|
||||
'ON' if '+mpi' in spec else 'OFF'),
|
||||
'-DCGNS_ENABLE_TESTS:BOOL=OFF',
|
||||
'-DCGNS_BUILD_CGNSTOOLS:BOOL=OFF'
|
||||
])
|
||||
|
||||
if '+hdf5' in spec:
|
||||
cmake_args.extend([
|
||||
'-DCGNS_ENABLE_HDF5=ON',
|
||||
'-DHDF5_DIR=%s' % spec['hdf5'].prefix
|
||||
if '+mpi' in spec:
|
||||
options.extend([
|
||||
'-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc,
|
||||
'-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx,
|
||||
'-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc
|
||||
])
|
||||
|
||||
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:
|
||||
cmake_args.append('-DCGNS_ENABLE_HDF5=OFF')
|
||||
options.extend(['-DCGNS_ENABLE_HDF5=OFF'])
|
||||
|
||||
return cmake_args
|
||||
return options
|
||||
|
@ -124,7 +124,7 @@ class Trilinos(CMakePackage):
|
||||
description='Compile with Amesos')
|
||||
variant('amesos2', default=True,
|
||||
description='Compile with Amesos2')
|
||||
variant('anasazi', default=True,
|
||||
variant('anasazi', default=True,
|
||||
description='Compile with Anasazi')
|
||||
variant('ifpack', default=True,
|
||||
description='Compile with Ifpack')
|
||||
@ -162,8 +162,10 @@ class Trilinos(CMakePackage):
|
||||
description='Enable Shards')
|
||||
variant('intrepid', default=False,
|
||||
description='Enable Intrepid')
|
||||
variant('intrepid2', default=False,
|
||||
variant('intrepid2', default=False,
|
||||
description='Enable Intrepid2')
|
||||
variant('cgns', default=False,
|
||||
description='Enable CGNS')
|
||||
|
||||
resource(name='dtk',
|
||||
git='https://github.com/ornl-cees/DataTransferKit',
|
||||
@ -206,6 +208,7 @@ class Trilinos(CMakePackage):
|
||||
depends_on('netcdf+mpi', when="~pnetcdf")
|
||||
depends_on('netcdf+mpi+parallel-netcdf', when="+pnetcdf@master,12.12.1:")
|
||||
depends_on('parmetis', when='+metis')
|
||||
depends_on('cgns', when='+cgns')
|
||||
# Trilinos' Tribits config system is limited which makes it very tricky to
|
||||
# link Amesos with static MUMPS, see
|
||||
# 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_STKUnit_tests: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:
|
||||
@ -539,6 +543,17 @@ def cmake_args(self):
|
||||
'-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 ######################
|
||||
|
||||
# OpenMP
|
||||
|
Loading…
Reference in New Issue
Block a user