-
Notifications
You must be signed in to change notification settings - Fork 7
Spack Components for OM3 #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 70 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
5d72a48
hacks to build https://github.com/ACCESS-NRI/cice5/tree/cice_gsi8.1
anton-seaice 6e9c3f6
draft of changes
anton-seaice b944115
attempt at a cice package
anton-seaice c984bee
draft of MOM6 package
minghangli-uni c53d2b9
add invariant
minghangli-uni 2001f54
beginnings of an access share package
anton-seaice 9d856f8
Revert "hacks to build https://github.com/ACCESS-NRI/cice5/tree/cice_…
anton-seaice 4e4908e
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice 42eb0fc
revert cice5
anton-seaice 0aaeca1
improvements
anton-seaice 7f93dbc
Update MOM6/package.py
minghangli-uni 2944f7a
increments
anton-seaice a2d610d
Merge remote-tracking branch 'origin/163-om3-components' into 163-om3…
anton-seaice 79d34bb
increments
anton-seaice 6e6421c
rename to access-cice & make access3-exe and other experiments
anton-seaice b8b394a
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice d2dab1f
working draft of OM3 build (with CICE only)
anton-seaice b167ae5
formatting
anton-seaice ed3b028
whitespace
anton-seaice b72c6e0
whitespace
anton-seaice bd2bca8
fix define
anton-seaice c5f1658
temp set defaul configuration to CICE6 only
anton-seaice b75b6c9
refinements
anton-seaice d3aff02
Remove mom6
minghangli-uni 2a0ad48
add access-mom6
minghangli-uni f91f2be
resolves whitespaces
minghangli-uni f2def26
Update package.py
anton-seaice a8e8a5f
submodules = True
anton-seaice 2a4b0f1
Missing fms precision
anton-seaice 07fc321
new cmakelist dir
anton-seaice 49bde52
remove mom6_exec variant
minghangli-uni 3ac4aea
Fix syntax errors
minghangli-uni 71561ad
name tweaks
anton-seaice f219d71
Update packages/access-cice/package.py
anton-seaice 30d37f2
possibly better build curation
anton-seaice be5bfcf
comment out unused lines
anton-seaice 174fcb5
Update packages/access3-exe/package.py
anton-seaice 4bede53
Update packages/access3-exe/package.py
anton-seaice 94b9cb6
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice 30abf59
try without CMAKE compiler flags in package
anton-seaice 957a4c8
some tidyups and review comments
anton-seaice 9b6c462
messing around with configurations validation
anton-seaice 2b84afc
fix handing of deps
anton-seaice 7e77090
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice 3295e10
review comments and messing around with deps
anton-seaice 7e91874
ww3 package
anton-seaice c7ae134
Update packages/access-mom6/package.py
anton-seaice 3a4cdc5
today's tidup / review comments
anton-seaice eb20ffd
general cleanup
anton-seaice 62b1075
tidyuup
anton-seaice d993b03
typo
anton-seaice 25477fd
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice 7bf11ff
rm -fp-model and build_type
anton-seaice 8219072
some variable name changes
anton-seaice 79e9a6a
some variable name changes
anton-seaice a9a450e
some variable name changes
anton-seaice d48948e
some variable name changes
anton-seaice 5945470
fix asymmetric_mom
anton-seaice db4a6e5
typos don't help
anton-seaice 37814a7
formatting
anton-seaice 998cb6d
rm CESMCOUPLED as a variant
anton-seaice 97d725e
finish removing cesmcoupled
anton-seaice 0a9df31
rename access3-exe to access3
anton-seaice 043d65a
Merge remote-tracking branch 'origin/main' into 163-om3-components
anton-seaice c4399b2
more copyright notices
anton-seaice 07d9096
Apply suggestions from code review
anton-seaice 91f40f1
Update packages/access-mom6/package.py
anton-seaice 21b12fa
Update packages/access3/package.py
anton-seaice b811a55
Update packages/access3-share/package.py
anton-seaice 2ca4940
Apply suggestions from code review
anton-seaice d3447c9
Update packages/access3-share/package.py
anton-seaice fa6f12d
Update packages/access3-share/package.py
anton-seaice d48546f
Some neatening
anton-seaice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Copyright Spack Project Developers. See COPYRIGHT file for details. | ||
| # | ||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
|
||
| from spack.package import * | ||
|
|
||
|
|
||
| class AccessCice(CMakePackage): | ||
| """CICE is a computationally efficient model for simulating the growth, melting, | ||
| and movement of polar sea ice. CICE is maintained and developed by the CICE-Consortium. | ||
| This package builds using the Access3Share common libraries for ACCESS 3 models.""" | ||
|
|
||
| homepage = "https://github.com/CICE-Consortium/CICE" | ||
| git = "https://github.com/ACCESS-NRI/CICE" | ||
| submodules = True | ||
| maintainers("anton-seaice", "harshula") | ||
|
|
||
| # see license file at https://github.com/CICE-Consortium/CICE | ||
| license("LicenseRef-CICE", checked_by="anton-seaice") | ||
|
|
||
| variant("openmp", default=False, description="Enable OpenMP") | ||
| variant("access3", default=True, description="Install CICE as library for Access3 models") | ||
|
|
||
| variant("io_type", | ||
| default="NetCDF", | ||
| values=("NetCDF", "PIO", "Binary"), | ||
| description="CICE IO Method" | ||
| ) | ||
|
|
||
| depends_on("access3-share", when="+access3") | ||
| depends_on("[email protected]:", type="build") | ||
| depends_on("mpi") | ||
| depends_on("[email protected]:", when="io_type=NetCDF") | ||
| depends_on("[email protected]:", when="io_type=PIO") | ||
|
|
||
| root_cmakelists_dir = "configuration/scripts/cmake" | ||
|
|
||
| def cmake_args(self): | ||
| args = [ | ||
| self.define_from_variant("CICE_OPENMP", "openmp"), | ||
| self.define_from_variant("CICE_IO", "io_type"), | ||
| self.define_from_variant("CICE_ACCESS3", "access3"), | ||
| ] | ||
|
|
||
| return args | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Copyright Spack Project Developers. See COPYRIGHT file for details. | ||
| # | ||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
|
||
| from spack.package import * | ||
|
|
||
|
|
||
| class AccessMom6(CMakePackage): | ||
| """The Modular Ocean Model (MOM) describes the numerical ocean models originating from NOAA/GFDL. | ||
| They are used to simulate ocean currents at both regional and global scales, | ||
| enabling scientists to answer fundamental questions about the role of the ocean in the dynamics of the global climate. | ||
| This package builds using the Access3Share common libraries for ACCESS 3 models.""" | ||
|
|
||
| homepage = "https://github.com/ACCESS-NRI/MOM6" | ||
| git = "https://github.com/ACCESS-NRI/MOM6.git" | ||
| submodules = True | ||
| maintainers("minghangli-uni", "harshula") | ||
|
|
||
| # see license file in https://github.com/ACCESS-NRI/MOM6/blob/e92c971084e185cfd3902f18072320b45d583a54/LICENSE.md | ||
| license("LGPL-3.0-only", checked_by="minghangli-uni") | ||
|
|
||
| variant("openmp", default=False, description="Enable OpenMP") | ||
| variant("asymmetric_mem", default=False, description="Use asymmetric memory in MOM6") | ||
| variant("access3", default=True, description="Building MOM6 library with Access3share") | ||
|
|
||
| depends_on("access3-share", when="+access3") | ||
|
|
||
| depends_on("[email protected]:", type="build") | ||
| depends_on("mpi") | ||
| depends_on("[email protected]:") | ||
anton-seaice marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| depends_on("[email protected]: precision=64 +large_file ~gfs_phys ~quad_precision") | ||
dougiesquire marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| depends_on("fms +openmp", when="+openmp") | ||
| depends_on("fms ~openmp", when="~openmp") | ||
harshula marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| def cmake_args(self): | ||
| args = [ | ||
| self.define_from_variant("MOM6_OPENMP", "openmp"), | ||
| self.define_from_variant("MOM6_ASYMMETRIC", "asymmetric_mem"), | ||
| self.define_from_variant("MOM6_ACCESS3", "access3"), | ||
| ] | ||
|
|
||
| return args | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Copyright Spack Project Developers. See COPYRIGHT file for details. | ||
| # | ||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
|
||
| from spack.package import * | ||
|
|
||
| class AccessWw3(CMakePackage): | ||
| """WAVEWATCH III® is a community wave modeling framework that includes the latest | ||
| scientific advancements in the field of wind-wave modeling and dynamics. | ||
| This package builds using the Access3Share common libraries for ACCESS 3 models.""" | ||
|
|
||
| homepage = "https://github.com/noaa-emc/ww3/" | ||
| git = "https://github.com/ACCESS-NRI/WW3" | ||
| maintainers("anton-seaice", "harshula") | ||
| license("LGPL-3.0-only", checked_by="anton-seaice") | ||
|
|
||
| variant("openmp", default=False, description="Enable OpenMP") | ||
| variant("access3", default=True, description="Install CICE as library for Access3 models") | ||
|
|
||
| depends_on("access3-share", when="+access3") | ||
| depends_on("[email protected]:", type="build") | ||
| depends_on("mpi") | ||
| depends_on("[email protected]:") | ||
anton-seaice marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| def cmake_args(self): | ||
| args = [ | ||
| self.define_from_variant("WW3_OPENMP", "openmp"), | ||
| self.define_from_variant("WW3_ACCESS3", "access3"), | ||
| ] | ||
|
|
||
| return args | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Copyright Spack Project Developers. See COPYRIGHT file for details. | ||
| # | ||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
|
||
| from spack.package import * | ||
|
|
||
|
|
||
| class Access3Share(CMakePackage): | ||
| """Shared coupler/mediator libraries used by the ACCESS version 3 climate models. This | ||
| package includes the Community Mediator for Earth Prediction Systems (CMEPS) and Community | ||
| Data models for Earth Prediction Systems (CDEPS) as used in ACCESS-OM3 (and the future | ||
| ACCESS-CM3 and ACCESS-ESM3 etc). See Access3 package to produce executable programs.""" | ||
|
|
||
| homepage = "https://github.com/ACCESS-NRI/access3-share" | ||
| git = "https://github.com/ACCESS-NRI/access3-share" | ||
| submodules = True | ||
| maintainers("anton-seaice", "harshula", "micaeljtoliveira") | ||
|
|
||
| license("Apache-2.0", checked_by="anton-seaice") | ||
|
|
||
| variant("openmp", default=False, description="Enable OpenMP") | ||
|
|
||
| depends_on("[email protected]:", type="build") | ||
| depends_on("mpi") | ||
| depends_on("[email protected]:") | ||
anton-seaice marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| depends_on("[email protected]:") | ||
| depends_on("esmf fflags='-fp-model precise'", when="%intel") # for consistency with access-om3-nuopc builds, e.g. https://github.com/ACCESS-NRI/spack-packages/blob/e2bdb46e56af8ac14183e7ed25da9235486c973a/packages/access-om3-nuopc/package.py#L58 | ||
anton-seaice marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| depends_on("[email protected]:") | ||
|
|
||
| depends_on("[email protected]:") | ||
| depends_on(("parallelio " | ||
| "fflags='-qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model precise' " | ||
| "cflags='-qno-opt-dynamic-align -fp-model precise -std=gnu99'"), | ||
| when="%intel") # consistency with access-om3-nuopc builds, e.g. https://github.com/ACCESS-NRI/spack-packages/blob/e2bdb46e56af8ac14183e7ed25da9235486c973a/packages/access-om3-nuopc/package.py#L65 | ||
anton-seaice marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| def cmake_args(self): | ||
| args = [ | ||
| self.define("ACCESS3_LIB_INSTALL", True), | ||
| self.define_from_variant("OPENMP", "openmp"), | ||
| ] | ||
|
|
||
| return args | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Copyright Spack Project Developers. See COPYRIGHT file for details. | ||
| # | ||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
|
||
| from spack.package import * | ||
|
|
||
| # supported model configurations | ||
| KNOWN_CONF = ( | ||
| "MOM6", | ||
| "CICE6", | ||
| "WW3", | ||
| "MOM6-WW3", | ||
| "MOM6-CICE6", | ||
| "CICE6-WW3", | ||
| "MOM6-CICE6-WW3", | ||
| ) | ||
|
|
||
| class Access3(CMakePackage): | ||
| """Executable build for ACCESS version 3 climate models. The exectuable is | ||
| defined in Community Mediator for Earth Prediction Systems (CMEPS). Currently | ||
| implemented for ACCESS-OM3, and in the future may support ACCESS-CM3 and | ||
| ACCESS-ESM3. This is a companion package to Access3Share which builds the | ||
| shared libraries.""" | ||
|
|
||
| homepage = "https://github.com/ACCESS-NRI/access3-share" | ||
| git = "https://github.com/ACCESS-NRI/access3-share" | ||
| submodules = True | ||
| maintainers("anton-seaice", "harshula", "micaeljtoliveira") | ||
| license("Apache-2.0", checked_by="anton-seaice") | ||
|
|
||
| variant( | ||
| "configurations", | ||
| values=(*KNOWN_CONF, 'none'), | ||
| default='none', | ||
| multi=True, | ||
| description=( | ||
| "ACCESS-OM3 configurations to build. When a model component " | ||
| "is not included in a configuration, that component is replaced by " | ||
| "a CDEPS data component." | ||
| ), | ||
| sticky=True # force concretizer to not pick alternative variants | ||
| ) | ||
|
|
||
| # force user to supply a build combination | ||
| conflicts( | ||
| "configurations=none", | ||
| msg=f"A configurations variant must be set, can be one or many of {KNOWN_CONF}" | ||
| ) | ||
dougiesquire marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| depends_on("[email protected]:", type="build") | ||
| depends_on("mpi") | ||
| depends_on("access3-share") | ||
| depends_on("[email protected]:") | ||
|
|
||
| for conf in KNOWN_CONF: | ||
| if "CICE6" in conf: | ||
| depends_on("access-cice+access3", when=f"configurations={conf}") | ||
| if "MOM6" in conf: | ||
| depends_on("access-mom6+access3", when=f"configurations={conf}") | ||
| if "WW3" in conf: | ||
| depends_on("access-ww3+access3", when=f"configurations={conf}") | ||
harshula marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| def cmake_args(self): | ||
|
|
||
| # make configurations a cmake argument | ||
| buildConf = ";".join(self.spec.variants["configurations"].value) | ||
|
|
||
| args = [ | ||
| self.define("BuildConfigurations", buildConf), | ||
anton-seaice marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| self.define("ACCESS3_LIB_INSTALL", False), | ||
| ] | ||
|
|
||
| return args | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.