Skip to content
Snippets Groups Projects
Unverified Commit 6e49f5f0 authored by Greg Sjaardema's avatar Greg Sjaardema Committed by GitHub
Browse files

netcdf-c: remove maxdims and maxvars variant (#15524)

* NETCDF: Remove maxdims maxvars variant

I'm not sure of the correct protocol to do this, so decided to make a stab and hopefully it works or I'm told the correct way...

The `maxdims` and `maxvars` variants for the NetCDF package were, to the best of my knowledge, only ever used for the Exodus library in the SEACAS package.  In versions of NetCDF prior to 4.4.0, Exodus required that the `NC_MAX_DIMS` and `NC_MAX_VARS` be increased over the default values.  This requirement was removed in 4.4.0 and later.

I do not know of any way to make a variant depend on the version and since the `maxdims` and `maxvars` variants are integer values and not boolean, then every build of NetCDF will have  these variants.  Typically `maxdims=1024 maxvars=8192` and the build will patch the `netcdf.h` include file for every build even though it is (almost) never needed. 

The SEACAS package has a NetCDF version requirement of >4.6.2, so it no longer specifies the `maxdims` or `maxvars` variant and I could find no other package in spack that uses this variant either, so removal should not break anything *in* spack.  However, there is no guarantee that some other external package doesn't use the variant, so I'm not sure of the correct way to remove the variant.  

For this PR, I simply removed the variants.  If there is a way to specify use of the variant tied to a specific version, I couldn't find it anywhere...

* Address review comment

Removed `is_integral` and `import numbers` since `is_integral` was only place it was used.

* Add blank line for flake8
parent f6f56049
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment