summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sjaardema <gsjaardema@gmail.com>2018-12-04 10:13:49 -0700
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2018-12-04 18:13:49 +0100
commit9f8e44551068b831f96b2f15523d12b03fd07d31 (patch)
treebbaca7bede837f6f34d17cee642586bc73322fe3
parentec67bbec2faf364fd13061b894c023c6488be055 (diff)
downloadspack-9f8e44551068b831f96b2f15523d12b03fd07d31.tar.gz
spack-9f8e44551068b831f96b2f15523d12b03fd07d31.tar.bz2
spack-9f8e44551068b831f96b2f15523d12b03fd07d31.tar.xz
spack-9f8e44551068b831f96b2f15523d12b03fd07d31.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/cgns/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py
index e101f84c27..7a21848e6b 100644
--- a/var/spack/repos/builtin/packages/cgns/package.py
+++ b/var/spack/repos/builtin/packages/cgns/package.py
@@ -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 @@ class Cgns(CMakePackage):
'-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',