CGNS: Add option for 64-bit integers (#9990)

* CGNS: Add option for 64-bit integers

Added the `int64` variant which will build the library using 64-bit integers for certain values.  This gives the capability to have models with more than 2 billion cells and/or nodes.  

Beginning with CGNS-3.1.0, two new typedef variables have been introduced to support 64-bit mode. The `cglong_t` typedef is always a 64-bit integer, and `cgsize_t` will be either a 32-bit or 64-bit integer depending on how the library was built. Many of the C functions in the MLL have been changed to to use `cgsize_t` instead of `int` in the arguments. These functions include any that may exceed the 2Gb limit of an` int`, e.g. zone dimensions, element data, boundary conditions, and connectivity. In Fortran, all integer data is taken to be `integer*4` for 32-bit and `integer*8` for 64-bit builds.
This commit is contained in:
Greg Sjaardema 2018-12-04 10:13:49 -07:00 committed by Massimiliano Culpo
parent ec67bbec2f
commit 9f8e445510

View File

@ -21,6 +21,7 @@ class Cgns(CMakePackage):
variant('fortran', default=False, description='Enable Fortran interface')
variant('scoping', default=True, description='Enable scoping')
variant('mpi', default=True, description='Enable parallel cgns')
variant('int64', default=False, description='Build with 64-bit integers')
depends_on('hdf5', when='+hdf5~mpi')
depends_on('hdf5+mpi', when='+hdf5+mpi')
@ -48,6 +49,10 @@ def cmake_args(self):
'-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc
])
options.append(
'-DCGNS_ENABLE_64BIT:BOOL={0}'.format(
'ON' if '+int64' in spec else 'OFF'))
if '+hdf5' in spec:
options.extend([
'-DCGNS_ENABLE_HDF5:BOOL=ON',