Skip to content

Commit

Permalink
Renamed access-om3 -> access-om3-nuopc, access-om3-virtual -> access-…
Browse files Browse the repository at this point in the history
…om3 (#94)
  • Loading branch information
CodeGat authored Apr 17, 2024
1 parent bf234d9 commit 55545d6
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 114 deletions.
98 changes: 98 additions & 0 deletions packages/access-om3-nuopc/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import CMakePackage, variant, version


class AccessOm3Nuopc(CMakePackage):
"""ACCESS-OM3 global ocean-sea ice-wave coupled model."""

homepage = "https://www.github.com/COSIMA/access-om3"
git = "https://github.com/COSIMA/access-om3.git"

maintainers = ["micaeljtoliveira", "aekiss"]

version("main", branch="main", submodules=True)

variant(
"build_type",
default="Release",
description="The build type to build",
values=("Debug", "Release"),
)
variant(
"configurations",
default="MOM6-CICE6, CICE6-WW3, MOM6-CICE6-WW3",
values=(
"MOM6",
"CICE6",
"WW3",
"MOM6-WW3",
"MOM6-CICE6",
"CICE6-WW3",
"MOM6-CICE6-WW3",
),
multi=True,
description="ACCESS-OM3 configurations to build",
)
variant(
"install_libraries",
default=False,
description="Install component libraries"
)
variant("openmp", default=False, description="Enable OpenMP")
variant("mom_symmetric", default=False, description="Use symmetric memory in MOM6")
variant(
"cice_io",
default="PIO",
description="CICE IO option",
values=("NectCDF", "PIO", "Binary"),
multi=False,
)

depends_on("[email protected]:", type="build")
depends_on("mpi")
depends_on("[email protected]:")
depends_on("[email protected]:")
depends_on("[email protected]:")
depends_on("[email protected]:")
depends_on("[email protected]:")

flag_handler = CMakePackage.build_system_flags

def cmake_args(self):
args = [
self.define_from_variant("OM3_MOM_SYMMETRIC", "mom_symmetric"),
self.define_from_variant("OM3_LIB_INSTALL", "install_libraries"),
self.define_from_variant("OM3_OPENMP", "openmp"),
self.define(
"OM3_ENABLE_MOM6", "configurations=MOM6" in self.spec
),
self.define(
"OM3_ENABLE_CICE6", "configurations=CICE6" in self.spec
),
self.define(
"OM3_ENABLE_WW3", "configurations=WW3" in self.spec
),
self.define(
"OM3_ENABLE_MOM6-WW3", "configurations=MOM6-WW3" in self.spec
),
self.define(
"OM3_ENABLE_MOM6-CICE6", "configurations=MOM6-CICE6" in self.spec
),
self.define(
"OM3_ENABLE_CICE6-WW3", "configurations=CICE6-WW3" in self.spec
),
self.define(
"OM3_ENABLE_MOM6-CICE6-WW3",
"configurations=MOM6-CICE6-WW3" in self.spec
),
]

args.append(self.define("CMAKE_C_COMPILER", self.spec["mpi"].mpicc))
args.append(self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx))
args.append(self.define("CMAKE_Fortran_COMPILER", self.spec["mpi"].mpifc))

return args
28 changes: 0 additions & 28 deletions packages/access-om3-virtual/package.py

This file was deleted.

102 changes: 16 additions & 86 deletions packages/access-om3/package.py
Original file line number Diff line number Diff line change
@@ -1,98 +1,28 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# Copyright 2024 ACCESS-NRI
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import CMakePackage, variant


class AccessOm3(CMakePackage):
"""ACCESS-OM3 global ocean-sea ice-wave coupled model."""

homepage = "https://www.github.com/COSIMA/access-om3"
git = "https://github.com/COSIMA/access-om3.git"
from spack.package import BundlePackage, version, depends_on

maintainers = ["micaeljtoliveira", "aekiss"]

version("main", branch="main", submodules=True)
class AccessOm3(BundlePackage):
"""
ACCESS-OM3 bundle containing the ACCESS-OM3 Package.
variant(
"build_type",
default="Release",
description="The build type to build",
values=("Debug", "Release"),
)
variant(
"configurations",
default="MOM6-CICE6, CICE6-WW3, MOM6-CICE6-WW3",
values=(
"MOM6",
"CICE6",
"WW3",
"MOM6-WW3",
"MOM6-CICE6",
"CICE6-WW3",
"MOM6-CICE6-WW3",
),
multi=True,
description="ACCESS-OM3 configurations to build",
)
variant(
"install_libraries",
default=False,
description="Install component libraries"
)
variant("openmp", default=False, description="Enable OpenMP")
variant("mom_symmetric", default=False, description="Use symmetric memory in MOM6")
variant(
"cice_io",
default="PIO",
description="CICE IO option",
values=("NectCDF", "PIO", "Binary"),
multi=False,
)
This is used to version the entirety of a released deployment, including
the package, it's dependencies, and the version of
spack-packages/spack-config that it is bundled with
"""

depends_on("[email protected]:", type="build")
depends_on("mpi")
depends_on("[email protected]:")
depends_on("[email protected]:")
depends_on("[email protected]:")
depends_on("[email protected]:")
depends_on("[email protected]:")
homepage = "https://www.access-nri.org.au"

flag_handler = CMakePackage.build_system_flags
git = "https://github.com/ACCESS-NRI/ACCESS-OM3.git"

def cmake_args(self):
args = [
self.define_from_variant("OM3_MOM_SYMMETRIC", "mom_symmetric"),
self.define_from_variant("OM3_LIB_INSTALL", "install_libraries"),
self.define_from_variant("OM3_OPENMP", "openmp"),
self.define(
"OM3_ENABLE_MOM6", "configurations=MOM6" in self.spec
),
self.define(
"OM3_ENABLE_CICE6", "configurations=CICE6" in self.spec
),
self.define(
"OM3_ENABLE_WW3", "configurations=WW3" in self.spec
),
self.define(
"OM3_ENABLE_MOM6-WW3", "configurations=MOM6-WW3" in self.spec
),
self.define(
"OM3_ENABLE_MOM6-CICE6", "configurations=MOM6-CICE6" in self.spec
),
self.define(
"OM3_ENABLE_CICE6-WW3", "configurations=CICE6-WW3" in self.spec
),
self.define(
"OM3_ENABLE_MOM6-CICE6-WW3",
"configurations=MOM6-CICE6-WW3" in self.spec
),
]
maintainers = ["harshula"]

args.append(self.define("CMAKE_C_COMPILER", self.spec["mpi"].mpicc))
args.append(self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx))
args.append(self.define("CMAKE_Fortran_COMPILER", self.spec["mpi"].mpifc))
version("latest")

return args
depends_on("access-om3-cmake")

0 comments on commit 55545d6

Please sign in to comment.