From 1939921ac97e9f23b6fa944036f62eec3e0464a1 Mon Sep 17 00:00:00 2001 From: Ryan Honeyager Date: Mon, 21 Aug 2023 10:51:22 -0400 Subject: [PATCH 1/7] Add fv3-jedi for Skylab v5. --- .../repos/builtin/packages/crtm/package.py | 22 +++++ .../CMakeLists.txt.patch | 11 +++ .../GFDL_atmos_cubed_sphere/package.py | 30 +++++++ .../packages/femps/CMakeLists.txt.patch | 12 +++ .../repos/jcsda-emc/packages/femps/package.py | 31 +++++++ .../femps/src.femps.CMakeLists.txt.patch | 16 ++++ .../fv3-jedi-linearmodel/CMakeLists.txt.patch | 11 +++ .../packages/fv3-jedi-linearmodel/package.py | 73 +++++++++++++++ .../src.CMakeLists.txt.patch | 16 ++++ .../packages/fv3-jedi/CMakeLists.txt.patch | 11 +++ .../cmake.fv3jedi_extra_macros.cmake.patch | 27 ++++++ .../jcsda-emc/packages/fv3-jedi/package.py | 90 +++++++++++++++++++ .../fv3-jedi/test.CMakeLists.txt.patch | 12 +++ .../repos/jcsda-emc/packages/gsw/package.py | 22 +++++ .../repos/jcsda-emc/packages/ioda/package.py | 48 ++++++++++ .../repos/jcsda-emc/packages/oops/package.py | 56 ++++++++++++ .../packages/saber/CMakeLists.txt.patch | 11 +++ .../repos/jcsda-emc/packages/saber/package.py | 66 ++++++++++++++ .../packages/saber/quench.src.Fields.cc.patch | 12 +++ .../saber/saber-import.cmake.in.patch | 23 +++++ .../repos/jcsda-emc/packages/ufo/package.py | 71 +++++++++++++++ .../repos/jcsda-emc/packages/vader/package.py | 28 ++++++ 22 files changed, 699 insertions(+) create mode 100644 var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/CMakeLists.txt.patch create mode 100644 var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/femps/CMakeLists.txt.patch create mode 100644 var/spack/repos/jcsda-emc/packages/femps/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/femps/src.femps.CMakeLists.txt.patch create mode 100644 var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/CMakeLists.txt.patch create mode 100644 var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/src.CMakeLists.txt.patch create mode 100644 var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch create mode 100644 var/spack/repos/jcsda-emc/packages/fv3-jedi/cmake.fv3jedi_extra_macros.cmake.patch create mode 100644 var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/fv3-jedi/test.CMakeLists.txt.patch create mode 100644 var/spack/repos/jcsda-emc/packages/gsw/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/ioda/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/oops/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/saber/CMakeLists.txt.patch create mode 100644 var/spack/repos/jcsda-emc/packages/saber/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/saber/quench.src.Fields.cc.patch create mode 100644 var/spack/repos/jcsda-emc/packages/saber/saber-import.cmake.in.patch create mode 100644 var/spack/repos/jcsda-emc/packages/ufo/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/vader/package.py diff --git a/var/spack/repos/builtin/packages/crtm/package.py b/var/spack/repos/builtin/packages/crtm/package.py index 3b49598716683e..671521885e202b 100644 --- a/var/spack/repos/builtin/packages/crtm/package.py +++ b/var/spack/repos/builtin/packages/crtm/package.py @@ -42,6 +42,8 @@ class Crtm(CMakePackage): depends_on("netcdf-fortran", when="@v2.4-jedi.2") depends_on("netcdf-fortran", when="@v2.4.1-jedi") depends_on("netcdf-fortran", when="@v3.0.0-rc.1") + depends_on("netcdf-fortran", when="@v3.0.0-skylabv5") + depends_on("netcdf-fortran", when="@v3.0.0-skylabv5-1") depends_on("crtm-fix@2.3.0_emc", when="@2.3.0 +fix") depends_on("crtm-fix@2.4.0_emc", when="@2.4.0 +fix") @@ -51,8 +53,28 @@ class Crtm(CMakePackage): depends_on("ecbuild", type=("build"), when="@v2.4-jedi.2") depends_on("ecbuild", type=("build"), when="@v2.4.1-jedi") depends_on("ecbuild", type=("build"), when="@v3.0.0-rc.1") + depends_on("ecbuild", type=("build"), when="@v3.0.0-skylabv5") + depends_on("ecbuild", type=("build"), when="@v3.0.0-skylabv5-1") + # Slightly after the Skylab 5 release to fix https://github.com/JCSDA/CRTMv3/pull/48. + # TODO: Push for a distinct tag in the CRTMv3 repository. + # Spack gets confused by the different repository url, so we use direct URLs here. + version("v3.0.0-skylabv5-1", url="https://www.github.com/JCSDA/crtmv3/tarball/d15810f5538d4cf041e94ebfbb41b403d82bed13", + sha256="fa0f050ae29d3d7d71da4b97c5dfd74ad90c98c3645fd35340efa1410cf76cf3") + + # The official release for Skylab 5, but it's buggy. See https://github.com/JCSDA/CRTMv3/pull/48. + version("v3.0.0-skylabv5", url="https://www.github.com/JCSDA/crtmv3/tarball/74cdc9428f56a11ce0dcd3ac7ddff00097b7b61c", + sha256="033abf0dde10b29043f3cde8c4b4285a32e5886599d174ab83ef6f5a2132e3d6") + + version("v2.4.1-jedi.1", sha256="94ff24051382d544c2e200a937bfe7d2047f6393a3e22f64284d5dc70e791ca6") version("v2.4.1-jedi", sha256="fd8bf4db4f2a3b420b4186de84483ba2a36660519dffcb1e0ff14bfe8c6f6a14") + + # Both of these have big binary file blobs + # Corrects polarization angle biases for NOAA-21 and fixes WMO satellite and sensor ids. + version("v2.4.0_emc.2", commit="50fde6ae9caeaca3f5c8c3a39aca7e594eab451a") + # Adds new NOAA-21 and ancillary files for VIIRS. + version("v2.4.0_emc.1", commit="eaf322287691d5d204167e1a929117ba6b9c2e23") + # REL-2.4.0_emc (v2.4.0 ecbuild does not work) version("2.4.0", commit="5ddd0d6") # Uses the tip of REL-2.3.0_emc branch diff --git a/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/CMakeLists.txt.patch new file mode 100644 index 00000000000000..fe3338435314a6 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/CMakeLists.txt.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,8 @@ + + cmake_minimum_required( VERSION 3.3.2 FATAL_ERROR ) + ++find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild) ++ + project( fv3 VERSION 1.2.0 LANGUAGES C CXX Fortran ) + + set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH} ) diff --git a/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/package.py b/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/package.py new file mode 100644 index 00000000000000..9232a50fc114f8 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/package.py @@ -0,0 +1,30 @@ +# 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 * + + +class GfdlAtmosCubedSphere(CMakePackage): + """The GFDL atmos_cubed_sphere dynamical core code""" + + homepage = "https://github.com/JCSDA/GFDL_atmos_cubed_sphere" + git = "https://github.com/JCSDA/GFDL_atmos_cubed_sphere.git" + + maintainers = ['climbfuji'] + + version('1.2.0.jcsda', commit='61450b4e3e80bb96b26c5f3808ce60b5e5cb4207') + + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') + depends_on('fms@release-jcsda') + depends_on('jedi-cmake', type=('build')) + depends_on('llvm-openmp', when='%apple-clang', type=('build', 'run')) + depends_on('mpi') + depends_on('netcdf-c') + depends_on('netcdf-fortran') + + # find_package(ecbuild REQUIRED) is needed when using ecbuild. + patch('CMakeLists.txt.patch', when='@1.2.0.jcsda') + diff --git a/var/spack/repos/jcsda-emc/packages/femps/CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/femps/CMakeLists.txt.patch new file mode 100644 index 00000000000000..afc0ea1c4ad6a6 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/femps/CMakeLists.txt.patch @@ -0,0 +1,12 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,6 +4,8 @@ + + cmake_minimum_required( VERSION 3.3.2 FATAL_ERROR ) + ++find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild) ++ + project( femps VERSION 1.2.0 LANGUAGES Fortran ) + + set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}) + diff --git a/var/spack/repos/jcsda-emc/packages/femps/package.py b/var/spack/repos/jcsda-emc/packages/femps/package.py new file mode 100644 index 00000000000000..0850cd89e69b0b --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/femps/package.py @@ -0,0 +1,31 @@ +# 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 * + + +class Femps(CMakePackage): + """Finite Element Mesh Poisson Solver""" + + homepage = "https://github.com/JCSDA/femps" + git = "https://github.com/JCSDA/femps.git" + + maintainers = ["climbfuji"] + + version('1.2.0', commit='a22e458c1742695479db9011ddb6bcbf31de39fe') + + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') + depends_on('jedi-cmake', type=('build')) + depends_on('llvm-openmp', when='%apple-clang', type=('build', 'run')) + depends_on('mpi') + depends_on('netcdf-c') + depends_on('netcdf-fortran') + + # find_package(ecbuild REQUIRED) is needed when using ecbuild. + patch('CMakeLists.txt.patch', when='@1.2.0') + # femps needs to install its Fortran modules. + patch('src.femps.CMakeLists.txt.patch', when='@1.2.0') + diff --git a/var/spack/repos/jcsda-emc/packages/femps/src.femps.CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/femps/src.femps.CMakeLists.txt.patch new file mode 100644 index 00000000000000..6583fe354636e2 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/femps/src.femps.CMakeLists.txt.patch @@ -0,0 +1,16 @@ +--- a/src/femps/CMakeLists.txt ++++ b/src/femps/CMakeLists.txt +@@ -25,3 +25,12 @@ ecbuild_add_library( TARGET femps + + target_include_directories( femps INTERFACE $ + $) ++ ++# Fortran module output directory for build and install interfaces ++set( MODULE_DIR module/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}/${CMAKE_Fortran_COMPILER_VERSION} ) ++set_target_properties( ${PROJECT_NAME} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/${MODULE_DIR} ) ++install( DIRECTORY ${CMAKE_BINARY_DIR}/${MODULE_DIR}/ DESTINATION ${MODULE_DIR} ) ++target_include_directories( femps INTERFACE ++ $ ++ $ ) ++ + diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/CMakeLists.txt.patch new file mode 100644 index 00000000000000..af2f36f966b905 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/CMakeLists.txt.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,8 @@ + + cmake_minimum_required( VERSION 3.3.2 FATAL_ERROR ) + ++find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild) ++ + project( fv3jedilm VERSION 1.2.0 LANGUAGES Fortran C ) + + set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH} ) diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py new file mode 100644 index 00000000000000..6ccd76f6a8c21c --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py @@ -0,0 +1,73 @@ +# 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 * + + +class Fv3JediLinearmodel(CMakePackage): + """Tangent linear and adjoint versions of FV3 dynamical core and GEOS physics""" + + homepage = "https://github.com/JCSDA/fv3-jedi-linearmodel" + git = "https://github.com/JCSDA/fv3-jedi-linearmodel.git" + + maintainers = ["climbfuji"] + + version('1.2.0', commit='d47cea97c659e8a11e9e64c23092bef06227ebde') + version('develop', branch='develop', no_cache=True) + + variant( + "forecast_model", + default="FV3CORE", + description="fv3 forecast model", + values=("FV3CORE", "GEOS", "UFS"), + ) + # Note that the options for mkl, mpi, and openmp are lazily written in fv3-jedi-linearmodel. + # These options just turn on a find_package call. If a package is already found, for example by + # one of the package dependencies, then that component is silently used even if the user toggles + # it off. This is a bug and should be fixed eventually. + variant('mkl', default=False, description='Use MKL for LAPACK implementation (if available)') + variant('mpi', default=True, description='Support for MPI distributed parallelism') + variant('openmp', default=True, description='Build with OpenMP support') + + conflicts('forecast_model=GEOS', msg='FV3-JEDI-LINEARMODEL: GEOS to be implemented.') + conflicts('forecast_model=UFS', msg='FV3-JEDI-LINEARMODEL: UFS to be implemented.') + + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') + depends_on('fms@release-jcsda', when='forecast_model=FV3CORE') + depends_on('fms@release-jcsda', when='forecast_model=UFS') + depends_on('jedi-cmake', type=('build')) + depends_on('lapack', when='~mkl') + depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) + depends_on('mkl', when='+mkl') + depends_on('mpi', when='+mpi') + depends_on('netcdf-fortran') + depends_on('netcdf-c~mpi', when='~mpi') + depends_on('netcdf-c+mpi', when='+mpi') + + # Future: GEOS needs + # - MAPL (underway at GMAO) + # - GEOSgcm + # - fms r8 or r4 + + # Future: UFS needs + # - stochastic_physics + # - ccpp + # - ccppphys + # - fv3atm + # - ufs + # - FMS::fms_r8 + + def cmake_args(self): + res = [ + self.define_from_variant('FV3_FORECAST_MODEL', 'forecast_model') + ] + return res + + # find_package(ecbuild REQUIRED) is needed when using ecbuild. + patch('CMakeLists.txt.patch', when='@1.2.0') + # fv3-jedi-linearmodel needs to install its Fortran modules. + patch('src.CMakeLists.txt.patch', when='@1.2.0') + diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/src.CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/src.CMakeLists.txt.patch new file mode 100644 index 00000000000000..993f8bbd234500 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/src.CMakeLists.txt.patch @@ -0,0 +1,16 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -36,3 +37,12 @@ target_include_directories( fv3jedilm INTERFACE $:-fallow-argument-mismatch>) + endif() ++ ++# Fortran module output directory for build and install interfaces ++set( MODULE_DIR module/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}/${CMAKE_Fortran_COMPILER_VERSION} ) ++set_target_properties( ${PROJECT_NAME} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/${MODULE_DIR} ) ++install( DIRECTORY ${CMAKE_BINARY_DIR}/${MODULE_DIR}/ DESTINATION ${MODULE_DIR} ) ++target_include_directories( fv3jedilm INTERFACE ++ $ ++ $ ) ++ + diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch new file mode 100644 index 00000000000000..f417b1b7ed1351 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,8 @@ + + cmake_minimum_required( VERSION 3.3.2 FATAL_ERROR ) + ++find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild) ++ + project( fv3jedi VERSION 1.6.0 LANGUAGES C CXX Fortran ) + + option(OPENMP "Build fv3-jedi with OpenMP support" ON) diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/cmake.fv3jedi_extra_macros.cmake.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi/cmake.fv3jedi_extra_macros.cmake.patch new file mode 100644 index 00000000000000..a92351c7a0fbbf --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/cmake.fv3jedi_extra_macros.cmake.patch @@ -0,0 +1,27 @@ +--- a/cmake/fv3jedi_extra_macros.cmake ++++ b/cmake/fv3jedi_extra_macros.cmake +@@ -21,6 +21,24 @@ macro( LINK_FILES_DIR filelist dst_dir ) + endforeach(FILENAME) + endmacro() + ++# macro to create a symlink from src to dst ++function(CREATE_SYMLINK src dst) ++ foreach (FILENAME ${ARGN}) ++ execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ++ ${src}/${FILENAME} ++ ${dst}/${FILENAME} ) ++ endforeach(FILENAME) ++endfunction(CREATE_SYMLINK) ++ ++# macro to create a symlink from src to dst with just filename ++function(CREATE_SYMLINK_FILENAME src dst) ++ foreach (FILENAME ${ARGN}) ++ get_filename_component(filename ${FILENAME} NAME ) ++ execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ++ ${src}/${FILENAME} ++ ${dst}/${filename} ) ++ endforeach(FILENAME) ++endfunction(CREATE_SYMLINK_FILENAME) + + # Macro to include GFS restart files in testing + macro( GFS_FILES_BKG path date ) diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py new file mode 100644 index 00000000000000..a632fc8cc63fe9 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py @@ -0,0 +1,90 @@ +# 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 * + + +class Fv3Jedi(CMakePackage): + """Interface between JEDI and FV3 based models""" + + homepage = "https://github.com/JCSDA/fv3-jedi" + git = "https://github.com/JCSDA/fv3-jedi.git" + + maintainers = ["climbfuji"] + + version('develop', branch='develop', no_cache=True) + version('1.6.0', commit='3c20ebd2657d4b8df35103207a1e83535b67469c') + + variant( + "forecast_model", + default="FV3CORE", + description="fv3 forecast model", + values=("FV3CORE", "GEOS", "UFS"), + ) + variant('geos-aero', default=False, description='Enable usage of geos-aero') + variant('gsibec', default=True, description='FV3-SABER block GSI') + # Note that the option for openmp is lazily written in fv3-jedi. + # It just enables a find_package call. If a package is already found, for example by + # one of the package dependencies, then that component is silently used even if the user toggles + # it off. This is a bug and should be fixed eventually. + variant('openmp', default=True, description='Build with OpenMP support') + variant('ropp', default=False, description='Enable usage of ropp') + variant('sp', default=True, description='Enable usage of ncep-sp') + + conflicts('forecast_model=GEOS', msg='FV3-JEDI: GEOS to be implemented.') + conflicts('forecast_model=UFS', msg='FV3-JEDI: UFS to be implemented.') + conflicts('+geos-aero', msg='FV3-JEDI: geos-aero to be implemented.') + # Note: the ropp code needs a JCSDA-internal repository. + conflicts('+ropp', msg='FV3-JEDI: ropp to be implemented.') + + # Required components + depends_on('crtm') + depends_on('crtm@2.2.3:', when='@:1.5.0') + #depends_on('crtm@v3.0.0-skylabv5-1', when='@1.6.0') + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.6.0') + depends_on('ecmwf-atlas') + depends_on('ecmwf-atlas@0.33.0', when='@1.6.0') + depends_on('femps@1.0.0:') + depends_on('fv3-jedi-linearmodel@1.0.0:') + depends_on('jedi-cmake', type=('build')) + depends_on('mpi') + # fv3-jedi depends on netcdf-fortran, which always depends on netcdf-c. However, netcdf-c + # has the mpi options, and netcdf-fortran does not. + depends_on('netcdf-fortran') + depends_on('netcdf-c+mpi') + depends_on('oops') + depends_on('oops@1.7.0', when='@1.6.0') + depends_on('saber') + depends_on('saber@1.7.0', when='@1.6.0') + depends_on('ufo') + depends_on('ufo@1.7.0', when='@1.6.0') + depends_on('vader') + depends_on('vader@1.4.0', when='@1.6.0') + + depends_on('fms', when='forecast_model=FV3CORE') + + # Optional components + depends_on('GFDL_atmos_cubed_sphere', when='forecast_model=FV3CORE') + depends_on('gsibec', when='+gsibec') + depends_on('gsibec@1.1.2:', when='@1.6.0 +gsibec') + depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) + depends_on('sp', when='+sp') + + def cmake_args(self): + res = [ + self.define_from_variant('FV3_FORECAST_MODEL', 'forecast_model'), + self.define_from_variant('OPENMP', 'openmp') + ] + return res + + # find_package(ecbuild REQUIRED) is needed when using ecbuild. + patch('CMakeLists.txt.patch', when='@1.6.0') + # fv3-jedi is improperly including git_functions.cmake by searching for an environment variable. + # It should instead use the jedicmake_FUNCTIONS variable, which is deliberately exported by jedi-cmake. + patch('test.CMakeLists.txt.patch', when='@1.6.0') + # fv3-jedi depends on these macros that are defined (and not exported) in ufo. + patch('cmake.fv3jedi_extra_macros.cmake.patch', when='@1.6.0') + diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/test.CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi/test.CMakeLists.txt.patch new file mode 100644 index 00000000000000..74b97f6efa5301 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/test.CMakeLists.txt.patch @@ -0,0 +1,12 @@ +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -6,6 +6,8 @@ + # Use external jedi-cmake or bundle build + if(DEFINED ENV{jedi_cmake_ROOT}) + include( $ENV{jedi_cmake_ROOT}/share/jedicmake/Functions/git_functions.cmake ) ++elseif(jedicmake_FOUND) ++ include( ${jedicmake_FUNCTIONS}/git_functions.cmake ) + else() + include( ${CMAKE_SOURCE_DIR}/jedicmake/cmake/Functions/git_functions.cmake ) + endif() + diff --git a/var/spack/repos/jcsda-emc/packages/gsw/package.py b/var/spack/repos/jcsda-emc/packages/gsw/package.py new file mode 100644 index 00000000000000..4c46f37a364a13 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/gsw/package.py @@ -0,0 +1,22 @@ +# 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 * + + +class Gsw(CMakePackage): + """Gibbs-SeaWater (GSW) Oceanographic Toolbox in Fortran""" + + homepage = "https://github.com/JCSDA/GSW-fortran" + git = "https://github.com/JCSDA/GSW-fortran.git" + + maintainers = ["climbfuji"] + + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@3.0.7:') + + version('3.0.7', commit='1a02ebaf6f7a4e9f2c2d2dd973fb050e697bcc74') + version('develop', branch='develop', no_cache=True) + diff --git a/var/spack/repos/jcsda-emc/packages/ioda/package.py b/var/spack/repos/jcsda-emc/packages/ioda/package.py new file mode 100644 index 00000000000000..aeec33a5ad2592 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/ioda/package.py @@ -0,0 +1,48 @@ +# 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 * + + +class Ioda(CMakePackage): + """Interface for Observation Data Access""" + + homepage = "https://github.com/JCSDA/ioda" + git = "https://github.com/JCSDA/ioda.git" + + maintainers = ["climbfuji"] + + version('2.6.0', commit='26abb62ca8d30cc7b84303c4d780f0f253b287c9') + version('develop', branch='develop', no_cache=True) + + # Let's always assume IODA_BUILD_LANGUAGE_FORTRAN=on. + #variant('fortran', default=True, description='Build the ioda Fortran interface') + variant('odc', default=True, description='Build ODC bindings') + # ioda has no explicit OpenMP calls, but header files from Eigen and oops do use openmp. + variant('openmp', default=True, description='Build with OpenMP support') + # Let's always BUILD_PYTHON_BINDINGS. + #variant('python', default=True, description='Build the ioda Python interface') + + depends_on('boost@1.64.0:') + depends_on('ecbuild', type=('build')) + depends_on('eckit') + depends_on('eckit@1.23.0', when='@2.6.0:') + depends_on('eigen') + depends_on('fckit') + depends_on('fckit@0.10.1', when='@2.6.0:') + depends_on('gsl-lite') + depends_on('hdf5@1.12.0: +mpi') + depends_on('hdf5@1.14.0: +mpi', when='@2.6.0:') + depends_on('jedi-cmake', type=('build')) + depends_on('mpi') + depends_on('odc', when='+odc') + depends_on('odc@1.0.2:', when='@2.6.0: +odc') + depends_on('oops+openmp', when='+openmp') + depends_on('oops~openmp', when='~openmp') + depends_on('oops@1.7.0', when='@2.6.0') + depends_on('python@3.7:') + depends_on('py-pybind11') + depends_on('udunits@2.2.0:') + diff --git a/var/spack/repos/jcsda-emc/packages/oops/package.py b/var/spack/repos/jcsda-emc/packages/oops/package.py new file mode 100644 index 00000000000000..a20b17a7f38dc3 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/oops/package.py @@ -0,0 +1,56 @@ +# 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 * + + +class Oops(CMakePackage): + """Object Oriented Prediction System""" + + homepage = "https://github.com/JCSDA/oops" + git = "https://github.com/JCSDA/oops.git" + + maintainers = ["climbfuji"] + + version('1.7.0', commit='2426c2040e9ae138c4bf8362cacca84d66bd64bf') + version('develop', branch='develop', no_cache=True) + + variant('l95', default=True, description='Build LORENZ95 toy model') + variant('mkl', default=False, description='Use MKL for LAPACK implementation (if available)') + variant('openmp', default=True, description='Build oops with OpenMP support') + variant('qg', default=True, description='Build QG toy model') + #variant('autoprofiling', default=False, description='Enable function-based autoprofiling with GPTL (if available)') + #variant('gptl', default=False, description='Use GPTL profiling library (if available)') + + depends_on('boost') + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0') + depends_on('eckit') + depends_on('eckit@1.23.0', when='@1.7.0') + depends_on('ecmwf-atlas') + depends_on('ecmwf-atlas@0.33.0', when='@1.7.0') + depends_on('eigen') + depends_on('fckit') + depends_on('fckit@0.10.1', when='@1.7.0') + #depends_on('gptl', when='+gptl') + depends_on('jedi-cmake', type=('build')) + depends_on('lapack', when='~mkl') + depends_on('mkl', when='+mkl') + depends_on('mpi') + depends_on('netcdf-c+mpi') + depends_on('netcdf-fortran') + depends_on('nlohmann-json') + depends_on('nlohmann-json-schema-validator') + depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) + + def cmake_args(self): + res = [ + self.define_from_variant('ENABLE_LORENZ95_MODEL', 'l95'), + self.define_from_variant('ENABLE_QG_MODEL', 'qg'), + self.define_from_variant('ENABLE_MKL', 'mkl'), + self.define_from_variant('OPENMP', 'openmp') + ] + return res + diff --git a/var/spack/repos/jcsda-emc/packages/saber/CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/saber/CMakeLists.txt.patch new file mode 100644 index 00000000000000..f9bc63ab639254 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/saber/CMakeLists.txt.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,7 +42,7 @@ find_package( atlas 0.33.0 REQUIRED COMPONENTS OMP_Fortran ) + if( ENABLE_MKL ) + find_package( MKL ) + endif() +-if( MKL_FOUND ) ++if( ENABLE_MKL AND MKL_FOUND ) + set( LAPACK_LIBRARIES ${MKL_LIBRARIES} ) + else() + find_package( LAPACK REQUIRED ) diff --git a/var/spack/repos/jcsda-emc/packages/saber/package.py b/var/spack/repos/jcsda-emc/packages/saber/package.py new file mode 100644 index 00000000000000..2af727620d591e --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/saber/package.py @@ -0,0 +1,66 @@ +# 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 * + + +class Saber(CMakePackage): + """System-Agnostic Background Error Representation""" + + homepage = "https://github.com/JCSDA/saber" + git = "https://github.com/JCSDA/saber.git" + + maintainers = ["climbfuji"] + + version('1.7.0', commit='d90ce5276b37552d569fcb72a22b5a30fb03de75') + version('develop', branch='develop', no_cache=True) + + variant('gsibec', default=True, description='Enable SABER block GSI') + variant('mkl', default=False, description='Use MKL for LAPACK implementation') + variant('oops', default=True, description='Use oops') + variant('openmp', default=True, description='Build with OpenMP support') + variant('vader', default=True, description='Build with vader support') + + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.4.0:') + depends_on('eckit') + depends_on('eckit@1.23.0', when='@1.7.0') + depends_on('ecmwf-atlas') + depends_on('ecmwf-atlas@0.33.0', when='@1.7.0') + depends_on('ecmwf-atlas+openmp', when='+openmp') + depends_on('ecmwf-atlas~openmp', when='~openmp') + depends_on('fckit') + depends_on('fckit@0.10.1', when='@1.7.0') + depends_on('gsibec', when='+gsibec') + depends_on('gsibec@1.1.2', when='@1.7.0 +gsibec') + depends_on('jedi-cmake', type=('build')) + depends_on('lapack', when='~mkl') + depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) + depends_on('mkl', when='+mkl') + depends_on('mpi') + depends_on('netcdf-c') + depends_on('netcdf-fortran') + depends_on('oops', when='+oops') + depends_on('oops+openmp', when='+oops +openmp') + depends_on('oops~openmp', when='+oops ~openmp') + depends_on('oops@1.7.0', when='@1.7.0 +oops') + depends_on('sp', when='+gsibec') + depends_on('vader', when='+vader') + depends_on('vader@1.4.0', when='@1.7.0 +vader') + + def cmake_args(self): + res = [ + self.define_from_variant('ENABLE_MKL', 'mkl'), + self.define_from_variant('OPENMP', 'openmp') + ] + return res + + # Lapack vs MKL bug. + patch('CMakeLists.txt.patch', when='@1.7.0') + # Another Lapack vs MKL bug. If ENABLE_MKL was off, then the saber-import.cmake file had a syntax error. + patch('saber-import.cmake.in.patch', when='@1.7.0') + # Fixed in develop. JCSDA/saber#22 / JCSDA-internal/saber#652. + patch('quench.src.Fields.cc.patch', when='@1.7.0') + diff --git a/var/spack/repos/jcsda-emc/packages/saber/quench.src.Fields.cc.patch b/var/spack/repos/jcsda-emc/packages/saber/quench.src.Fields.cc.patch new file mode 100644 index 00000000000000..d8b4740f521726 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/saber/quench.src.Fields.cc.patch @@ -0,0 +1,12 @@ +--- a/quench/src/Fields.cc ++++ b/quench/src/Fields.cc +@@ -35,7 +35,7 @@ + + #include "src/Geometry.h" + +-#include "saber/src/saber/interpolation/AtlasInterpWrapper.h" ++#include "saber/interpolation/AtlasInterpWrapper.h" + + #define ERR(e) {ABORT(nc_strerror(e));} + + diff --git a/var/spack/repos/jcsda-emc/packages/saber/saber-import.cmake.in.patch b/var/spack/repos/jcsda-emc/packages/saber/saber-import.cmake.in.patch new file mode 100644 index 00000000000000..73c28eac3f3ce5 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/saber/saber-import.cmake.in.patch @@ -0,0 +1,23 @@ +--- a/saber-import.cmake.in ++++ b/saber-import.cmake.in +@@ -31,11 +31,17 @@ if(NOT atlas_FOUND) + find_package(atlas REQUIRED COMPONENTS OMP_Fortran) + endif() + +-if((@LAPACK_FOUND@ AND NOT LAPACK_FOUND) OR (@MKL_FOUND@ AND NOT MKL_FOUND)) +- if( @MKL_FOUND@ ) ++if(@ENABLE_MKL@) # ENABLE_MKL ++ if (@MKL_FOUND@ AND NOT MKL_FOUND) # MKL_FOUND checks + find_dependency( MKL REQUIRED ) + set( LAPACK_LIBRARIES ${MKL_LIBRARIES} ) + else() ++ if (NOT LAPACK_FOUND) ++ find_dependency( LAPACK REQUIRED ) ++ endif() ++ endif() ++else() ++ if (NOT LAPACK_FOUND) + find_dependency( LAPACK REQUIRED ) + endif() + endif() + diff --git a/var/spack/repos/jcsda-emc/packages/ufo/package.py b/var/spack/repos/jcsda-emc/packages/ufo/package.py new file mode 100644 index 00000000000000..395ed4864389ef --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/ufo/package.py @@ -0,0 +1,71 @@ +# 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 * + + +class Ufo(CMakePackage): + """Unified Forward Operator""" + + homepage = "https://github.com/JCSDA/ufo" + git = "https://github.com/JCSDA/ufo.git" + + maintainers = ["climbfuji"] + + version('1.7.0', commit='1d745701806bd2a3f3d194c9de87ea7ca0a4c2ab') + version('develop', branch='develop', no_cache=True) + + variant('crtm', default=True, description='Build CRTM operator') + # JCSDA-internal repository needed. + variant('geos-aero', default=False, description='Build GEOS-AERO AOD operator') + variant('gsw', default=True, description='Build marine observation operators') + # JCSDA-internal repository is public, but there is no "release" of the code yet. + variant('oasim', default=False, description='Build with Ocean Atmosphere Spectral Irradiance Model') + # JCSDA-internal repository needed. + variant('ropp', default=False, description='Build ROPP operator') + # JCSDA-internal repository needed. + variant('rttov', default=False, description='Build RTTOV operator') + + conflicts('+geos-aero', msg='UFO: GEOS-AERO to be implemented.') + conflicts('+oasim', msg='UFO: OASIM to be implemented.') + conflicts('+ropp', msg='UFO: ROPP to be implemented.') + conflicts('+rttov', msg='UFO: RTTOV to be implemented.') + + depends_on('boost') + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') + depends_on('eckit') + depends_on('eckit@1.23.0', when='@1.7.0') + depends_on('eigen') + depends_on('fckit') + depends_on('fckit@0.10.1', when='@1.7.0') + depends_on('gsl-lite') + depends_on('ioda') + depends_on('ioda@2.6.0', when='@1.7.0') + depends_on('jedi-cmake', type=('build')) + depends_on('mpi') + depends_on('netcdf-c+mpi') + depends_on('netcdf-fortran') + depends_on('oops') + depends_on('oops@1.7.0', when='@1.7.0') + + depends_on('crtm', when='+crtm') + depends_on('crtm@v3.0.0-skylabv5-1', when='@1.7.0 +crtm') + + #depends_on('geos-aero', when='+geos-aero') + #depends_on('geos-aero@0.0.0', when='@1.7.0 +geos-aero') + + #depends_on('oasim', when='+oasim') + #depends_on('oasim@0.0.0', when='@1.7.0 +oasim') + + depends_on('gsw', when='+gsw') + depends_on('gsw@3.0.7', when='@1.7.0 +gsw') + + #depends_on('ropp', when='+ropp') + #depends_on('ropp@0.0.0', when='@1.7.0 +ropp') + + #depends_on('rttov', when='+rttov') + #depends_on('rttov@12.1.0', when='@1.7.0 +rttov') + diff --git a/var/spack/repos/jcsda-emc/packages/vader/package.py b/var/spack/repos/jcsda-emc/packages/vader/package.py new file mode 100644 index 00000000000000..1a2e5086b2cfd2 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/vader/package.py @@ -0,0 +1,28 @@ +# 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 * + + +class Vader(CMakePackage): + """The VAriable DErivation Repository""" + + homepage = "https://github.com/JCSDA/vader" + git = "https://github.com/JCSDA/vader.git" + + maintainers = ["climbfuji"] + + version('1.4.0', commit='4264b56111a62ab1339320ad85a7f715b923df47') + version('develop', branch='develop', no_cache=True) + + depends_on('ecbuild', type=('build')) + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.4.0:') + depends_on('jedi-cmake', type=('build')) + depends_on('mpi') + depends_on('netcdf-c+mpi') + depends_on('netcdf-fortran') + depends_on('oops') + depends_on('oops@1.7.0', when='@1.4.0') + From 401763ed53ca2f78b9f8844f03b316266004dab5 Mon Sep 17 00:00:00 2001 From: Ryan Honeyager Date: Tue, 12 Dec 2023 10:40:10 -0500 Subject: [PATCH 2/7] Updates for spack-stack 1.5 and the SkyLab 6 release. --- .../repos/builtin/packages/crtm/package.py | 9 ++++++++- .../fv3-jedi-linearmodel/CMakeLists.txt.patch | 14 +++++++------- .../packages/fv3-jedi-linearmodel/package.py | 5 +++-- .../packages/fv3-jedi/CMakeLists.txt.patch | 14 +++++++------- .../jcsda-emc/packages/fv3-jedi/package.py | 18 ++++++++++++------ .../repos/jcsda-emc/packages/ioda/package.py | 2 ++ .../repos/jcsda-emc/packages/oops/package.py | 11 ++++++----- .../repos/jcsda-emc/packages/saber/package.py | 19 +++++++++++-------- .../repos/jcsda-emc/packages/ufo/package.py | 8 ++++++-- .../repos/jcsda-emc/packages/vader/package.py | 2 ++ 10 files changed, 64 insertions(+), 38 deletions(-) diff --git a/var/spack/repos/builtin/packages/crtm/package.py b/var/spack/repos/builtin/packages/crtm/package.py index 671521885e202b..f1351388e94e75 100644 --- a/var/spack/repos/builtin/packages/crtm/package.py +++ b/var/spack/repos/builtin/packages/crtm/package.py @@ -44,6 +44,7 @@ class Crtm(CMakePackage): depends_on("netcdf-fortran", when="@v3.0.0-rc.1") depends_on("netcdf-fortran", when="@v3.0.0-skylabv5") depends_on("netcdf-fortran", when="@v3.0.0-skylabv5-1") + depends_on("netcdf-fortran", when="@v3.0.0-skylabv6") depends_on("crtm-fix@2.3.0_emc", when="@2.3.0 +fix") depends_on("crtm-fix@2.4.0_emc", when="@2.4.0 +fix") @@ -55,10 +56,16 @@ class Crtm(CMakePackage): depends_on("ecbuild", type=("build"), when="@v3.0.0-rc.1") depends_on("ecbuild", type=("build"), when="@v3.0.0-skylabv5") depends_on("ecbuild", type=("build"), when="@v3.0.0-skylabv5-1") + depends_on("ecbuild", type=("build"), when="@v3.0.0-skylabv6") + + # Spack gets confused by the different repository url, so we use direct URLs here. + + #version("v3.0.0-skylabv6", commit="a31ed458fb702b235bccbe1693d2badffb241d05") + version("v3.0.0-skylabv6", url="https://www.github.com/JCSDA/crtmv3/tarball/a31ed458fb702b235bccbe1693d2badffb241d05", + sha256="719b1070a2864e2ccc8334f195f276a555ebe3d3b1363f3dc6430b049080e4d6") # Slightly after the Skylab 5 release to fix https://github.com/JCSDA/CRTMv3/pull/48. # TODO: Push for a distinct tag in the CRTMv3 repository. - # Spack gets confused by the different repository url, so we use direct URLs here. version("v3.0.0-skylabv5-1", url="https://www.github.com/JCSDA/crtmv3/tarball/d15810f5538d4cf041e94ebfbb41b403d82bed13", sha256="fa0f050ae29d3d7d71da4b97c5dfd74ad90c98c3645fd35340efa1410cf76cf3") diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/CMakeLists.txt.patch index af2f36f966b905..68960483fab48f 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/CMakeLists.txt.patch +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/CMakeLists.txt.patch @@ -1,11 +1,11 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -9,6 +9,8 @@ +--- a/CMakeLists.txt 2023-10-12 11:02:44 ++++ b/CMakeLists.txt 2023-10-12 11:03:11 +@@ -15,6 +15,8 @@ - cmake_minimum_required( VERSION 3.3.2 FATAL_ERROR ) + set( CMAKE_DIRECTORY_LABELS "fv3-jedi-lm" ) +find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild) + - project( fv3jedilm VERSION 1.2.0 LANGUAGES Fortran C ) - - set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH} ) + set( ECBUILD_DEFAULT_BUILD_TYPE Release ) + set( ENABLE_OS_TESTS OFF CACHE BOOL "Disable OS tests" FORCE ) + set( ENABLE_LARGE_FILE_SUPPORT OFF CACHE BOOL "Disable testing of large file support" FORCE ) diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py index 6ccd76f6a8c21c..965bb4b8ffb33c 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py @@ -14,6 +14,7 @@ class Fv3JediLinearmodel(CMakePackage): maintainers = ["climbfuji"] + version('1.3.0', commit='9758fbd44166fc1e1d745ca9ab7e9e5e6071955f') version('1.2.0', commit='d47cea97c659e8a11e9e64c23092bef06227ebde') version('develop', branch='develop', no_cache=True) @@ -67,7 +68,7 @@ def cmake_args(self): return res # find_package(ecbuild REQUIRED) is needed when using ecbuild. - patch('CMakeLists.txt.patch', when='@1.2.0') + patch('CMakeLists.txt.patch', when='@1.2:1.3') # fv3-jedi-linearmodel needs to install its Fortran modules. - patch('src.CMakeLists.txt.patch', when='@1.2.0') + patch('src.CMakeLists.txt.patch', when='@1.2:1.3') diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch index f417b1b7ed1351..6defd07a558292 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch @@ -1,11 +1,11 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -9,6 +9,8 @@ +--- a/CMakeLists.txt 2023-10-12 11:36:48 ++++ b/CMakeLists.txt 2023-10-12 11:37:13 +@@ -17,6 +17,8 @@ - cmake_minimum_required( VERSION 3.3.2 FATAL_ERROR ) + set( CMAKE_DIRECTORY_LABELS "fv3-jedi" ) +find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild) + - project( fv3jedi VERSION 1.6.0 LANGUAGES C CXX Fortran ) - - option(OPENMP "Build fv3-jedi with OpenMP support" ON) + set( ECBUILD_DEFAULT_BUILD_TYPE Release ) + set( ENABLE_OS_TESTS OFF CACHE BOOL "Disable OS tests" FORCE ) + set( ENABLE_LARGE_FILE_SUPPORT OFF CACHE BOOL "Disable testing of large file support" FORCE ) diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py index a632fc8cc63fe9..01539501c7ad83 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py @@ -15,6 +15,7 @@ class Fv3Jedi(CMakePackage): maintainers = ["climbfuji"] version('develop', branch='develop', no_cache=True) + version('1.7.0', commit='75fa0544ae7c6b5446460bef8cb7663f3fe1acad') version('1.6.0', commit='3c20ebd2657d4b8df35103207a1e83535b67469c') variant( @@ -42,13 +43,13 @@ class Fv3Jedi(CMakePackage): # Required components depends_on('crtm') depends_on('crtm@2.2.3:', when='@:1.5.0') - #depends_on('crtm@v3.0.0-skylabv5-1', when='@1.6.0') + depends_on('crtm@v3.0.0-skylabv5-1', when='@1.6.0') + depends_on('crtm@v3.0.0-skylabv6', when='@1.7.0') depends_on('ecbuild', type=('build')) depends_on('ecbuild@3.3.2:', type=('build'), when='@1.6.0') depends_on('ecmwf-atlas') depends_on('ecmwf-atlas@0.33.0', when='@1.6.0') depends_on('femps@1.0.0:') - depends_on('fv3-jedi-linearmodel@1.0.0:') depends_on('jedi-cmake', type=('build')) depends_on('mpi') # fv3-jedi depends on netcdf-fortran, which always depends on netcdf-c. However, netcdf-c @@ -57,19 +58,24 @@ class Fv3Jedi(CMakePackage): depends_on('netcdf-c+mpi') depends_on('oops') depends_on('oops@1.7.0', when='@1.6.0') + depends_on('oops@1.8.0', when='@1.7.0') depends_on('saber') depends_on('saber@1.7.0', when='@1.6.0') + depends_on('saber@1.8.0', when='@1.7.0') depends_on('ufo') depends_on('ufo@1.7.0', when='@1.6.0') + depends_on('ufo@1.8.0', when='@1.7.0') depends_on('vader') depends_on('vader@1.4.0', when='@1.6.0') + depends_on('vader@1.5.0', when='@1.7.0') depends_on('fms', when='forecast_model=FV3CORE') + depends_on('fv3-jedi-linearmodel@1.0.0:', when='forecast_model=FV3CORE') # Optional components depends_on('GFDL_atmos_cubed_sphere', when='forecast_model=FV3CORE') depends_on('gsibec', when='+gsibec') - depends_on('gsibec@1.1.2:', when='@1.6.0 +gsibec') + depends_on('gsibec@1.1.2:', when='@1.6:1.7 +gsibec') depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) depends_on('sp', when='+sp') @@ -81,10 +87,10 @@ def cmake_args(self): return res # find_package(ecbuild REQUIRED) is needed when using ecbuild. - patch('CMakeLists.txt.patch', when='@1.6.0') + patch('CMakeLists.txt.patch', when='@1.6:1.7') # fv3-jedi is improperly including git_functions.cmake by searching for an environment variable. # It should instead use the jedicmake_FUNCTIONS variable, which is deliberately exported by jedi-cmake. - patch('test.CMakeLists.txt.patch', when='@1.6.0') + patch('test.CMakeLists.txt.patch', when='@1.6:1.7') # fv3-jedi depends on these macros that are defined (and not exported) in ufo. - patch('cmake.fv3jedi_extra_macros.cmake.patch', when='@1.6.0') + patch('cmake.fv3jedi_extra_macros.cmake.patch', when='@1.6:1.7') diff --git a/var/spack/repos/jcsda-emc/packages/ioda/package.py b/var/spack/repos/jcsda-emc/packages/ioda/package.py index aeec33a5ad2592..f1c43b747813c7 100644 --- a/var/spack/repos/jcsda-emc/packages/ioda/package.py +++ b/var/spack/repos/jcsda-emc/packages/ioda/package.py @@ -14,6 +14,7 @@ class Ioda(CMakePackage): maintainers = ["climbfuji"] + version('2.7.0', commit='ee35b7f7f859b78e823b69d72b4bc230b15f3d46') version('2.6.0', commit='26abb62ca8d30cc7b84303c4d780f0f253b287c9') version('develop', branch='develop', no_cache=True) @@ -42,6 +43,7 @@ class Ioda(CMakePackage): depends_on('oops+openmp', when='+openmp') depends_on('oops~openmp', when='~openmp') depends_on('oops@1.7.0', when='@2.6.0') + depends_on('oops@1.8.0', when='@2.7.0') depends_on('python@3.7:') depends_on('py-pybind11') depends_on('udunits@2.2.0:') diff --git a/var/spack/repos/jcsda-emc/packages/oops/package.py b/var/spack/repos/jcsda-emc/packages/oops/package.py index a20b17a7f38dc3..019dac9a26620d 100644 --- a/var/spack/repos/jcsda-emc/packages/oops/package.py +++ b/var/spack/repos/jcsda-emc/packages/oops/package.py @@ -14,6 +14,7 @@ class Oops(CMakePackage): maintainers = ["climbfuji"] + version('1.8.0', commit='d9c7c74e4597172bf8a69d8585df5ad6d0112e0c') version('1.7.0', commit='2426c2040e9ae138c4bf8362cacca84d66bd64bf') version('develop', branch='develop', no_cache=True) @@ -24,16 +25,16 @@ class Oops(CMakePackage): #variant('autoprofiling', default=False, description='Enable function-based autoprofiling with GPTL (if available)') #variant('gptl', default=False, description='Use GPTL profiling library (if available)') - depends_on('boost') + depends_on('boost@1.64:') depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0') + depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7:1.8') depends_on('eckit') - depends_on('eckit@1.23.0', when='@1.7.0') + depends_on('eckit@1.23.0', when='@1.7:1.8') depends_on('ecmwf-atlas') - depends_on('ecmwf-atlas@0.33.0', when='@1.7.0') + depends_on('ecmwf-atlas@0.33.0', when='@1.7:1.8') depends_on('eigen') depends_on('fckit') - depends_on('fckit@0.10.1', when='@1.7.0') + depends_on('fckit@0.10.1', when='@1.7:1.8') #depends_on('gptl', when='+gptl') depends_on('jedi-cmake', type=('build')) depends_on('lapack', when='~mkl') diff --git a/var/spack/repos/jcsda-emc/packages/saber/package.py b/var/spack/repos/jcsda-emc/packages/saber/package.py index 2af727620d591e..57b2968f09ac1f 100644 --- a/var/spack/repos/jcsda-emc/packages/saber/package.py +++ b/var/spack/repos/jcsda-emc/packages/saber/package.py @@ -14,6 +14,7 @@ class Saber(CMakePackage): maintainers = ["climbfuji"] + version('1.8.0', commit='de99a5a8130e230e8bb14785f6e3133d7da047b8') version('1.7.0', commit='d90ce5276b37552d569fcb72a22b5a30fb03de75') version('develop', branch='develop', no_cache=True) @@ -26,15 +27,15 @@ class Saber(CMakePackage): depends_on('ecbuild', type=('build')) depends_on('ecbuild@3.3.2:', type=('build'), when='@1.4.0:') depends_on('eckit') - depends_on('eckit@1.23.0', when='@1.7.0') + depends_on('eckit@1.23.0', when='@1.7:1.8') depends_on('ecmwf-atlas') - depends_on('ecmwf-atlas@0.33.0', when='@1.7.0') + depends_on('ecmwf-atlas@0.33.0', when='@1.7:1.8') depends_on('ecmwf-atlas+openmp', when='+openmp') depends_on('ecmwf-atlas~openmp', when='~openmp') depends_on('fckit') - depends_on('fckit@0.10.1', when='@1.7.0') + depends_on('fckit@0.10.1', when='@1.7:1.8') depends_on('gsibec', when='+gsibec') - depends_on('gsibec@1.1.2', when='@1.7.0 +gsibec') + depends_on('gsibec@1.1.2', when='@1.7:1.8 +gsibec') depends_on('jedi-cmake', type=('build')) depends_on('lapack', when='~mkl') depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) @@ -46,9 +47,11 @@ class Saber(CMakePackage): depends_on('oops+openmp', when='+oops +openmp') depends_on('oops~openmp', when='+oops ~openmp') depends_on('oops@1.7.0', when='@1.7.0 +oops') + depends_on('oops@1.8.0', when='@1.8.0 +oops') depends_on('sp', when='+gsibec') depends_on('vader', when='+vader') depends_on('vader@1.4.0', when='@1.7.0 +vader') + depends_on('vader@1.5.0', when='@1.8.0 +vader') def cmake_args(self): res = [ @@ -58,9 +61,9 @@ def cmake_args(self): return res # Lapack vs MKL bug. - patch('CMakeLists.txt.patch', when='@1.7.0') + patch('CMakeLists.txt.patch', when='@1.7:1.8') # Another Lapack vs MKL bug. If ENABLE_MKL was off, then the saber-import.cmake file had a syntax error. - patch('saber-import.cmake.in.patch', when='@1.7.0') - # Fixed in develop. JCSDA/saber#22 / JCSDA-internal/saber#652. - patch('quench.src.Fields.cc.patch', when='@1.7.0') + patch('saber-import.cmake.in.patch', when='@1.7:1.8') + # JCSDA/saber#22 / JCSDA-internal/saber#652. Fixed in later versions. + patch('quench.src.Fields.cc.patch', when='@1.7') diff --git a/var/spack/repos/jcsda-emc/packages/ufo/package.py b/var/spack/repos/jcsda-emc/packages/ufo/package.py index 395ed4864389ef..3a864e8c512781 100644 --- a/var/spack/repos/jcsda-emc/packages/ufo/package.py +++ b/var/spack/repos/jcsda-emc/packages/ufo/package.py @@ -14,6 +14,7 @@ class Ufo(CMakePackage): maintainers = ["climbfuji"] + version('1.8.0', commit='7f7b65bf70e795c4ad02175b606cb18fe5dd4388') version('1.7.0', commit='1d745701806bd2a3f3d194c9de87ea7ca0a4c2ab') version('develop', branch='develop', no_cache=True) @@ -37,22 +38,25 @@ class Ufo(CMakePackage): depends_on('ecbuild', type=('build')) depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') depends_on('eckit') - depends_on('eckit@1.23.0', when='@1.7.0') + depends_on('eckit@1.23.0', when='@1.7:1.8') depends_on('eigen') depends_on('fckit') - depends_on('fckit@0.10.1', when='@1.7.0') + depends_on('fckit@0.10.1', when='@1.7:1.8') depends_on('gsl-lite') depends_on('ioda') depends_on('ioda@2.6.0', when='@1.7.0') + depends_on('ioda@2.7.0', when='@1.8.0') depends_on('jedi-cmake', type=('build')) depends_on('mpi') depends_on('netcdf-c+mpi') depends_on('netcdf-fortran') depends_on('oops') depends_on('oops@1.7.0', when='@1.7.0') + depends_on('oops@1.8.0', when='@1.8.0') depends_on('crtm', when='+crtm') depends_on('crtm@v3.0.0-skylabv5-1', when='@1.7.0 +crtm') + depends_on('crtm@v3.0.0-skylabv6', when='@1.8.0 +crtm') #depends_on('geos-aero', when='+geos-aero') #depends_on('geos-aero@0.0.0', when='@1.7.0 +geos-aero') diff --git a/var/spack/repos/jcsda-emc/packages/vader/package.py b/var/spack/repos/jcsda-emc/packages/vader/package.py index 1a2e5086b2cfd2..1d69ec4bf6ff2f 100644 --- a/var/spack/repos/jcsda-emc/packages/vader/package.py +++ b/var/spack/repos/jcsda-emc/packages/vader/package.py @@ -14,6 +14,7 @@ class Vader(CMakePackage): maintainers = ["climbfuji"] + version('1.5.0', commit='17173dc97a727e623e4b54ee06e2a0dc71f643de') version('1.4.0', commit='4264b56111a62ab1339320ad85a7f715b923df47') version('develop', branch='develop', no_cache=True) @@ -25,4 +26,5 @@ class Vader(CMakePackage): depends_on('netcdf-fortran') depends_on('oops') depends_on('oops@1.7.0', when='@1.4.0') + depends_on('oops@1.8.0', when='@1.5.0') From fa07cbe5e7cbf224722d61f1ad252e3c3927fd01 Mon Sep 17 00:00:00 2001 From: Ryan Honeyager Date: Tue, 12 Dec 2023 10:50:13 -0500 Subject: [PATCH 3/7] black formatting --- .../repos/builtin/packages/crtm/package.py | 33 ++++-- .../GFDL_atmos_cubed_sphere/package.py | 23 ++-- .../repos/jcsda-emc/packages/femps/package.py | 21 ++-- .../packages/fv3-jedi-linearmodel/package.py | 49 ++++---- .../jcsda-emc/packages/fv3-jedi/package.py | 99 ++++++++-------- .../repos/jcsda-emc/packages/gsw/package.py | 9 +- .../repos/jcsda-emc/packages/ioda/package.py | 59 +++++----- .../repos/jcsda-emc/packages/oops/package.py | 71 ++++++------ .../repos/jcsda-emc/packages/saber/package.py | 83 +++++++------ .../repos/jcsda-emc/packages/ufo/package.py | 109 +++++++++--------- .../repos/jcsda-emc/packages/vader/package.py | 27 +++-- 11 files changed, 293 insertions(+), 290 deletions(-) diff --git a/var/spack/repos/builtin/packages/crtm/package.py b/var/spack/repos/builtin/packages/crtm/package.py index f1351388e94e75..31384ace70c896 100644 --- a/var/spack/repos/builtin/packages/crtm/package.py +++ b/var/spack/repos/builtin/packages/crtm/package.py @@ -60,21 +60,34 @@ class Crtm(CMakePackage): # Spack gets confused by the different repository url, so we use direct URLs here. - #version("v3.0.0-skylabv6", commit="a31ed458fb702b235bccbe1693d2badffb241d05") - version("v3.0.0-skylabv6", url="https://www.github.com/JCSDA/crtmv3/tarball/a31ed458fb702b235bccbe1693d2badffb241d05", - sha256="719b1070a2864e2ccc8334f195f276a555ebe3d3b1363f3dc6430b049080e4d6") + # version("v3.0.0-skylabv6", commit="a31ed458fb702b235bccbe1693d2badffb241d05") + version( + "v3.0.0-skylabv6", + url="https://www.github.com/JCSDA/crtmv3/tarball/a31ed458fb702b235bccbe1693d2badffb241d05", + sha256="719b1070a2864e2ccc8334f195f276a555ebe3d3b1363f3dc6430b049080e4d6", + ) # Slightly after the Skylab 5 release to fix https://github.com/JCSDA/CRTMv3/pull/48. # TODO: Push for a distinct tag in the CRTMv3 repository. - version("v3.0.0-skylabv5-1", url="https://www.github.com/JCSDA/crtmv3/tarball/d15810f5538d4cf041e94ebfbb41b403d82bed13", - sha256="fa0f050ae29d3d7d71da4b97c5dfd74ad90c98c3645fd35340efa1410cf76cf3") + version( + "v3.0.0-skylabv5-1", + url="https://www.github.com/JCSDA/crtmv3/tarball/d15810f5538d4cf041e94ebfbb41b403d82bed13", + sha256="fa0f050ae29d3d7d71da4b97c5dfd74ad90c98c3645fd35340efa1410cf76cf3", + ) # The official release for Skylab 5, but it's buggy. See https://github.com/JCSDA/CRTMv3/pull/48. - version("v3.0.0-skylabv5", url="https://www.github.com/JCSDA/crtmv3/tarball/74cdc9428f56a11ce0dcd3ac7ddff00097b7b61c", - sha256="033abf0dde10b29043f3cde8c4b4285a32e5886599d174ab83ef6f5a2132e3d6") + version( + "v3.0.0-skylabv5", + url="https://www.github.com/JCSDA/crtmv3/tarball/74cdc9428f56a11ce0dcd3ac7ddff00097b7b61c", + sha256="033abf0dde10b29043f3cde8c4b4285a32e5886599d174ab83ef6f5a2132e3d6", + ) - version("v2.4.1-jedi.1", sha256="94ff24051382d544c2e200a937bfe7d2047f6393a3e22f64284d5dc70e791ca6") - version("v2.4.1-jedi", sha256="fd8bf4db4f2a3b420b4186de84483ba2a36660519dffcb1e0ff14bfe8c6f6a14") + version( + "v2.4.1-jedi.1", sha256="94ff24051382d544c2e200a937bfe7d2047f6393a3e22f64284d5dc70e791ca6" + ) + version( + "v2.4.1-jedi", sha256="fd8bf4db4f2a3b420b4186de84483ba2a36660519dffcb1e0ff14bfe8c6f6a14" + ) # Both of these have big binary file blobs # Corrects polarization angle biases for NOAA-21 and fixes WMO satellite and sensor ids. @@ -94,7 +107,7 @@ class Crtm(CMakePackage): version("v2.4-jedi.2", commit="62831cb") def url_for_version(self, version): - if self.spec.satisfies("@v3") or version >= Version("3.0.0"): + if self.spec.satisfies("@v3") or version >= Version("3.0.0"): return "https://github.com/JCSDA/crtmv3/archive/refs/tags/{}.tar.gz".format(version) else: return "https://github.com/JCSDA/crtm/archive/refs/tags/{}.tar.gz".format(version) diff --git a/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/package.py b/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/package.py index 9232a50fc114f8..878bca5a601a83 100644 --- a/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/package.py +++ b/var/spack/repos/jcsda-emc/packages/GFDL_atmos_cubed_sphere/package.py @@ -12,19 +12,18 @@ class GfdlAtmosCubedSphere(CMakePackage): homepage = "https://github.com/JCSDA/GFDL_atmos_cubed_sphere" git = "https://github.com/JCSDA/GFDL_atmos_cubed_sphere.git" - maintainers = ['climbfuji'] + maintainers = ["climbfuji"] - version('1.2.0.jcsda', commit='61450b4e3e80bb96b26c5f3808ce60b5e5cb4207') + version("1.2.0.jcsda", commit="61450b4e3e80bb96b26c5f3808ce60b5e5cb4207") - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') - depends_on('fms@release-jcsda') - depends_on('jedi-cmake', type=('build')) - depends_on('llvm-openmp', when='%apple-clang', type=('build', 'run')) - depends_on('mpi') - depends_on('netcdf-c') - depends_on('netcdf-fortran') + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7.0:") + depends_on("fms@release-jcsda") + depends_on("jedi-cmake", type=("build")) + depends_on("llvm-openmp", when="%apple-clang", type=("build", "run")) + depends_on("mpi") + depends_on("netcdf-c") + depends_on("netcdf-fortran") # find_package(ecbuild REQUIRED) is needed when using ecbuild. - patch('CMakeLists.txt.patch', when='@1.2.0.jcsda') - + patch("CMakeLists.txt.patch", when="@1.2.0.jcsda") diff --git a/var/spack/repos/jcsda-emc/packages/femps/package.py b/var/spack/repos/jcsda-emc/packages/femps/package.py index 0850cd89e69b0b..5fbd470f61c22e 100644 --- a/var/spack/repos/jcsda-emc/packages/femps/package.py +++ b/var/spack/repos/jcsda-emc/packages/femps/package.py @@ -14,18 +14,17 @@ class Femps(CMakePackage): maintainers = ["climbfuji"] - version('1.2.0', commit='a22e458c1742695479db9011ddb6bcbf31de39fe') + version("1.2.0", commit="a22e458c1742695479db9011ddb6bcbf31de39fe") - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') - depends_on('jedi-cmake', type=('build')) - depends_on('llvm-openmp', when='%apple-clang', type=('build', 'run')) - depends_on('mpi') - depends_on('netcdf-c') - depends_on('netcdf-fortran') + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7.0:") + depends_on("jedi-cmake", type=("build")) + depends_on("llvm-openmp", when="%apple-clang", type=("build", "run")) + depends_on("mpi") + depends_on("netcdf-c") + depends_on("netcdf-fortran") # find_package(ecbuild REQUIRED) is needed when using ecbuild. - patch('CMakeLists.txt.patch', when='@1.2.0') + patch("CMakeLists.txt.patch", when="@1.2.0") # femps needs to install its Fortran modules. - patch('src.femps.CMakeLists.txt.patch', when='@1.2.0') - + patch("src.femps.CMakeLists.txt.patch", when="@1.2.0") diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py index 965bb4b8ffb33c..ddd34abd53fb88 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py @@ -14,9 +14,9 @@ class Fv3JediLinearmodel(CMakePackage): maintainers = ["climbfuji"] - version('1.3.0', commit='9758fbd44166fc1e1d745ca9ab7e9e5e6071955f') - version('1.2.0', commit='d47cea97c659e8a11e9e64c23092bef06227ebde') - version('develop', branch='develop', no_cache=True) + version("1.3.0", commit="9758fbd44166fc1e1d745ca9ab7e9e5e6071955f") + version("1.2.0", commit="d47cea97c659e8a11e9e64c23092bef06227ebde") + version("develop", branch="develop", no_cache=True) variant( "forecast_model", @@ -28,25 +28,25 @@ class Fv3JediLinearmodel(CMakePackage): # These options just turn on a find_package call. If a package is already found, for example by # one of the package dependencies, then that component is silently used even if the user toggles # it off. This is a bug and should be fixed eventually. - variant('mkl', default=False, description='Use MKL for LAPACK implementation (if available)') - variant('mpi', default=True, description='Support for MPI distributed parallelism') - variant('openmp', default=True, description='Build with OpenMP support') + variant("mkl", default=False, description="Use MKL for LAPACK implementation (if available)") + variant("mpi", default=True, description="Support for MPI distributed parallelism") + variant("openmp", default=True, description="Build with OpenMP support") - conflicts('forecast_model=GEOS', msg='FV3-JEDI-LINEARMODEL: GEOS to be implemented.') - conflicts('forecast_model=UFS', msg='FV3-JEDI-LINEARMODEL: UFS to be implemented.') + conflicts("forecast_model=GEOS", msg="FV3-JEDI-LINEARMODEL: GEOS to be implemented.") + conflicts("forecast_model=UFS", msg="FV3-JEDI-LINEARMODEL: UFS to be implemented.") - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') - depends_on('fms@release-jcsda', when='forecast_model=FV3CORE') - depends_on('fms@release-jcsda', when='forecast_model=UFS') - depends_on('jedi-cmake', type=('build')) - depends_on('lapack', when='~mkl') - depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) - depends_on('mkl', when='+mkl') - depends_on('mpi', when='+mpi') - depends_on('netcdf-fortran') - depends_on('netcdf-c~mpi', when='~mpi') - depends_on('netcdf-c+mpi', when='+mpi') + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7.0:") + depends_on("fms@release-jcsda", when="forecast_model=FV3CORE") + depends_on("fms@release-jcsda", when="forecast_model=UFS") + depends_on("jedi-cmake", type=("build")) + depends_on("lapack", when="~mkl") + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run")) + depends_on("mkl", when="+mkl") + depends_on("mpi", when="+mpi") + depends_on("netcdf-fortran") + depends_on("netcdf-c~mpi", when="~mpi") + depends_on("netcdf-c+mpi", when="+mpi") # Future: GEOS needs # - MAPL (underway at GMAO) @@ -62,13 +62,10 @@ class Fv3JediLinearmodel(CMakePackage): # - FMS::fms_r8 def cmake_args(self): - res = [ - self.define_from_variant('FV3_FORECAST_MODEL', 'forecast_model') - ] + res = [self.define_from_variant("FV3_FORECAST_MODEL", "forecast_model")] return res # find_package(ecbuild REQUIRED) is needed when using ecbuild. - patch('CMakeLists.txt.patch', when='@1.2:1.3') + patch("CMakeLists.txt.patch", when="@1.2:1.3") # fv3-jedi-linearmodel needs to install its Fortran modules. - patch('src.CMakeLists.txt.patch', when='@1.2:1.3') - + patch("src.CMakeLists.txt.patch", when="@1.2:1.3") diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py index 01539501c7ad83..61fd8abbe0475f 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py @@ -14,9 +14,9 @@ class Fv3Jedi(CMakePackage): maintainers = ["climbfuji"] - version('develop', branch='develop', no_cache=True) - version('1.7.0', commit='75fa0544ae7c6b5446460bef8cb7663f3fe1acad') - version('1.6.0', commit='3c20ebd2657d4b8df35103207a1e83535b67469c') + version("develop", branch="develop", no_cache=True) + version("1.7.0", commit="75fa0544ae7c6b5446460bef8cb7663f3fe1acad") + version("1.6.0", commit="3c20ebd2657d4b8df35103207a1e83535b67469c") variant( "forecast_model", @@ -24,73 +24,72 @@ class Fv3Jedi(CMakePackage): description="fv3 forecast model", values=("FV3CORE", "GEOS", "UFS"), ) - variant('geos-aero', default=False, description='Enable usage of geos-aero') - variant('gsibec', default=True, description='FV3-SABER block GSI') + variant("geos-aero", default=False, description="Enable usage of geos-aero") + variant("gsibec", default=True, description="FV3-SABER block GSI") # Note that the option for openmp is lazily written in fv3-jedi. # It just enables a find_package call. If a package is already found, for example by # one of the package dependencies, then that component is silently used even if the user toggles # it off. This is a bug and should be fixed eventually. - variant('openmp', default=True, description='Build with OpenMP support') - variant('ropp', default=False, description='Enable usage of ropp') - variant('sp', default=True, description='Enable usage of ncep-sp') + variant("openmp", default=True, description="Build with OpenMP support") + variant("ropp", default=False, description="Enable usage of ropp") + variant("sp", default=True, description="Enable usage of ncep-sp") - conflicts('forecast_model=GEOS', msg='FV3-JEDI: GEOS to be implemented.') - conflicts('forecast_model=UFS', msg='FV3-JEDI: UFS to be implemented.') - conflicts('+geos-aero', msg='FV3-JEDI: geos-aero to be implemented.') + conflicts("forecast_model=GEOS", msg="FV3-JEDI: GEOS to be implemented.") + conflicts("forecast_model=UFS", msg="FV3-JEDI: UFS to be implemented.") + conflicts("+geos-aero", msg="FV3-JEDI: geos-aero to be implemented.") # Note: the ropp code needs a JCSDA-internal repository. - conflicts('+ropp', msg='FV3-JEDI: ropp to be implemented.') + conflicts("+ropp", msg="FV3-JEDI: ropp to be implemented.") # Required components - depends_on('crtm') - depends_on('crtm@2.2.3:', when='@:1.5.0') - depends_on('crtm@v3.0.0-skylabv5-1', when='@1.6.0') - depends_on('crtm@v3.0.0-skylabv6', when='@1.7.0') - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.6.0') - depends_on('ecmwf-atlas') - depends_on('ecmwf-atlas@0.33.0', when='@1.6.0') - depends_on('femps@1.0.0:') - depends_on('jedi-cmake', type=('build')) - depends_on('mpi') + depends_on("crtm") + depends_on("crtm@2.2.3:", when="@:1.5.0") + depends_on("crtm@v3.0.0-skylabv5-1", when="@1.6.0") + depends_on("crtm@v3.0.0-skylabv6", when="@1.7.0") + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.6.0") + depends_on("ecmwf-atlas") + depends_on("ecmwf-atlas@0.33.0", when="@1.6.0") + depends_on("femps@1.0.0:") + depends_on("jedi-cmake", type=("build")) + depends_on("mpi") # fv3-jedi depends on netcdf-fortran, which always depends on netcdf-c. However, netcdf-c # has the mpi options, and netcdf-fortran does not. - depends_on('netcdf-fortran') - depends_on('netcdf-c+mpi') - depends_on('oops') - depends_on('oops@1.7.0', when='@1.6.0') - depends_on('oops@1.8.0', when='@1.7.0') - depends_on('saber') - depends_on('saber@1.7.0', when='@1.6.0') - depends_on('saber@1.8.0', when='@1.7.0') - depends_on('ufo') - depends_on('ufo@1.7.0', when='@1.6.0') - depends_on('ufo@1.8.0', when='@1.7.0') - depends_on('vader') - depends_on('vader@1.4.0', when='@1.6.0') - depends_on('vader@1.5.0', when='@1.7.0') + depends_on("netcdf-fortran") + depends_on("netcdf-c+mpi") + depends_on("oops") + depends_on("oops@1.7.0", when="@1.6.0") + depends_on("oops@1.8.0", when="@1.7.0") + depends_on("saber") + depends_on("saber@1.7.0", when="@1.6.0") + depends_on("saber@1.8.0", when="@1.7.0") + depends_on("ufo") + depends_on("ufo@1.7.0", when="@1.6.0") + depends_on("ufo@1.8.0", when="@1.7.0") + depends_on("vader") + depends_on("vader@1.4.0", when="@1.6.0") + depends_on("vader@1.5.0", when="@1.7.0") - depends_on('fms', when='forecast_model=FV3CORE') - depends_on('fv3-jedi-linearmodel@1.0.0:', when='forecast_model=FV3CORE') + depends_on("fms", when="forecast_model=FV3CORE") + depends_on("fv3-jedi-linearmodel@1.0.0:", when="forecast_model=FV3CORE") # Optional components - depends_on('GFDL_atmos_cubed_sphere', when='forecast_model=FV3CORE') - depends_on('gsibec', when='+gsibec') - depends_on('gsibec@1.1.2:', when='@1.6:1.7 +gsibec') - depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) - depends_on('sp', when='+sp') + depends_on("GFDL_atmos_cubed_sphere", when="forecast_model=FV3CORE") + depends_on("gsibec", when="+gsibec") + depends_on("gsibec@1.1.2:", when="@1.6:1.7 +gsibec") + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run")) + depends_on("sp", when="+sp") def cmake_args(self): res = [ - self.define_from_variant('FV3_FORECAST_MODEL', 'forecast_model'), - self.define_from_variant('OPENMP', 'openmp') + self.define_from_variant("FV3_FORECAST_MODEL", "forecast_model"), + self.define_from_variant("OPENMP", "openmp"), ] return res # find_package(ecbuild REQUIRED) is needed when using ecbuild. - patch('CMakeLists.txt.patch', when='@1.6:1.7') + patch("CMakeLists.txt.patch", when="@1.6:1.7") # fv3-jedi is improperly including git_functions.cmake by searching for an environment variable. # It should instead use the jedicmake_FUNCTIONS variable, which is deliberately exported by jedi-cmake. - patch('test.CMakeLists.txt.patch', when='@1.6:1.7') + patch("test.CMakeLists.txt.patch", when="@1.6:1.7") # fv3-jedi depends on these macros that are defined (and not exported) in ufo. - patch('cmake.fv3jedi_extra_macros.cmake.patch', when='@1.6:1.7') - + patch("cmake.fv3jedi_extra_macros.cmake.patch", when="@1.6:1.7") diff --git a/var/spack/repos/jcsda-emc/packages/gsw/package.py b/var/spack/repos/jcsda-emc/packages/gsw/package.py index 4c46f37a364a13..64e1b5339986a7 100644 --- a/var/spack/repos/jcsda-emc/packages/gsw/package.py +++ b/var/spack/repos/jcsda-emc/packages/gsw/package.py @@ -14,9 +14,8 @@ class Gsw(CMakePackage): maintainers = ["climbfuji"] - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@3.0.7:') - - version('3.0.7', commit='1a02ebaf6f7a4e9f2c2d2dd973fb050e697bcc74') - version('develop', branch='develop', no_cache=True) + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@3.0.7:") + version("3.0.7", commit="1a02ebaf6f7a4e9f2c2d2dd973fb050e697bcc74") + version("develop", branch="develop", no_cache=True) diff --git a/var/spack/repos/jcsda-emc/packages/ioda/package.py b/var/spack/repos/jcsda-emc/packages/ioda/package.py index f1c43b747813c7..fc7b59ac470439 100644 --- a/var/spack/repos/jcsda-emc/packages/ioda/package.py +++ b/var/spack/repos/jcsda-emc/packages/ioda/package.py @@ -14,37 +14,36 @@ class Ioda(CMakePackage): maintainers = ["climbfuji"] - version('2.7.0', commit='ee35b7f7f859b78e823b69d72b4bc230b15f3d46') - version('2.6.0', commit='26abb62ca8d30cc7b84303c4d780f0f253b287c9') - version('develop', branch='develop', no_cache=True) + version("2.7.0", commit="ee35b7f7f859b78e823b69d72b4bc230b15f3d46") + version("2.6.0", commit="26abb62ca8d30cc7b84303c4d780f0f253b287c9") + version("develop", branch="develop", no_cache=True) # Let's always assume IODA_BUILD_LANGUAGE_FORTRAN=on. - #variant('fortran', default=True, description='Build the ioda Fortran interface') - variant('odc', default=True, description='Build ODC bindings') + # variant('fortran', default=True, description='Build the ioda Fortran interface') + variant("odc", default=True, description="Build ODC bindings") # ioda has no explicit OpenMP calls, but header files from Eigen and oops do use openmp. - variant('openmp', default=True, description='Build with OpenMP support') + variant("openmp", default=True, description="Build with OpenMP support") # Let's always BUILD_PYTHON_BINDINGS. - #variant('python', default=True, description='Build the ioda Python interface') - - depends_on('boost@1.64.0:') - depends_on('ecbuild', type=('build')) - depends_on('eckit') - depends_on('eckit@1.23.0', when='@2.6.0:') - depends_on('eigen') - depends_on('fckit') - depends_on('fckit@0.10.1', when='@2.6.0:') - depends_on('gsl-lite') - depends_on('hdf5@1.12.0: +mpi') - depends_on('hdf5@1.14.0: +mpi', when='@2.6.0:') - depends_on('jedi-cmake', type=('build')) - depends_on('mpi') - depends_on('odc', when='+odc') - depends_on('odc@1.0.2:', when='@2.6.0: +odc') - depends_on('oops+openmp', when='+openmp') - depends_on('oops~openmp', when='~openmp') - depends_on('oops@1.7.0', when='@2.6.0') - depends_on('oops@1.8.0', when='@2.7.0') - depends_on('python@3.7:') - depends_on('py-pybind11') - depends_on('udunits@2.2.0:') - + # variant('python', default=True, description='Build the ioda Python interface') + + depends_on("boost@1.64.0:") + depends_on("ecbuild", type=("build")) + depends_on("eckit") + depends_on("eckit@1.23.0", when="@2.6.0:") + depends_on("eigen") + depends_on("fckit") + depends_on("fckit@0.10.1", when="@2.6.0:") + depends_on("gsl-lite") + depends_on("hdf5@1.12.0: +mpi") + depends_on("hdf5@1.14.0: +mpi", when="@2.6.0:") + depends_on("jedi-cmake", type=("build")) + depends_on("mpi") + depends_on("odc", when="+odc") + depends_on("odc@1.0.2:", when="@2.6.0: +odc") + depends_on("oops+openmp", when="+openmp") + depends_on("oops~openmp", when="~openmp") + depends_on("oops@1.7.0", when="@2.6.0") + depends_on("oops@1.8.0", when="@2.7.0") + depends_on("python@3.7:") + depends_on("py-pybind11") + depends_on("udunits@2.2.0:") diff --git a/var/spack/repos/jcsda-emc/packages/oops/package.py b/var/spack/repos/jcsda-emc/packages/oops/package.py index 019dac9a26620d..699ddf4546a99b 100644 --- a/var/spack/repos/jcsda-emc/packages/oops/package.py +++ b/var/spack/repos/jcsda-emc/packages/oops/package.py @@ -14,44 +14,43 @@ class Oops(CMakePackage): maintainers = ["climbfuji"] - version('1.8.0', commit='d9c7c74e4597172bf8a69d8585df5ad6d0112e0c') - version('1.7.0', commit='2426c2040e9ae138c4bf8362cacca84d66bd64bf') - version('develop', branch='develop', no_cache=True) - - variant('l95', default=True, description='Build LORENZ95 toy model') - variant('mkl', default=False, description='Use MKL for LAPACK implementation (if available)') - variant('openmp', default=True, description='Build oops with OpenMP support') - variant('qg', default=True, description='Build QG toy model') - #variant('autoprofiling', default=False, description='Enable function-based autoprofiling with GPTL (if available)') - #variant('gptl', default=False, description='Use GPTL profiling library (if available)') - - depends_on('boost@1.64:') - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7:1.8') - depends_on('eckit') - depends_on('eckit@1.23.0', when='@1.7:1.8') - depends_on('ecmwf-atlas') - depends_on('ecmwf-atlas@0.33.0', when='@1.7:1.8') - depends_on('eigen') - depends_on('fckit') - depends_on('fckit@0.10.1', when='@1.7:1.8') - #depends_on('gptl', when='+gptl') - depends_on('jedi-cmake', type=('build')) - depends_on('lapack', when='~mkl') - depends_on('mkl', when='+mkl') - depends_on('mpi') - depends_on('netcdf-c+mpi') - depends_on('netcdf-fortran') - depends_on('nlohmann-json') - depends_on('nlohmann-json-schema-validator') - depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) + version("1.8.0", commit="d9c7c74e4597172bf8a69d8585df5ad6d0112e0c") + version("1.7.0", commit="2426c2040e9ae138c4bf8362cacca84d66bd64bf") + version("develop", branch="develop", no_cache=True) + + variant("l95", default=True, description="Build LORENZ95 toy model") + variant("mkl", default=False, description="Use MKL for LAPACK implementation (if available)") + variant("openmp", default=True, description="Build oops with OpenMP support") + variant("qg", default=True, description="Build QG toy model") + # variant('autoprofiling', default=False, description='Enable function-based autoprofiling with GPTL (if available)') + # variant('gptl', default=False, description='Use GPTL profiling library (if available)') + + depends_on("boost@1.64:") + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7:1.8") + depends_on("eckit") + depends_on("eckit@1.23.0", when="@1.7:1.8") + depends_on("ecmwf-atlas") + depends_on("ecmwf-atlas@0.33.0", when="@1.7:1.8") + depends_on("eigen") + depends_on("fckit") + depends_on("fckit@0.10.1", when="@1.7:1.8") + # depends_on('gptl', when='+gptl') + depends_on("jedi-cmake", type=("build")) + depends_on("lapack", when="~mkl") + depends_on("mkl", when="+mkl") + depends_on("mpi") + depends_on("netcdf-c+mpi") + depends_on("netcdf-fortran") + depends_on("nlohmann-json") + depends_on("nlohmann-json-schema-validator") + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run")) def cmake_args(self): res = [ - self.define_from_variant('ENABLE_LORENZ95_MODEL', 'l95'), - self.define_from_variant('ENABLE_QG_MODEL', 'qg'), - self.define_from_variant('ENABLE_MKL', 'mkl'), - self.define_from_variant('OPENMP', 'openmp') + self.define_from_variant("ENABLE_LORENZ95_MODEL", "l95"), + self.define_from_variant("ENABLE_QG_MODEL", "qg"), + self.define_from_variant("ENABLE_MKL", "mkl"), + self.define_from_variant("OPENMP", "openmp"), ] return res - diff --git a/var/spack/repos/jcsda-emc/packages/saber/package.py b/var/spack/repos/jcsda-emc/packages/saber/package.py index 57b2968f09ac1f..b787a461a7a482 100644 --- a/var/spack/repos/jcsda-emc/packages/saber/package.py +++ b/var/spack/repos/jcsda-emc/packages/saber/package.py @@ -14,56 +14,55 @@ class Saber(CMakePackage): maintainers = ["climbfuji"] - version('1.8.0', commit='de99a5a8130e230e8bb14785f6e3133d7da047b8') - version('1.7.0', commit='d90ce5276b37552d569fcb72a22b5a30fb03de75') - version('develop', branch='develop', no_cache=True) + version("1.8.0", commit="de99a5a8130e230e8bb14785f6e3133d7da047b8") + version("1.7.0", commit="d90ce5276b37552d569fcb72a22b5a30fb03de75") + version("develop", branch="develop", no_cache=True) - variant('gsibec', default=True, description='Enable SABER block GSI') - variant('mkl', default=False, description='Use MKL for LAPACK implementation') - variant('oops', default=True, description='Use oops') - variant('openmp', default=True, description='Build with OpenMP support') - variant('vader', default=True, description='Build with vader support') + variant("gsibec", default=True, description="Enable SABER block GSI") + variant("mkl", default=False, description="Use MKL for LAPACK implementation") + variant("oops", default=True, description="Use oops") + variant("openmp", default=True, description="Build with OpenMP support") + variant("vader", default=True, description="Build with vader support") - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.4.0:') - depends_on('eckit') - depends_on('eckit@1.23.0', when='@1.7:1.8') - depends_on('ecmwf-atlas') - depends_on('ecmwf-atlas@0.33.0', when='@1.7:1.8') - depends_on('ecmwf-atlas+openmp', when='+openmp') - depends_on('ecmwf-atlas~openmp', when='~openmp') - depends_on('fckit') - depends_on('fckit@0.10.1', when='@1.7:1.8') - depends_on('gsibec', when='+gsibec') - depends_on('gsibec@1.1.2', when='@1.7:1.8 +gsibec') - depends_on('jedi-cmake', type=('build')) - depends_on('lapack', when='~mkl') - depends_on('llvm-openmp', when='+openmp %apple-clang', type=('build', 'run')) - depends_on('mkl', when='+mkl') - depends_on('mpi') - depends_on('netcdf-c') - depends_on('netcdf-fortran') - depends_on('oops', when='+oops') - depends_on('oops+openmp', when='+oops +openmp') - depends_on('oops~openmp', when='+oops ~openmp') - depends_on('oops@1.7.0', when='@1.7.0 +oops') - depends_on('oops@1.8.0', when='@1.8.0 +oops') - depends_on('sp', when='+gsibec') - depends_on('vader', when='+vader') - depends_on('vader@1.4.0', when='@1.7.0 +vader') - depends_on('vader@1.5.0', when='@1.8.0 +vader') + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.4.0:") + depends_on("eckit") + depends_on("eckit@1.23.0", when="@1.7:1.8") + depends_on("ecmwf-atlas") + depends_on("ecmwf-atlas@0.33.0", when="@1.7:1.8") + depends_on("ecmwf-atlas+openmp", when="+openmp") + depends_on("ecmwf-atlas~openmp", when="~openmp") + depends_on("fckit") + depends_on("fckit@0.10.1", when="@1.7:1.8") + depends_on("gsibec", when="+gsibec") + depends_on("gsibec@1.1.2", when="@1.7:1.8 +gsibec") + depends_on("jedi-cmake", type=("build")) + depends_on("lapack", when="~mkl") + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run")) + depends_on("mkl", when="+mkl") + depends_on("mpi") + depends_on("netcdf-c") + depends_on("netcdf-fortran") + depends_on("oops", when="+oops") + depends_on("oops+openmp", when="+oops +openmp") + depends_on("oops~openmp", when="+oops ~openmp") + depends_on("oops@1.7.0", when="@1.7.0 +oops") + depends_on("oops@1.8.0", when="@1.8.0 +oops") + depends_on("sp", when="+gsibec") + depends_on("vader", when="+vader") + depends_on("vader@1.4.0", when="@1.7.0 +vader") + depends_on("vader@1.5.0", when="@1.8.0 +vader") def cmake_args(self): res = [ - self.define_from_variant('ENABLE_MKL', 'mkl'), - self.define_from_variant('OPENMP', 'openmp') + self.define_from_variant("ENABLE_MKL", "mkl"), + self.define_from_variant("OPENMP", "openmp"), ] return res # Lapack vs MKL bug. - patch('CMakeLists.txt.patch', when='@1.7:1.8') + patch("CMakeLists.txt.patch", when="@1.7:1.8") # Another Lapack vs MKL bug. If ENABLE_MKL was off, then the saber-import.cmake file had a syntax error. - patch('saber-import.cmake.in.patch', when='@1.7:1.8') + patch("saber-import.cmake.in.patch", when="@1.7:1.8") # JCSDA/saber#22 / JCSDA-internal/saber#652. Fixed in later versions. - patch('quench.src.Fields.cc.patch', when='@1.7') - + patch("quench.src.Fields.cc.patch", when="@1.7") diff --git a/var/spack/repos/jcsda-emc/packages/ufo/package.py b/var/spack/repos/jcsda-emc/packages/ufo/package.py index 3a864e8c512781..57f21f4ace9b25 100644 --- a/var/spack/repos/jcsda-emc/packages/ufo/package.py +++ b/var/spack/repos/jcsda-emc/packages/ufo/package.py @@ -14,62 +14,63 @@ class Ufo(CMakePackage): maintainers = ["climbfuji"] - version('1.8.0', commit='7f7b65bf70e795c4ad02175b606cb18fe5dd4388') - version('1.7.0', commit='1d745701806bd2a3f3d194c9de87ea7ca0a4c2ab') - version('develop', branch='develop', no_cache=True) + version("1.8.0", commit="7f7b65bf70e795c4ad02175b606cb18fe5dd4388") + version("1.7.0", commit="1d745701806bd2a3f3d194c9de87ea7ca0a4c2ab") + version("develop", branch="develop", no_cache=True) - variant('crtm', default=True, description='Build CRTM operator') + variant("crtm", default=True, description="Build CRTM operator") # JCSDA-internal repository needed. - variant('geos-aero', default=False, description='Build GEOS-AERO AOD operator') - variant('gsw', default=True, description='Build marine observation operators') + variant("geos-aero", default=False, description="Build GEOS-AERO AOD operator") + variant("gsw", default=True, description="Build marine observation operators") # JCSDA-internal repository is public, but there is no "release" of the code yet. - variant('oasim', default=False, description='Build with Ocean Atmosphere Spectral Irradiance Model') + variant( + "oasim", default=False, description="Build with Ocean Atmosphere Spectral Irradiance Model" + ) # JCSDA-internal repository needed. - variant('ropp', default=False, description='Build ROPP operator') + variant("ropp", default=False, description="Build ROPP operator") # JCSDA-internal repository needed. - variant('rttov', default=False, description='Build RTTOV operator') - - conflicts('+geos-aero', msg='UFO: GEOS-AERO to be implemented.') - conflicts('+oasim', msg='UFO: OASIM to be implemented.') - conflicts('+ropp', msg='UFO: ROPP to be implemented.') - conflicts('+rttov', msg='UFO: RTTOV to be implemented.') - - depends_on('boost') - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.7.0:') - depends_on('eckit') - depends_on('eckit@1.23.0', when='@1.7:1.8') - depends_on('eigen') - depends_on('fckit') - depends_on('fckit@0.10.1', when='@1.7:1.8') - depends_on('gsl-lite') - depends_on('ioda') - depends_on('ioda@2.6.0', when='@1.7.0') - depends_on('ioda@2.7.0', when='@1.8.0') - depends_on('jedi-cmake', type=('build')) - depends_on('mpi') - depends_on('netcdf-c+mpi') - depends_on('netcdf-fortran') - depends_on('oops') - depends_on('oops@1.7.0', when='@1.7.0') - depends_on('oops@1.8.0', when='@1.8.0') - - depends_on('crtm', when='+crtm') - depends_on('crtm@v3.0.0-skylabv5-1', when='@1.7.0 +crtm') - depends_on('crtm@v3.0.0-skylabv6', when='@1.8.0 +crtm') - - #depends_on('geos-aero', when='+geos-aero') - #depends_on('geos-aero@0.0.0', when='@1.7.0 +geos-aero') - - #depends_on('oasim', when='+oasim') - #depends_on('oasim@0.0.0', when='@1.7.0 +oasim') - - depends_on('gsw', when='+gsw') - depends_on('gsw@3.0.7', when='@1.7.0 +gsw') - - #depends_on('ropp', when='+ropp') - #depends_on('ropp@0.0.0', when='@1.7.0 +ropp') - - #depends_on('rttov', when='+rttov') - #depends_on('rttov@12.1.0', when='@1.7.0 +rttov') - + variant("rttov", default=False, description="Build RTTOV operator") + + conflicts("+geos-aero", msg="UFO: GEOS-AERO to be implemented.") + conflicts("+oasim", msg="UFO: OASIM to be implemented.") + conflicts("+ropp", msg="UFO: ROPP to be implemented.") + conflicts("+rttov", msg="UFO: RTTOV to be implemented.") + + depends_on("boost") + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7.0:") + depends_on("eckit") + depends_on("eckit@1.23.0", when="@1.7:1.8") + depends_on("eigen") + depends_on("fckit") + depends_on("fckit@0.10.1", when="@1.7:1.8") + depends_on("gsl-lite") + depends_on("ioda") + depends_on("ioda@2.6.0", when="@1.7.0") + depends_on("ioda@2.7.0", when="@1.8.0") + depends_on("jedi-cmake", type=("build")) + depends_on("mpi") + depends_on("netcdf-c+mpi") + depends_on("netcdf-fortran") + depends_on("oops") + depends_on("oops@1.7.0", when="@1.7.0") + depends_on("oops@1.8.0", when="@1.8.0") + + depends_on("crtm", when="+crtm") + depends_on("crtm@v3.0.0-skylabv5-1", when="@1.7.0 +crtm") + depends_on("crtm@v3.0.0-skylabv6", when="@1.8.0 +crtm") + + # depends_on('geos-aero', when='+geos-aero') + # depends_on('geos-aero@0.0.0', when='@1.7.0 +geos-aero') + + # depends_on('oasim', when='+oasim') + # depends_on('oasim@0.0.0', when='@1.7.0 +oasim') + + depends_on("gsw", when="+gsw") + depends_on("gsw@3.0.7", when="@1.7.0 +gsw") + + # depends_on('ropp', when='+ropp') + # depends_on('ropp@0.0.0', when='@1.7.0 +ropp') + + # depends_on('rttov', when='+rttov') + # depends_on('rttov@12.1.0', when='@1.7.0 +rttov') diff --git a/var/spack/repos/jcsda-emc/packages/vader/package.py b/var/spack/repos/jcsda-emc/packages/vader/package.py index 1d69ec4bf6ff2f..4925074aa08ef3 100644 --- a/var/spack/repos/jcsda-emc/packages/vader/package.py +++ b/var/spack/repos/jcsda-emc/packages/vader/package.py @@ -14,17 +14,16 @@ class Vader(CMakePackage): maintainers = ["climbfuji"] - version('1.5.0', commit='17173dc97a727e623e4b54ee06e2a0dc71f643de') - version('1.4.0', commit='4264b56111a62ab1339320ad85a7f715b923df47') - version('develop', branch='develop', no_cache=True) - - depends_on('ecbuild', type=('build')) - depends_on('ecbuild@3.3.2:', type=('build'), when='@1.4.0:') - depends_on('jedi-cmake', type=('build')) - depends_on('mpi') - depends_on('netcdf-c+mpi') - depends_on('netcdf-fortran') - depends_on('oops') - depends_on('oops@1.7.0', when='@1.4.0') - depends_on('oops@1.8.0', when='@1.5.0') - + version("1.5.0", commit="17173dc97a727e623e4b54ee06e2a0dc71f643de") + version("1.4.0", commit="4264b56111a62ab1339320ad85a7f715b923df47") + version("develop", branch="develop", no_cache=True) + + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.4.0:") + depends_on("jedi-cmake", type=("build")) + depends_on("mpi") + depends_on("netcdf-c+mpi") + depends_on("netcdf-fortran") + depends_on("oops") + depends_on("oops@1.7.0", when="@1.4.0") + depends_on("oops@1.8.0", when="@1.5.0") From 561f9e15a8ab955ff36587356d5628f8bc866763 Mon Sep 17 00:00:00 2001 From: Ryan Honeyager Date: Tue, 12 Dec 2023 10:57:47 -0500 Subject: [PATCH 4/7] flake8 checks --- .../jcsda-emc/packages/fv3-jedi-linearmodel/package.py | 4 ++-- var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py | 8 ++++---- var/spack/repos/jcsda-emc/packages/oops/package.py | 3 ++- var/spack/repos/jcsda-emc/packages/saber/package.py | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py index ddd34abd53fb88..645ce3ed57d13f 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py @@ -26,8 +26,8 @@ class Fv3JediLinearmodel(CMakePackage): ) # Note that the options for mkl, mpi, and openmp are lazily written in fv3-jedi-linearmodel. # These options just turn on a find_package call. If a package is already found, for example by - # one of the package dependencies, then that component is silently used even if the user toggles - # it off. This is a bug and should be fixed eventually. + # one of the package dependencies, then that component is silently used even if the user + # toggles it off. This is a bug and should be fixed eventually. variant("mkl", default=False, description="Use MKL for LAPACK implementation (if available)") variant("mpi", default=True, description="Support for MPI distributed parallelism") variant("openmp", default=True, description="Build with OpenMP support") diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py index 61fd8abbe0475f..30567ede891373 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py @@ -28,8 +28,8 @@ class Fv3Jedi(CMakePackage): variant("gsibec", default=True, description="FV3-SABER block GSI") # Note that the option for openmp is lazily written in fv3-jedi. # It just enables a find_package call. If a package is already found, for example by - # one of the package dependencies, then that component is silently used even if the user toggles - # it off. This is a bug and should be fixed eventually. + # one of the package dependencies, then that component is silently used even if the user + # toggles it off. This is a bug and should be fixed eventually. variant("openmp", default=True, description="Build with OpenMP support") variant("ropp", default=False, description="Enable usage of ropp") variant("sp", default=True, description="Enable usage of ncep-sp") @@ -88,8 +88,8 @@ def cmake_args(self): # find_package(ecbuild REQUIRED) is needed when using ecbuild. patch("CMakeLists.txt.patch", when="@1.6:1.7") - # fv3-jedi is improperly including git_functions.cmake by searching for an environment variable. - # It should instead use the jedicmake_FUNCTIONS variable, which is deliberately exported by jedi-cmake. + # fv3-jedi is improperly including git_functions.cmake via an environment variable. + # It should instead use the jedicmake_FUNCTIONS variable, which is exported by jedi-cmake. patch("test.CMakeLists.txt.patch", when="@1.6:1.7") # fv3-jedi depends on these macros that are defined (and not exported) in ufo. patch("cmake.fv3jedi_extra_macros.cmake.patch", when="@1.6:1.7") diff --git a/var/spack/repos/jcsda-emc/packages/oops/package.py b/var/spack/repos/jcsda-emc/packages/oops/package.py index 699ddf4546a99b..2b85464b216f94 100644 --- a/var/spack/repos/jcsda-emc/packages/oops/package.py +++ b/var/spack/repos/jcsda-emc/packages/oops/package.py @@ -22,7 +22,8 @@ class Oops(CMakePackage): variant("mkl", default=False, description="Use MKL for LAPACK implementation (if available)") variant("openmp", default=True, description="Build oops with OpenMP support") variant("qg", default=True, description="Build QG toy model") - # variant('autoprofiling', default=False, description='Enable function-based autoprofiling with GPTL (if available)') + # variant('autoprofiling', default=False, + # description='Enable function-based autoprofiling with GPTL (if available)') # variant('gptl', default=False, description='Use GPTL profiling library (if available)') depends_on("boost@1.64:") diff --git a/var/spack/repos/jcsda-emc/packages/saber/package.py b/var/spack/repos/jcsda-emc/packages/saber/package.py index b787a461a7a482..3f2fee2169e2da 100644 --- a/var/spack/repos/jcsda-emc/packages/saber/package.py +++ b/var/spack/repos/jcsda-emc/packages/saber/package.py @@ -62,7 +62,8 @@ def cmake_args(self): # Lapack vs MKL bug. patch("CMakeLists.txt.patch", when="@1.7:1.8") - # Another Lapack vs MKL bug. If ENABLE_MKL was off, then the saber-import.cmake file had a syntax error. + # Another Lapack vs MKL bug. If ENABLE_MKL was off, then the + # saber-import.cmake file had a syntax error. patch("saber-import.cmake.in.patch", when="@1.7:1.8") # JCSDA/saber#22 / JCSDA-internal/saber#652. Fixed in later versions. patch("quench.src.Fields.cc.patch", when="@1.7") From 93a01d927e2372807556e128eb5df6eff0ba611c Mon Sep 17 00:00:00 2001 From: Ryan Honeyager Date: Wed, 24 Jan 2024 15:09:38 -0500 Subject: [PATCH 5/7] Updating through fv3-jedi to SkyLab v7 --- .../repos/builtin/packages/crtm/package.py | 8 ++- .../builtin/packages/ecmwf-atlas/package.py | 2 + .../packages/fv3-jedi-linearmodel/package.py | 7 +-- ...ists.txt.patch => CMakeLists.txt.16.patch} | 0 .../packages/fv3-jedi/CMakeLists.txt.18.patch | 20 +++++++ .../jcsda-emc/packages/fv3-jedi/package.py | 52 ++++++++++++------- .../repos/jcsda-emc/packages/ioda/package.py | 14 +++-- .../repos/jcsda-emc/packages/oops/package.py | 6 ++- .../repos/jcsda-emc/packages/saber/package.py | 13 +++-- .../repos/jcsda-emc/packages/ufo/package.py | 10 ++-- .../repos/jcsda-emc/packages/vader/package.py | 5 ++ 11 files changed, 101 insertions(+), 36 deletions(-) rename var/spack/repos/jcsda-emc/packages/fv3-jedi/{CMakeLists.txt.patch => CMakeLists.txt.16.patch} (100%) create mode 100644 var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.18.patch diff --git a/var/spack/repos/builtin/packages/crtm/package.py b/var/spack/repos/builtin/packages/crtm/package.py index b9cecbb5a5160e..dc78b263ce8df2 100644 --- a/var/spack/repos/builtin/packages/crtm/package.py +++ b/var/spack/repos/builtin/packages/crtm/package.py @@ -38,6 +38,7 @@ class Crtm(CMakePackage): depends_on("netcdf-fortran", when="@v3.0.0-skylabv5") depends_on("netcdf-fortran", when="@v3.0.0-skylabv5-1") depends_on("netcdf-fortran", when="@v3.0.0-skylabv6") + depends_on("netcdf-fortran", when="@v3.1.0-skylabv7") depends_on("crtm-fix@2.3.0_emc", when="@2.3.0 +fix") depends_on("crtm-fix@2.4.0_emc", when="@=2.4.0 +fix") @@ -51,10 +52,14 @@ class Crtm(CMakePackage): depends_on("ecbuild", type=("build"), when="@v3.0.0-skylabv5") depends_on("ecbuild", type=("build"), when="@v3.0.0-skylabv5-1") depends_on("ecbuild", type=("build"), when="@v3.0.0-skylabv6") + depends_on("ecbuild", type=("build"), when="@v3.1.0-skylabv7") # Spack gets confused by the different repository url, so we use direct URLs here. - # version("v3.0.0-skylabv6", commit="a31ed458fb702b235bccbe1693d2badffb241d05") + version( + "v3.1.0-skylabv7", + url="https://www.github.com/JCSDA/crtmv3/tarball/90d52eec1f97bb5a098c9834c4499a17de4ff35b", + sha256="0751ddad9a0304e62902a11faa1e693b84ad2b338512f8d2c1a03e5cc573a947") version( "v3.0.0-skylabv6", url="https://www.github.com/JCSDA/crtmv3/tarball/a31ed458fb702b235bccbe1693d2badffb241d05", @@ -62,7 +67,6 @@ class Crtm(CMakePackage): ) # Slightly after the Skylab 5 release to fix https://github.com/JCSDA/CRTMv3/pull/48. - # TODO: Push for a distinct tag in the CRTMv3 repository. version( "v3.0.0-skylabv5-1", url="https://www.github.com/JCSDA/crtmv3/tarball/d15810f5538d4cf041e94ebfbb41b403d82bed13", diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py index 3bac653899b5fc..2d1c786c9b25c1 100644 --- a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py +++ b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py @@ -20,6 +20,7 @@ class EcmwfAtlas(CMakePackage): version("master", branch="master") version("develop", branch="develop") + version("0.36.0", sha256="39bf748aa7b22df80b9791fbb6b4351ed9a9f85587b58fc3225314278a2a68f8") version("0.35.1", sha256="7a344aaa8a1378d989a7bb883eb741852c5fa494630be6d8c88e477e4b9c5be1") version("0.35.0", sha256="5a4f898ffb4a33c738b6f86e4e2a4c8e26dfd56d3c3399018081487374e29e97") version("0.34.0", sha256="48536742cec0bc268695240843ac0e232e2b5142d06b19365688d9ea44dbd9ba") @@ -29,6 +30,7 @@ class EcmwfAtlas(CMakePackage): version("0.31.0", sha256="fa4ff8665544b8e19f79d171c540a9ca8bfc4127f52a3c4d4d618a2fe23354d7") depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.4:", type=("build"), when="@0.36.0:") depends_on("eckit@:1.23", when="@:0.33") depends_on("eckit@1.24:", when="@0.34:") depends_on("boost cxxstd=14 visibility=hidden", when="@0.26.0:0.33.99", type=("build", "run")) diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py index 645ce3ed57d13f..08d19cf42e0098 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi-linearmodel/package.py @@ -14,6 +14,7 @@ class Fv3JediLinearmodel(CMakePackage): maintainers = ["climbfuji"] + version("1.4.0", commit="05cc1ae63252ca535f3db0fdca9a8a996329fc8f") version("1.3.0", commit="9758fbd44166fc1e1d745ca9ab7e9e5e6071955f") version("1.2.0", commit="d47cea97c659e8a11e9e64c23092bef06227ebde") version("develop", branch="develop", no_cache=True) @@ -41,7 +42,7 @@ class Fv3JediLinearmodel(CMakePackage): depends_on("fms@release-jcsda", when="forecast_model=UFS") depends_on("jedi-cmake", type=("build")) depends_on("lapack", when="~mkl") - depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run")) + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "link", "run")) depends_on("mkl", when="+mkl") depends_on("mpi", when="+mpi") depends_on("netcdf-fortran") @@ -66,6 +67,6 @@ def cmake_args(self): return res # find_package(ecbuild REQUIRED) is needed when using ecbuild. - patch("CMakeLists.txt.patch", when="@1.2:1.3") + patch("CMakeLists.txt.patch", when="@1.2:1.4") # fv3-jedi-linearmodel needs to install its Fortran modules. - patch("src.CMakeLists.txt.patch", when="@1.2:1.3") + patch("src.CMakeLists.txt.patch", when="@1.2:1.4") diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.16.patch similarity index 100% rename from var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.patch rename to var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.16.patch diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.18.patch b/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.18.patch new file mode 100644 index 00000000000000..57e1f06cc4eba9 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/CMakeLists.txt.18.patch @@ -0,0 +1,20 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,8 @@ set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}) + + set( CMAKE_DIRECTORY_LABELS "fv3-jedi" ) + ++find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild) ++ + set( ECBUILD_DEFAULT_BUILD_TYPE Release ) + set( ENABLE_OS_TESTS OFF CACHE BOOL "Disable OS tests" FORCE ) + set( ENABLE_LARGE_FILE_SUPPORT OFF CACHE BOOL "Disable testing of large file support" FORCE ) +@@ -217,7 +219,7 @@ if (FV3_FORECAST_MODEL MATCHES UFS) + endif() + + add_subdirectory( src ) +-add_subdirectory( test ) ++#add_subdirectory( test ) + + if( ENABLE_FV3JEDI_DOC ) + add_subdirectory( Documents ) diff --git a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py index 30567ede891373..314bfae3e4075f 100644 --- a/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py +++ b/var/spack/repos/jcsda-emc/packages/fv3-jedi/package.py @@ -15,6 +15,7 @@ class Fv3Jedi(CMakePackage): maintainers = ["climbfuji"] version("develop", branch="develop", no_cache=True) + version("1.8.0", commit="8a4974fa03b7abd267497313cd765fed08bc2623") version("1.7.0", commit="75fa0544ae7c6b5446460bef8cb7663f3fe1acad") version("1.6.0", commit="3c20ebd2657d4b8df35103207a1e83535b67469c") @@ -42,13 +43,15 @@ class Fv3Jedi(CMakePackage): # Required components depends_on("crtm") - depends_on("crtm@2.2.3:", when="@:1.5.0") - depends_on("crtm@v3.0.0-skylabv5-1", when="@1.6.0") - depends_on("crtm@v3.0.0-skylabv6", when="@1.7.0") + depends_on("crtm@2.2.3:", when="@:1.5") + depends_on("crtm@v3.0.0-skylabv5-1", when="@1.6") + depends_on("crtm@v3.0.0-skylabv6", when="@1.7") + depends_on("crtm@v3.1.0-skylabv7", when="@1.8") depends_on("ecbuild", type=("build")) - depends_on("ecbuild@3.3.2:", type=("build"), when="@1.6.0") + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.6:") depends_on("ecmwf-atlas") - depends_on("ecmwf-atlas@0.33.0", when="@1.6.0") + depends_on("ecmwf-atlas@0.33.0", when="@1.6:1.7") + depends_on("ecmwf-atlas@0.35.0:", when="@1.8:") depends_on("femps@1.0.0:") depends_on("jedi-cmake", type=("build")) depends_on("mpi") @@ -57,26 +60,33 @@ class Fv3Jedi(CMakePackage): depends_on("netcdf-fortran") depends_on("netcdf-c+mpi") depends_on("oops") - depends_on("oops@1.7.0", when="@1.6.0") - depends_on("oops@1.8.0", when="@1.7.0") + depends_on("oops@1.7", when="@1.6") + depends_on("oops@1.8", when="@1.7") + depends_on("oops@1.9:", when="@1.8") depends_on("saber") - depends_on("saber@1.7.0", when="@1.6.0") - depends_on("saber@1.8.0", when="@1.7.0") + depends_on("saber@1.7", when="@1.6") + depends_on("saber@1.8", when="@1.7") + depends_on("saber@1.9", when="@1.8") depends_on("ufo") - depends_on("ufo@1.7.0", when="@1.6.0") - depends_on("ufo@1.8.0", when="@1.7.0") + depends_on("ufo@1.7", when="@1.6") + depends_on("ufo@1.8", when="@1.7") + depends_on("ufo@1.9", when="@1.8") depends_on("vader") - depends_on("vader@1.4.0", when="@1.6.0") - depends_on("vader@1.5.0", when="@1.7.0") + depends_on("vader@1.4", when="@1.6") + depends_on("vader@1.5", when="@1.7") + depends_on("vader@1.6", when="@1.8") - depends_on("fms", when="forecast_model=FV3CORE") - depends_on("fv3-jedi-linearmodel@1.0.0:", when="forecast_model=FV3CORE") + depends_on("fms@release-jcsda", when="forecast_model=FV3CORE") + depends_on("fv3-jedi-linearmodel", when="forecast_model=FV3CORE") + depends_on("fv3-jedi-linearmodel@1.2", when="@1.6 forecast_model=FV3CORE") + depends_on("fv3-jedi-linearmodel@1.3", when="@1.7 forecast_model=FV3CORE") + depends_on("fv3-jedi-linearmodel@1.4", when="@1.8 forecast_model=FV3CORE") # Optional components depends_on("GFDL_atmos_cubed_sphere", when="forecast_model=FV3CORE") depends_on("gsibec", when="+gsibec") - depends_on("gsibec@1.1.2:", when="@1.6:1.7 +gsibec") - depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run")) + depends_on("gsibec@1.1.2:", when="@1.6: +gsibec") + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "link", "run")) depends_on("sp", when="+sp") def cmake_args(self): @@ -87,9 +97,13 @@ def cmake_args(self): return res # find_package(ecbuild REQUIRED) is needed when using ecbuild. - patch("CMakeLists.txt.patch", when="@1.6:1.7") + patch("CMakeLists.txt.16.patch", when="@1.6:1.7") + # Same as above (different line numbers), and addressing a missing UFO + # variable by disabling tests. + patch("CMakeLists.txt.18.patch", when="@1.8") # fv3-jedi is improperly including git_functions.cmake via an environment variable. # It should instead use the jedicmake_FUNCTIONS variable, which is exported by jedi-cmake. + # Addressed by fv3-jedi test refactoring that occurred after the v1.7 release. patch("test.CMakeLists.txt.patch", when="@1.6:1.7") # fv3-jedi depends on these macros that are defined (and not exported) in ufo. - patch("cmake.fv3jedi_extra_macros.cmake.patch", when="@1.6:1.7") + patch("cmake.fv3jedi_extra_macros.cmake.patch", when="@1.6:1.8") diff --git a/var/spack/repos/jcsda-emc/packages/ioda/package.py b/var/spack/repos/jcsda-emc/packages/ioda/package.py index fc7b59ac470439..5bddc74c1209df 100644 --- a/var/spack/repos/jcsda-emc/packages/ioda/package.py +++ b/var/spack/repos/jcsda-emc/packages/ioda/package.py @@ -14,6 +14,7 @@ class Ioda(CMakePackage): maintainers = ["climbfuji"] + version("2.8.0", commit="1ee94a863d1fc8c2752e5b95409d6742f4402f5b") version("2.7.0", commit="ee35b7f7f859b78e823b69d72b4bc230b15f3d46") version("2.6.0", commit="26abb62ca8d30cc7b84303c4d780f0f253b287c9") version("develop", branch="develop", no_cache=True) @@ -29,21 +30,24 @@ class Ioda(CMakePackage): depends_on("boost@1.64.0:") depends_on("ecbuild", type=("build")) depends_on("eckit") - depends_on("eckit@1.23.0", when="@2.6.0:") + depends_on("eckit@1.23.0:", when="@2.6:") depends_on("eigen") depends_on("fckit") - depends_on("fckit@0.10.1", when="@2.6.0:") + depends_on("fckit@0.10.1:", when="@2.6:") depends_on("gsl-lite") depends_on("hdf5@1.12.0: +mpi") depends_on("hdf5@1.14.0: +mpi", when="@2.6.0:") depends_on("jedi-cmake", type=("build")) + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "link", "run")) depends_on("mpi") depends_on("odc", when="+odc") - depends_on("odc@1.0.2:", when="@2.6.0: +odc") + depends_on("odc@1.0.2:", when="@2.6: +odc") + depends_on("odc@1.4.6:", when="@2.8: +odc") depends_on("oops+openmp", when="+openmp") depends_on("oops~openmp", when="~openmp") - depends_on("oops@1.7.0", when="@2.6.0") - depends_on("oops@1.8.0", when="@2.7.0") + depends_on("oops@1.7", when="@2.6") + depends_on("oops@1.8", when="@2.7") + depends_on("oops@1.9", when="@2.8:") depends_on("python@3.7:") depends_on("py-pybind11") depends_on("udunits@2.2.0:") diff --git a/var/spack/repos/jcsda-emc/packages/oops/package.py b/var/spack/repos/jcsda-emc/packages/oops/package.py index 2b85464b216f94..aa3b21903e5f24 100644 --- a/var/spack/repos/jcsda-emc/packages/oops/package.py +++ b/var/spack/repos/jcsda-emc/packages/oops/package.py @@ -14,6 +14,7 @@ class Oops(CMakePackage): maintainers = ["climbfuji"] + version("1.9.1", commit="60f93924fe446714fcb04d96f6930a760db74b23") version("1.8.0", commit="d9c7c74e4597172bf8a69d8585df5ad6d0112e0c") version("1.7.0", commit="2426c2040e9ae138c4bf8362cacca84d66bd64bf") version("develop", branch="develop", no_cache=True) @@ -31,21 +32,24 @@ class Oops(CMakePackage): depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7:1.8") depends_on("eckit") depends_on("eckit@1.23.0", when="@1.7:1.8") + depends_on("eckit@1.24.4:", when="@1.9:") depends_on("ecmwf-atlas") depends_on("ecmwf-atlas@0.33.0", when="@1.7:1.8") + depends_on("ecmwf-atlas@0.35.0:", when="@1.9:") depends_on("eigen") depends_on("fckit") depends_on("fckit@0.10.1", when="@1.7:1.8") + depends_on("fckit@0.11.0:", when="@1.9:") # depends_on('gptl', when='+gptl') depends_on("jedi-cmake", type=("build")) depends_on("lapack", when="~mkl") + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "link", "run")) depends_on("mkl", when="+mkl") depends_on("mpi") depends_on("netcdf-c+mpi") depends_on("netcdf-fortran") depends_on("nlohmann-json") depends_on("nlohmann-json-schema-validator") - depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run")) def cmake_args(self): res = [ diff --git a/var/spack/repos/jcsda-emc/packages/saber/package.py b/var/spack/repos/jcsda-emc/packages/saber/package.py index 3f2fee2169e2da..919563d1f368e1 100644 --- a/var/spack/repos/jcsda-emc/packages/saber/package.py +++ b/var/spack/repos/jcsda-emc/packages/saber/package.py @@ -14,6 +14,7 @@ class Saber(CMakePackage): maintainers = ["climbfuji"] + version("1.9.0", commit="767f6a9a1778e34d58a7cfc55f1d6d499ce2f6ea") version("1.8.0", commit="de99a5a8130e230e8bb14785f6e3133d7da047b8") version("1.7.0", commit="d90ce5276b37552d569fcb72a22b5a30fb03de75") version("develop", branch="develop", no_cache=True) @@ -28,17 +29,21 @@ class Saber(CMakePackage): depends_on("ecbuild@3.3.2:", type=("build"), when="@1.4.0:") depends_on("eckit") depends_on("eckit@1.23.0", when="@1.7:1.8") + depends_on("eckit@1.24.4:", when="@1.9:") depends_on("ecmwf-atlas") depends_on("ecmwf-atlas@0.33.0", when="@1.7:1.8") + depends_on("ecmwf-atlas@0.35:", when="@1.9:") depends_on("ecmwf-atlas+openmp", when="+openmp") depends_on("ecmwf-atlas~openmp", when="~openmp") depends_on("fckit") depends_on("fckit@0.10.1", when="@1.7:1.8") + depends_on("fckit@0.11:", when="@1.9:") depends_on("gsibec", when="+gsibec") depends_on("gsibec@1.1.2", when="@1.7:1.8 +gsibec") + depends_on("gsibec@1.1.3", when="@1.9: +gsibec") depends_on("jedi-cmake", type=("build")) depends_on("lapack", when="~mkl") - depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run")) + depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "link", "run")) depends_on("mkl", when="+mkl") depends_on("mpi") depends_on("netcdf-c") @@ -48,10 +53,12 @@ class Saber(CMakePackage): depends_on("oops~openmp", when="+oops ~openmp") depends_on("oops@1.7.0", when="@1.7.0 +oops") depends_on("oops@1.8.0", when="@1.8.0 +oops") + depends_on("oops@1.9", when="@1.9 +oops") depends_on("sp", when="+gsibec") depends_on("vader", when="+vader") depends_on("vader@1.4.0", when="@1.7.0 +vader") depends_on("vader@1.5.0", when="@1.8.0 +vader") + depends_on("vader@1.6", when="@1.9 +vader") def cmake_args(self): res = [ @@ -61,9 +68,9 @@ def cmake_args(self): return res # Lapack vs MKL bug. - patch("CMakeLists.txt.patch", when="@1.7:1.8") + patch("CMakeLists.txt.patch", when="@1.7:1.9") # Another Lapack vs MKL bug. If ENABLE_MKL was off, then the # saber-import.cmake file had a syntax error. - patch("saber-import.cmake.in.patch", when="@1.7:1.8") + patch("saber-import.cmake.in.patch", when="@1.7:1.9") # JCSDA/saber#22 / JCSDA-internal/saber#652. Fixed in later versions. patch("quench.src.Fields.cc.patch", when="@1.7") diff --git a/var/spack/repos/jcsda-emc/packages/ufo/package.py b/var/spack/repos/jcsda-emc/packages/ufo/package.py index 57f21f4ace9b25..5be6e9fca601ae 100644 --- a/var/spack/repos/jcsda-emc/packages/ufo/package.py +++ b/var/spack/repos/jcsda-emc/packages/ufo/package.py @@ -14,6 +14,7 @@ class Ufo(CMakePackage): maintainers = ["climbfuji"] + version("1.9.0", commit="e41a1c928150944795ed1276c84c4f1e37a47c99") version("1.8.0", commit="7f7b65bf70e795c4ad02175b606cb18fe5dd4388") version("1.7.0", commit="1d745701806bd2a3f3d194c9de87ea7ca0a4c2ab") version("develop", branch="develop", no_cache=True) @@ -40,14 +41,15 @@ class Ufo(CMakePackage): depends_on("ecbuild", type=("build")) depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7.0:") depends_on("eckit") - depends_on("eckit@1.23.0", when="@1.7:1.8") + depends_on("eckit@1.23.0:", when="@1.7:") depends_on("eigen") depends_on("fckit") - depends_on("fckit@0.10.1", when="@1.7:1.8") + depends_on("fckit@0.10.1:", when="@1.7:") depends_on("gsl-lite") depends_on("ioda") depends_on("ioda@2.6.0", when="@1.7.0") depends_on("ioda@2.7.0", when="@1.8.0") + depends_on("ioda@2.8", when="@1.9") depends_on("jedi-cmake", type=("build")) depends_on("mpi") depends_on("netcdf-c+mpi") @@ -55,10 +57,12 @@ class Ufo(CMakePackage): depends_on("oops") depends_on("oops@1.7.0", when="@1.7.0") depends_on("oops@1.8.0", when="@1.8.0") + depends_on("oops@1.9.1:1.9", when="@1.9") depends_on("crtm", when="+crtm") depends_on("crtm@v3.0.0-skylabv5-1", when="@1.7.0 +crtm") depends_on("crtm@v3.0.0-skylabv6", when="@1.8.0 +crtm") + depends_on("crtm@v3.1.0-skylabv7", when="@1.9 +crtm") # depends_on('geos-aero', when='+geos-aero') # depends_on('geos-aero@0.0.0', when='@1.7.0 +geos-aero') @@ -67,7 +71,7 @@ class Ufo(CMakePackage): # depends_on('oasim@0.0.0', when='@1.7.0 +oasim') depends_on("gsw", when="+gsw") - depends_on("gsw@3.0.7", when="@1.7.0 +gsw") + depends_on("gsw@3.0.7", when="@1.7: +gsw") # depends_on('ropp', when='+ropp') # depends_on('ropp@0.0.0', when='@1.7.0 +ropp') diff --git a/var/spack/repos/jcsda-emc/packages/vader/package.py b/var/spack/repos/jcsda-emc/packages/vader/package.py index 4925074aa08ef3..9a8fc50eac3e23 100644 --- a/var/spack/repos/jcsda-emc/packages/vader/package.py +++ b/var/spack/repos/jcsda-emc/packages/vader/package.py @@ -14,12 +14,16 @@ class Vader(CMakePackage): maintainers = ["climbfuji"] + version("1.6.0", commit="3d90d96a04a58ea194323894bb392fb2fd0d9a76") version("1.5.0", commit="17173dc97a727e623e4b54ee06e2a0dc71f643de") version("1.4.0", commit="4264b56111a62ab1339320ad85a7f715b923df47") version("develop", branch="develop", no_cache=True) + variant("gsw", default=True, description="Build gsw recipes") + depends_on("ecbuild", type=("build")) depends_on("ecbuild@3.3.2:", type=("build"), when="@1.4.0:") + depends_on("gsw", when="+gsw @1.6:") depends_on("jedi-cmake", type=("build")) depends_on("mpi") depends_on("netcdf-c+mpi") @@ -27,3 +31,4 @@ class Vader(CMakePackage): depends_on("oops") depends_on("oops@1.7.0", when="@1.4.0") depends_on("oops@1.8.0", when="@1.5.0") + depends_on("oops@1.9:", when="@1.6:") From c812238e98bd5c9c678d2b98203f2aa9b98e22f4 Mon Sep 17 00:00:00 2001 From: Ryan Honeyager Date: Wed, 24 Jan 2024 15:12:40 -0500 Subject: [PATCH 6/7] Adding soca to spack build. --- .../repos/jcsda-emc/packages/mom6/package.py | 29 +++++++++ .../repos/jcsda-emc/packages/soca/package.py | 59 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 var/spack/repos/jcsda-emc/packages/mom6/package.py create mode 100644 var/spack/repos/jcsda-emc/packages/soca/package.py diff --git a/var/spack/repos/jcsda-emc/packages/mom6/package.py b/var/spack/repos/jcsda-emc/packages/mom6/package.py new file mode 100644 index 00000000000000..b84e1d2ecd3f3e --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/mom6/package.py @@ -0,0 +1,29 @@ +# 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 * + + +class Mom6(CMakePackage): + """Modular ocean model""" + + homepage = "https://www.jcsda.org/jcsda-project-soca" + git = "https://github.com/JCSDA/MOM6.git" + + maintainers = ["climbfuji"] + + version("2022.1.0", commit="51ec489ad7d8a86762bef4c46eabd9af5fc41fa4", submodules=True) + version("develop", branch="develop", submodules=True) + version("master", branch="master", submodules=True) + + depends_on("ecbuild", type=("build")) + depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7.0:") + #depends_on("fms@2020.4.0:") + depends_on("fms@release-jcsda") + depends_on("gsw@3.0.5:") + depends_on("llvm-openmp", when="%apple-clang", type=("build", "link", "run")) + depends_on("mpi") + depends_on("netcdf-c") + depends_on("netcdf-fortran") diff --git a/var/spack/repos/jcsda-emc/packages/soca/package.py b/var/spack/repos/jcsda-emc/packages/soca/package.py new file mode 100644 index 00000000000000..8fce7d24a5d483 --- /dev/null +++ b/var/spack/repos/jcsda-emc/packages/soca/package.py @@ -0,0 +1,59 @@ +# 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 * + + +class Soca(CMakePackage): + """Sea-Ice Ocean and Coupled Assimilation""" + + homepage = "https://www.jcsda.org/jcsda-project-soca" + git = "https://github.com/JCSDA/soca.git" + + maintainers = ["climbfuji"] + + variant("icepack", default=False, description="Build with icepack support") + + conflicts("+icepack", msg="SOCA: icepack to be implemented.") + + version("1.7.0", commit="5783fd72ace301b07a9c264595c82c31e7e872b6") + version("1.6.0", commit="fc4677b5971e555a6859a5e98f646e660d22d0c9") + version("1.5.0", commit="27d53e07a055f2ce0695018c6f76b0ba3e4b20e7") + version("develop", branch="develop") + version("master", branch="master") + + depends_on("ecmwf-atlas@0.35:") + depends_on("ecbuild@3.3.2:", type=("build")) + depends_on("eckit@1.23.0:") + depends_on("fckit@0.10.1:") + depends_on("fms@release-jcsda") + depends_on("gsl-lite") + depends_on("ioda") + depends_on("ioda@2.6.0", when="@1.5") + depends_on("ioda@2.7.0", when="@1.6") + depends_on("ioda@2.8.0", when="@1.7") + depends_on("jedi-cmake", type=("build")) + depends_on("mom6@2020.4.0:") + depends_on("mpi") + depends_on("netcdf-c") + depends_on("netcdf-fortran") + depends_on("oops") + depends_on("oops@1.7", when="@1.5") + depends_on("oops@1.8", when="@1.6") + depends_on("oops@1.9.1:1.9", when="@1.7") + depends_on("saber") + depends_on("saber@1.7", when="@1.5") + depends_on("saber@1.8", when="@1.6") + depends_on("saber@1.9", when="@1.7") + depends_on("ufo") + depends_on("ufo@1.7", when="@1.5") + depends_on("ufo@1.8", when="@1.6") + depends_on("ufo@1.9", when="@1.7") + depends_on("vader") + depends_on("vader@1.4", when="@1.5") + depends_on("vader@1.5", when="@1.6") + depends_on("vader@1.6", when="@1.7") + + #depends_on("icepack", when="+icepack") From a965a72c767e9c88ddeaeb783eab644263e72bd9 Mon Sep 17 00:00:00 2001 From: Ryan Honeyager Date: Wed, 24 Jan 2024 15:24:53 -0500 Subject: [PATCH 7/7] black formatting --- var/spack/repos/builtin/packages/crtm/package.py | 3 ++- var/spack/repos/jcsda-emc/packages/mom6/package.py | 2 +- var/spack/repos/jcsda-emc/packages/soca/package.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/crtm/package.py b/var/spack/repos/builtin/packages/crtm/package.py index dc78b263ce8df2..55479f4bfd3708 100644 --- a/var/spack/repos/builtin/packages/crtm/package.py +++ b/var/spack/repos/builtin/packages/crtm/package.py @@ -59,7 +59,8 @@ class Crtm(CMakePackage): version( "v3.1.0-skylabv7", url="https://www.github.com/JCSDA/crtmv3/tarball/90d52eec1f97bb5a098c9834c4499a17de4ff35b", - sha256="0751ddad9a0304e62902a11faa1e693b84ad2b338512f8d2c1a03e5cc573a947") + sha256="0751ddad9a0304e62902a11faa1e693b84ad2b338512f8d2c1a03e5cc573a947", + ) version( "v3.0.0-skylabv6", url="https://www.github.com/JCSDA/crtmv3/tarball/a31ed458fb702b235bccbe1693d2badffb241d05", diff --git a/var/spack/repos/jcsda-emc/packages/mom6/package.py b/var/spack/repos/jcsda-emc/packages/mom6/package.py index b84e1d2ecd3f3e..593410d6d64f36 100644 --- a/var/spack/repos/jcsda-emc/packages/mom6/package.py +++ b/var/spack/repos/jcsda-emc/packages/mom6/package.py @@ -20,7 +20,7 @@ class Mom6(CMakePackage): depends_on("ecbuild", type=("build")) depends_on("ecbuild@3.3.2:", type=("build"), when="@1.7.0:") - #depends_on("fms@2020.4.0:") + # depends_on("fms@2020.4.0:") depends_on("fms@release-jcsda") depends_on("gsw@3.0.5:") depends_on("llvm-openmp", when="%apple-clang", type=("build", "link", "run")) diff --git a/var/spack/repos/jcsda-emc/packages/soca/package.py b/var/spack/repos/jcsda-emc/packages/soca/package.py index 8fce7d24a5d483..89e05e6d310ad2 100644 --- a/var/spack/repos/jcsda-emc/packages/soca/package.py +++ b/var/spack/repos/jcsda-emc/packages/soca/package.py @@ -56,4 +56,4 @@ class Soca(CMakePackage): depends_on("vader@1.5", when="@1.6") depends_on("vader@1.6", when="@1.7") - #depends_on("icepack", when="+icepack") + # depends_on("icepack", when="+icepack")