Skip to content

Unified environment updates for Intel and netcdf-c#221

Merged
climbfuji merged 15 commits into
JCSDA:jcsda_emc_spack_stackfrom
climbfuji:feature/unified-dev-intel-18
Feb 15, 2023
Merged

Unified environment updates for Intel and netcdf-c#221
climbfuji merged 15 commits into
JCSDA:jcsda_emc_spack_stackfrom
climbfuji:feature/unified-dev-intel-18

Conversation

@climbfuji
Copy link
Copy Markdown
Collaborator

@climbfuji climbfuji commented Feb 8, 2023

Description

This PR contains updates for cdo and nco to build with Intel and for netcdf-c to avoid a compiler bug in the byterange I/O code for version 4.9.1.

This PR is needed for the unified environment. For testing, see JCSDA/spack-stack#454

Fixes JCSDA/spack-stack#468

@climbfuji climbfuji changed the title DRAFT Unified environment - restrictions on newer package versions with Intel 18 Unified environment updates for Intel and netcdf-c Feb 14, 2023
Comment thread var/spack/repos/builtin/packages/netcdf-c/package.py
@ulmononian
Copy link
Copy Markdown
Collaborator

@climbfuji any platform you'd like this tested on specifically? should i just ensure i can build nco and cdo w/ intel-18 and that netcdf-c/4.9.1 builds ok (also with intel-18?) ?

@climbfuji
Copy link
Copy Markdown
Collaborator Author

@climbfuji any platform you'd like this tested on specifically? should i just ensure i can build nco and cdo w/ intel-18 and that netcdf-c/4.9.1 builds ok (also with intel-18?) ?

Not for the purpose of this PR. We'll do the full installs and testing in a follow-up PR (needs updates to site configs etc). Note also that we rolled back netcdf-c to 4.9.0 because the UFS crashes with 4.9.1.

@ulmononian
Copy link
Copy Markdown
Collaborator

@climbfuji gotcha. glad to see the nco/cdo fixes for the intel 18 issue. will approve.

# New byte-range I/O option doesn't compile with 4.9.1, will be fixed in 4.9.2
# https://github.com/Unidata/netcdf-c/issues/2614
variant("byterange", default=False, description="Allow byte-range I/O", when="@4.9.1")
variant("byterange", default=True, description="Allow byte-range I/O", when="@4.9.2:")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as we're at it, how about adding variant("byterange", default=False, description="Allow byte-range I/O", when="@4.7.0:4.9.0")? In any case I would lean toward setting it default=False because it's off by default in the build system itself (both configure and cmake).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree. I didn't know that it was available in 4.7.0 already. I'll make the change as follows (not that it goes up to 4.9.1):

    variant("byterange", default=False, description="Allow byte-range I/O", when="@4.7.0:4.9.1")
    variant("byterange", default=True, description="Allow byte-range I/O", when="@4.9.2:")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very annoying, but for some reason the above suggestion makes +byterange the default, even for 4.9.0. Looks like you convinced me, for now I'll just use

variant("byterange", default=False, description="Allow byte-range I/O", when="@4.7.0:")

and we deal with enabling it for newer versions later.

spec = self.spec
return ["--{0}-doc".format("enable" if "+doc" in spec else "disable")]

config_args = ["--{0}-doc".format("enable" if "+doc" in spec else "disable")]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick: I think this could be "self.enable_or_disable". Feel free to disregard.

Comment thread var/spack/repos/builtin/packages/netcdf-c/package.py Outdated
@climbfuji
Copy link
Copy Markdown
Collaborator Author

Thanks @AlexanderRichert-NOAA. I tested this locally on my macOS, and in order to avoid duplicates I had to enable the szip variant for hdf5 in our default package config (because global-workflow-env requires ncl which in turn requires hdf5+szip). I pushed this change to the parent spack-stack PR with the latest commit. Going to merge this PR now.

@climbfuji
Copy link
Copy Markdown
Collaborator Author

The spack unit tests all passed, merging.

@climbfuji climbfuji merged commit d1f8dda into JCSDA:jcsda_emc_spack_stack Feb 15, 2023
@climbfuji climbfuji deleted the feature/unified-dev-intel-18 branch February 15, 2023 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

For unified-dev: cdo fails to compile with Intel 2021.4.0 and gcc9 backend

4 participants