From 2969baa2be5015507f84ace7095decee99467c88 Mon Sep 17 00:00:00 2001 From: Jong Kim Date: Mon, 17 Apr 2023 14:18:59 +0000 Subject: [PATCH 01/19] add ufswm build option as external --- CMakeLists.txt | 18 +++++++++++ modulefiles/ufs_common.lua | 59 ++++++++++++++++++++++++++++++++++ modulefiles/ufs_hera.intel.lua | 33 +++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 modulefiles/ufs_common.lua create mode 100644 modulefiles/ufs_hera.intel.lua diff --git a/CMakeLists.txt b/CMakeLists.txt index dc2bdbb9..affc3a9e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,14 @@ enable_testing() include( ecbuild_system NO_POLICY_SCOPE ) ecbuild_declare_project() +# Inlcude externalproject +# ----------------------- +include(ExternalProject) + +# Initialize bundle +# ----------------- +ecbuild_bundle_initialize() + list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) include( landda_compiler_flags ) @@ -36,6 +44,16 @@ include_directories( ${NETCDF_INCLUDE_DIRS} ) ################################################################################ set( LANDDA_LINKER_LANGUAGE CXX) +ExternalProject_Add(ufs-weather-model + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ufs-weather-model + GIT_REPOSITORY https://github.com/ufs-community/ufs-weather-model + GIT_SUBMODULES_RECURSE TRUE + GIT_TAG develop + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ufs-weather-model + CMAKE_ARGS ${SOURCE_DIR} -DAPP=LND -DMPI=ON -DCMAKE_BUILD_TYPE=Release + INSTALL_COMMAND cmake + ) + add_subdirectory( vector2tile ) add_subdirectory( ufs-land-driver ) add_subdirectory( DA_update/add_jedi_incr ) diff --git a/modulefiles/ufs_common.lua b/modulefiles/ufs_common.lua new file mode 100644 index 00000000..22109f8d --- /dev/null +++ b/modulefiles/ufs_common.lua @@ -0,0 +1,59 @@ +help([[ +loads UFS Model common libraries +]]) + +jasper_ver=os.getenv("jasper_ver") or "2.0.32" +load(pathJoin("jasper", jasper_ver)) + +zlib_ver=os.getenv("zlib_ver") or "1.2.13" +load(pathJoin("zlib", zlib_ver)) + +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) + +hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" +load(pathJoin("hdf5", hdf5_ver)) + +netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.0" +load(pathJoin("netcdf-c", netcdf_c_ver)) + +netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" +load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) + +pio_ver=os.getenv("pio_ver") or "2.5.9" +load(pathJoin("parallelio", pio_ver)) + +esmf_ver=os.getenv("esmf_ver") or "8.3.0b09" +load(pathJoin("esmf", esmf_ver)) + +fms_ver=os.getenv("fms_ver") or "2022.04" +load(pathJoin("fms",fms_ver)) + +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) + +crtm_ver=os.getenv("crtm_ver") or "2.4.0" +load(pathJoin("crtm", crtm_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) + +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2" +load(pathJoin("g2tmpl", g2tmpl_ver)) + +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) + +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) + +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +gftl_shared_ver=os.getenv("gftl_shared_ver") or "v1.5.0" +load(pathJoin("gftl-shared", gftl_shared_ver)) + +mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09" +load(pathJoin("mapl", mapl_ver)) + +whatis("Description: UFS build environment common libraries") diff --git a/modulefiles/ufs_hera.intel.lua b/modulefiles/ufs_hera.intel.lua new file mode 100644 index 00000000..3accf3f8 --- /dev/null +++ b/modulefiles/ufs_hera.intel.lua @@ -0,0 +1,33 @@ +help([[ +loads UFS Model prerequisites for Hera/Intel +]]) + +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +stack_python_ver=os.getenv("stack_python_ver") or "3.9.12" +load(pathJoin("stack-python", stack_python_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5" +load(pathJoin("ecbuild", ecbuild_ver)) + +load("ufs_common") + +setenv("CC", "mpiicc") +setenv("CXX", "mpiicpc") +setenv("FC", "mpiifort") +setenv("CMAKE_Platform", "hera.intel") + +setenv("EPICHOME", "/scratch1/NCEPDEV/nems/role.epic") +setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib")) + +whatis("Description: UFS build environment") From 4ef4afcdbaf0a68ca8aa69706038b0ec169286bc Mon Sep 17 00:00:00 2001 From: Jong Kim Date: Mon, 17 Apr 2023 14:51:47 +0000 Subject: [PATCH 02/19] add orion modulefile --- modulefiles/ufs_orion.intel.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modulefiles/ufs_orion.intel.lua diff --git a/modulefiles/ufs_orion.intel.lua b/modulefiles/ufs_orion.intel.lua new file mode 100644 index 00000000..406dc4ee --- /dev/null +++ b/modulefiles/ufs_orion.intel.lua @@ -0,0 +1,30 @@ +help([[ +loads UFS Model prerequisites for Orion/Intel +]]) + +prepend_path("MODULEPATH", "/work/noaa/epic-ps/role-epic-ps/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core") +prepend_path("MODULEPATH", "/work/noaa/da/role-da/spack-stack/modulefiles") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +stack_python_ver=os.getenv("stack_python_ver") or "3.9.7" +load(pathJoin("stack-python", stack_python_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.22.1" +load(pathJoin("cmake", cmake_ver)) + +ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5" +load(pathJoin("ecbuild", ecbuild_ver)) + +load("ufs_common") + +setenv("CC", "mpiicc") +setenv("CXX", "mpiicpc") +setenv("FC", "mpiifort") +setenv("CMAKE_Platform", "orion.intel") + +whatis("Description: UFS build environment") From 8241ddec8717f486f1fd659e70d5665bd641585d Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Mon, 17 Apr 2023 10:26:18 -0500 Subject: [PATCH 03/19] add JEDIINSTALL to orion module --- modulefiles/ufs_orion.intel.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modulefiles/ufs_orion.intel.lua b/modulefiles/ufs_orion.intel.lua index 406dc4ee..6ba1dc40 100644 --- a/modulefiles/ufs_orion.intel.lua +++ b/modulefiles/ufs_orion.intel.lua @@ -27,4 +27,7 @@ setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") setenv("CMAKE_Platform", "orion.intel") +setenv("EPICHOME", "/work/noaa/epic-ps/role-epic-ps") +setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib")) + whatis("Description: UFS build environment") From 66c4bfaeff88e8974b2daebc4208cc21b19a6596 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Thu, 20 Apr 2023 17:57:46 -0400 Subject: [PATCH 04/19] combining lua files --- modulefiles/ufs_hera.intel.lua | 54 +++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/modulefiles/ufs_hera.intel.lua b/modulefiles/ufs_hera.intel.lua index 3accf3f8..00e5e9dc 100644 --- a/modulefiles/ufs_hera.intel.lua +++ b/modulefiles/ufs_hera.intel.lua @@ -20,7 +20,59 @@ load(pathJoin("cmake", cmake_ver)) ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5" load(pathJoin("ecbuild", ecbuild_ver)) -load("ufs_common") +jasper_ver=os.getenv("jasper_ver") or "2.0.32" +load(pathJoin("jasper", jasper_ver)) + +zlib_ver=os.getenv("zlib_ver") or "1.2.13" +load(pathJoin("zlib", zlib_ver)) + +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) + +hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" +load(pathJoin("hdf5", hdf5_ver)) + +netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.0" +load(pathJoin("netcdf-c", netcdf_c_ver)) + +netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" +load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) + +pio_ver=os.getenv("pio_ver") or "2.5.9" +load(pathJoin("parallelio", pio_ver)) + +esmf_ver=os.getenv("esmf_ver") or "8.3.0b09" +load(pathJoin("esmf", esmf_ver)) + +fms_ver=os.getenv("fms_ver") or "2022.04" +load(pathJoin("fms",fms_ver)) + +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) + +crtm_ver=os.getenv("crtm_ver") or "2.4.0" +load(pathJoin("crtm", crtm_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) + +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2" +load(pathJoin("g2tmpl", g2tmpl_ver)) + +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) + +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) + +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +gftl_shared_ver=os.getenv("gftl_shared_ver") or "v1.5.0" +load(pathJoin("gftl-shared", gftl_shared_ver)) + +mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09" +load(pathJoin("mapl", mapl_ver)) setenv("CC", "mpiicc") setenv("CXX", "mpiicpc") From 5d44a4114eaa50b4837447a14a185d931d03e610 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Thu, 20 Apr 2023 17:58:55 -0400 Subject: [PATCH 05/19] Update landda_hera.intel.lua --- modulefiles/landda_hera.intel.lua | 85 ++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 13 deletions(-) diff --git a/modulefiles/landda_hera.intel.lua b/modulefiles/landda_hera.intel.lua index 55b5af4e..00e5e9dc 100644 --- a/modulefiles/landda_hera.intel.lua +++ b/modulefiles/landda_hera.intel.lua @@ -1,26 +1,85 @@ help([[ -loads Land DA prerequisites for Hera/Intel +loads UFS Model prerequisites for Hera/Intel ]]) -setenv("EPICHOME", "/scratch1/NCEPDEV/nems/role.epic") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +stack_python_ver=os.getenv("stack_python_ver") or "3.9.12" +load(pathJoin("stack-python", stack_python_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5" +load(pathJoin("ecbuild", ecbuild_ver)) + +jasper_ver=os.getenv("jasper_ver") or "2.0.32" +load(pathJoin("jasper", jasper_ver)) + +zlib_ver=os.getenv("zlib_ver") or "1.2.13" +load(pathJoin("zlib", zlib_ver)) + +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) + +hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" +load(pathJoin("hdf5", hdf5_ver)) + +netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.0" +load(pathJoin("netcdf-c", netcdf_c_ver)) -prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"miniconda3/modulefiles")) +netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" +load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) -load("miniconda3/4.12.0") +pio_ver=os.getenv("pio_ver") or "2.5.9" +load(pathJoin("parallelio", pio_ver)) -prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/envs/landda-release-1.0-intel/install/modulefiles/Core")) +esmf_ver=os.getenv("esmf_ver") or "8.3.0b09" +load(pathJoin("esmf", esmf_ver)) -load("stack-intel") -load("stack-intel-oneapi-mpi") -load("netcdf-c") -load("netcdf-fortran") -load("cmake") -load("ecbuild") -load("stack-python") +fms_ver=os.getenv("fms_ver") or "2022.04" +load(pathJoin("fms",fms_ver)) + +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) + +crtm_ver=os.getenv("crtm_ver") or "2.4.0" +load(pathJoin("crtm", crtm_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) + +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2" +load(pathJoin("g2tmpl", g2tmpl_ver)) + +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) + +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) + +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +gftl_shared_ver=os.getenv("gftl_shared_ver") or "v1.5.0" +load(pathJoin("gftl-shared", gftl_shared_ver)) + +mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09" +load(pathJoin("mapl", mapl_ver)) setenv("CC", "mpiicc") setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") +setenv("CMAKE_Platform", "hera.intel") + +setenv("EPICHOME", "/scratch1/NCEPDEV/nems/role.epic") setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib")) -whatis("Description: Land DA build environment") +whatis("Description: UFS build environment") From 8f638f938f652d65ada4858b3ba3dd0cc8c2d33e Mon Sep 17 00:00:00 2001 From: Jong Kim Date: Fri, 21 Apr 2023 18:31:58 +0000 Subject: [PATCH 06/19] update hera modulefile --- modulefiles/landda_hera.intel.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modulefiles/landda_hera.intel.lua b/modulefiles/landda_hera.intel.lua index 00e5e9dc..97473220 100644 --- a/modulefiles/landda_hera.intel.lua +++ b/modulefiles/landda_hera.intel.lua @@ -74,12 +74,15 @@ load(pathJoin("gftl-shared", gftl_shared_ver)) mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09" load(pathJoin("mapl", mapl_ver)) +load("ufs-pyenv") +load("atlas") + setenv("CC", "mpiicc") setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") setenv("CMAKE_Platform", "hera.intel") setenv("EPICHOME", "/scratch1/NCEPDEV/nems/role.epic") -setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib")) +setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib/v1.1")) whatis("Description: UFS build environment") From 93a52cfe7b26e2d47f8d099db321e6b46362dc16 Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Sat, 22 Apr 2023 10:56:27 -0400 Subject: [PATCH 07/19] update singularity moduelfile --- modulefiles/landda_singularity.intel.lua | 97 ++++++++++++++++++++---- 1 file changed, 84 insertions(+), 13 deletions(-) diff --git a/modulefiles/landda_singularity.intel.lua b/modulefiles/landda_singularity.intel.lua index 49a9a32e..a8a9d61e 100644 --- a/modulefiles/landda_singularity.intel.lua +++ b/modulefiles/landda_singularity.intel.lua @@ -1,26 +1,97 @@ help([[ -loads Land DA prerequisites for Singularity/Intel +loads UFS Model prerequisites for Hera/Intel ]]) setenv("EPICHOME", "/opt") ---prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"miniconda3/modulefiles")) ---miniconda3_ver=os.getenv("miniconda3_ver") or "4.12.0" ---load(pathJoin("miniconda3", miniconda3_ver)) +prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/spack-stack-1.3.0/envs/unified-dev/install/modulefiles/Core")) -prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/envs/landda-release-1.0-intel/install/modulefiles/Core")) +stack_intel_ver=os.getenv("stack_intel_ver") or "2021.8.0" +load(pathJoin("stack-intel", stack_intel_ver)) -load("stack-intel") -load("stack-intel-oneapi-mpi") -load("netcdf-c") -load("netcdf-fortran") -load("cmake") -load("ecbuild") -load("stack-python") +load("intel-oneapi-mpi/2021.8.0") +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.8.0" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +stack_python_ver=os.getenv("stack_python_ver") or "3.8.10" +load(pathJoin("stack-python", stack_python_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5" +load(pathJoin("ecbuild", ecbuild_ver)) + +jasper_ver=os.getenv("jasper_ver") or "2.0.32" +load(pathJoin("jasper", jasper_ver)) + +zlib_ver=os.getenv("zlib_ver") or "1.2.13" +load(pathJoin("zlib", zlib_ver)) + +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) + +hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" +load(pathJoin("hdf5", hdf5_ver)) + +netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.2" +load(pathJoin("netcdf-c", netcdf_c_ver)) + +netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" +load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) + +pio_ver=os.getenv("pio_ver") or "2.5.9" +load(pathJoin("parallelio", pio_ver)) + +esmf_ver=os.getenv("esmf_ver") or "8.3.0b09" +load(pathJoin("esmf", esmf_ver)) + +fms_ver=os.getenv("fms_ver") or "2022.04" +load(pathJoin("fms",fms_ver)) + +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) + +crtm_ver=os.getenv("crtm_ver") or "2.4.0" +load(pathJoin("crtm", crtm_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) + +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2" +load(pathJoin("g2tmpl", g2tmpl_ver)) + +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) + +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) + +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +gftl_shared_ver=os.getenv("gftl_shared_ver") or "1.5.0" +load(pathJoin("gftl-shared", gftl_shared_ver)) + +mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09" +load(pathJoin("mapl", mapl_ver)) + +load("py-cftime/1.0.3.4") +load("py-cython/0.29.32") +load("py-f90nml/1.4.3") +load("py-jinja2/3.1.2") +load("py-netcdf4/1.5.3") +load("py-numpy/1.22.3") +load("py-pandas/1.4.0") +load("py-python-dateutil/2.8.2") +load("py-pyyaml/6.0") + +load("atlas") setenv("CC", "mpiicc") setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") + setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"")) -whatis("Description: Land DA build environment") +whatis("Description: UFS build environment") From e506511f018557982b845ad0b8f3f2078736acad Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Sat, 22 Apr 2023 11:10:48 -0400 Subject: [PATCH 08/19] update singularity modulefile: compiler --- modulefiles/landda_singularity.intel.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modulefiles/landda_singularity.intel.lua b/modulefiles/landda_singularity.intel.lua index a8a9d61e..de27a367 100644 --- a/modulefiles/landda_singularity.intel.lua +++ b/modulefiles/landda_singularity.intel.lua @@ -9,8 +9,8 @@ prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/spack-sta stack_intel_ver=os.getenv("stack_intel_ver") or "2021.8.0" load(pathJoin("stack-intel", stack_intel_ver)) -load("intel-oneapi-mpi/2021.8.0") -stack_impi_ver=os.getenv("stack_impi_ver") or "2021.8.0" +load("intel-oneapi-mpi/2023.0.0") +stack_impi_ver=os.getenv("stack_impi_ver") or "2023.0.0" load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) stack_python_ver=os.getenv("stack_python_ver") or "3.8.10" From a9255ead58da6e1f7edbeee61c6dda04f8ce424b Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Sat, 22 Apr 2023 14:36:06 -0400 Subject: [PATCH 09/19] Update landda_singularity.intel.lua --- modulefiles/landda_singularity.intel.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modulefiles/landda_singularity.intel.lua b/modulefiles/landda_singularity.intel.lua index de27a367..a8a9d61e 100644 --- a/modulefiles/landda_singularity.intel.lua +++ b/modulefiles/landda_singularity.intel.lua @@ -9,8 +9,8 @@ prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/spack-sta stack_intel_ver=os.getenv("stack_intel_ver") or "2021.8.0" load(pathJoin("stack-intel", stack_intel_ver)) -load("intel-oneapi-mpi/2023.0.0") -stack_impi_ver=os.getenv("stack_impi_ver") or "2023.0.0" +load("intel-oneapi-mpi/2021.8.0") +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.8.0" load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) stack_python_ver=os.getenv("stack_python_ver") or "3.8.10" From ba63a49a2a806355cf20ad8741b1ccc069815d40 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Sat, 22 Apr 2023 20:49:56 -0400 Subject: [PATCH 10/19] Delete ufs_hera.intel.lua --- modulefiles/ufs_hera.intel.lua | 85 ---------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 modulefiles/ufs_hera.intel.lua diff --git a/modulefiles/ufs_hera.intel.lua b/modulefiles/ufs_hera.intel.lua deleted file mode 100644 index 00e5e9dc..00000000 --- a/modulefiles/ufs_hera.intel.lua +++ /dev/null @@ -1,85 +0,0 @@ -help([[ -loads UFS Model prerequisites for Hera/Intel -]]) - -prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core") -prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles") - -stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" -load(pathJoin("stack-intel", stack_intel_ver)) - -stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" -load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) - -stack_python_ver=os.getenv("stack_python_ver") or "3.9.12" -load(pathJoin("stack-python", stack_python_ver)) - -cmake_ver=os.getenv("cmake_ver") or "3.23.1" -load(pathJoin("cmake", cmake_ver)) - -ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5" -load(pathJoin("ecbuild", ecbuild_ver)) - -jasper_ver=os.getenv("jasper_ver") or "2.0.32" -load(pathJoin("jasper", jasper_ver)) - -zlib_ver=os.getenv("zlib_ver") or "1.2.13" -load(pathJoin("zlib", zlib_ver)) - -libpng_ver=os.getenv("libpng_ver") or "1.6.37" -load(pathJoin("libpng", libpng_ver)) - -hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" -load(pathJoin("hdf5", hdf5_ver)) - -netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.0" -load(pathJoin("netcdf-c", netcdf_c_ver)) - -netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" -load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) - -pio_ver=os.getenv("pio_ver") or "2.5.9" -load(pathJoin("parallelio", pio_ver)) - -esmf_ver=os.getenv("esmf_ver") or "8.3.0b09" -load(pathJoin("esmf", esmf_ver)) - -fms_ver=os.getenv("fms_ver") or "2022.04" -load(pathJoin("fms",fms_ver)) - -bacio_ver=os.getenv("bacio_ver") or "2.4.1" -load(pathJoin("bacio", bacio_ver)) - -crtm_ver=os.getenv("crtm_ver") or "2.4.0" -load(pathJoin("crtm", crtm_ver)) - -g2_ver=os.getenv("g2_ver") or "3.4.5" -load(pathJoin("g2", g2_ver)) - -g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2" -load(pathJoin("g2tmpl", g2tmpl_ver)) - -ip_ver=os.getenv("ip_ver") or "3.3.3" -load(pathJoin("ip", ip_ver)) - -sp_ver=os.getenv("sp_ver") or "2.3.3" -load(pathJoin("sp", sp_ver)) - -w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" -load(pathJoin("w3emc", w3emc_ver)) - -gftl_shared_ver=os.getenv("gftl_shared_ver") or "v1.5.0" -load(pathJoin("gftl-shared", gftl_shared_ver)) - -mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09" -load(pathJoin("mapl", mapl_ver)) - -setenv("CC", "mpiicc") -setenv("CXX", "mpiicpc") -setenv("FC", "mpiifort") -setenv("CMAKE_Platform", "hera.intel") - -setenv("EPICHOME", "/scratch1/NCEPDEV/nems/role.epic") -setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib")) - -whatis("Description: UFS build environment") From cf8a10ea9a8c4054968eb07e5d8da81395a90e48 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Sat, 22 Apr 2023 20:50:06 -0400 Subject: [PATCH 11/19] Delete ufs_orion.intel.lua --- modulefiles/ufs_orion.intel.lua | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 modulefiles/ufs_orion.intel.lua diff --git a/modulefiles/ufs_orion.intel.lua b/modulefiles/ufs_orion.intel.lua deleted file mode 100644 index 6ba1dc40..00000000 --- a/modulefiles/ufs_orion.intel.lua +++ /dev/null @@ -1,33 +0,0 @@ -help([[ -loads UFS Model prerequisites for Orion/Intel -]]) - -prepend_path("MODULEPATH", "/work/noaa/epic-ps/role-epic-ps/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core") -prepend_path("MODULEPATH", "/work/noaa/da/role-da/spack-stack/modulefiles") - -stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2" -load(pathJoin("stack-intel", stack_intel_ver)) - -stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" -load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) - -stack_python_ver=os.getenv("stack_python_ver") or "3.9.7" -load(pathJoin("stack-python", stack_python_ver)) - -cmake_ver=os.getenv("cmake_ver") or "3.22.1" -load(pathJoin("cmake", cmake_ver)) - -ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5" -load(pathJoin("ecbuild", ecbuild_ver)) - -load("ufs_common") - -setenv("CC", "mpiicc") -setenv("CXX", "mpiicpc") -setenv("FC", "mpiifort") -setenv("CMAKE_Platform", "orion.intel") - -setenv("EPICHOME", "/work/noaa/epic-ps/role-epic-ps") -setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib")) - -whatis("Description: UFS build environment") From dccf7d23e28c66bc3bf212abd9c84d893c2bc120 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Sat, 22 Apr 2023 20:50:17 -0400 Subject: [PATCH 12/19] Delete ufs_common.lua --- modulefiles/ufs_common.lua | 59 -------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 modulefiles/ufs_common.lua diff --git a/modulefiles/ufs_common.lua b/modulefiles/ufs_common.lua deleted file mode 100644 index 22109f8d..00000000 --- a/modulefiles/ufs_common.lua +++ /dev/null @@ -1,59 +0,0 @@ -help([[ -loads UFS Model common libraries -]]) - -jasper_ver=os.getenv("jasper_ver") or "2.0.32" -load(pathJoin("jasper", jasper_ver)) - -zlib_ver=os.getenv("zlib_ver") or "1.2.13" -load(pathJoin("zlib", zlib_ver)) - -libpng_ver=os.getenv("libpng_ver") or "1.6.37" -load(pathJoin("libpng", libpng_ver)) - -hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" -load(pathJoin("hdf5", hdf5_ver)) - -netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.0" -load(pathJoin("netcdf-c", netcdf_c_ver)) - -netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" -load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) - -pio_ver=os.getenv("pio_ver") or "2.5.9" -load(pathJoin("parallelio", pio_ver)) - -esmf_ver=os.getenv("esmf_ver") or "8.3.0b09" -load(pathJoin("esmf", esmf_ver)) - -fms_ver=os.getenv("fms_ver") or "2022.04" -load(pathJoin("fms",fms_ver)) - -bacio_ver=os.getenv("bacio_ver") or "2.4.1" -load(pathJoin("bacio", bacio_ver)) - -crtm_ver=os.getenv("crtm_ver") or "2.4.0" -load(pathJoin("crtm", crtm_ver)) - -g2_ver=os.getenv("g2_ver") or "3.4.5" -load(pathJoin("g2", g2_ver)) - -g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2" -load(pathJoin("g2tmpl", g2tmpl_ver)) - -ip_ver=os.getenv("ip_ver") or "3.3.3" -load(pathJoin("ip", ip_ver)) - -sp_ver=os.getenv("sp_ver") or "2.3.3" -load(pathJoin("sp", sp_ver)) - -w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" -load(pathJoin("w3emc", w3emc_ver)) - -gftl_shared_ver=os.getenv("gftl_shared_ver") or "v1.5.0" -load(pathJoin("gftl-shared", gftl_shared_ver)) - -mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09" -load(pathJoin("mapl", mapl_ver)) - -whatis("Description: UFS build environment common libraries") From 0cce6ed18a63dd5babf64aa260e45a8acc822c6d Mon Sep 17 00:00:00 2001 From: ulmononian Date: Thu, 27 Apr 2023 23:28:44 -0500 Subject: [PATCH 13/19] Restore orion modulefile (with slight update) and add landda_container.intel modulefile. --- modulefiles/landda_container.intel.lua | 75 +++++++++++++++++++++ modulefiles/landda_orion.intel.lua | 90 ++++++++++++++++++++++---- 2 files changed, 151 insertions(+), 14 deletions(-) create mode 100644 modulefiles/landda_container.intel.lua diff --git a/modulefiles/landda_container.intel.lua b/modulefiles/landda_container.intel.lua new file mode 100644 index 00000000..f7c0036d --- /dev/null +++ b/modulefiles/landda_container.intel.lua @@ -0,0 +1,75 @@ +help([[ +loads Land DA prerequisites for Singularity/Intel +]]) + +setenv("EPICHOME", "/opt") + +prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/spack-stack-1.3.0/envs/unified-dev/install/modulefiles/Core")) + +load("stack-intel/2021.8.0") +load("stack-intel-oneapi-mpi/2021.8.0") +load("stack-python/3.8.10") +load("cmake/3.23.1") +load("ecbuild/3.6.5") +load("libjpeg/2.1.0") +load("jasper/2.0.32") +load("zlib/1.2.13") +load("libpng/1.6.37") +load("pkg-config/0.29.2") +load("hdf5/1.14.0") +load("curl/7.68.0") +load("zstd/1.5.2") +load("netcdf-c/4.9.2") +load("netcdf-fortran/4.6.0") +load("parallel-netcdf/1.12.2") +load("parallelio/2.5.9") +load("esmf/8.3.0b09") +load("fms/2022.04") +load("bacio/2.4.1") +load("crtm-fix/2.4.0_emc") +load("git-lfs/2.9.2") +load("crtm/2.4.0") +load("g2/3.4.5") +load("g2tmpl/1.10.2") +load("ip/3.3.3") +load("sp/2.3.3") +load("w3emc/2.9.2") +load("gftl/1.8.1") +load("gftl-shared/1.5.0") +load("yafyaml/0.5.1") +load("mapl/2.22.0-esmf-8.3.0b09") +load("openblas/0.3.19") +load("py-setuptools/59.4.0") +load("py-numpy/1.22.3") +load("py-cftime/1.0.3.4") +load("py-cython/0.29.32") +load("py-f90nml/1.4.3") +load("py-markupsafe/2.1.1") +load("py-jinja2/3.1.2") +load("py-netcdf4/1.5.3") +load("py-bottleneck/1.3.5") +load("py-pyparsing/3.0.9") +load("py-packaging/21.3") +load("py-numexpr/2.8.3") +load("py-six/1.16.0") +load("py-python-dateutil/2.8.2") +load("py-pytz/2022.2.1") +load("py-pandas/1.4.0") +load("py-pyyaml/6.0") +--modules below this line used for jedi builds +load("udunits/2.2.28") +load("boost/1.78.0") +load("eigen/3.4.0") +load("eckit/1.20.2") +load("fftw/3.3.10") +load("fckit/0.10.0") +load("fiat/1.1.0") +load("ectrans/1.2.0") +load("atlas/0.32.1") + +setenv("CC", "mpiicc") +setenv("CXX", "mpiicpc") +setenv("FC", "mpiifort") + +setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"")) + diff --git a/modulefiles/landda_orion.intel.lua b/modulefiles/landda_orion.intel.lua index 212e03cf..2fb76f77 100644 --- a/modulefiles/landda_orion.intel.lua +++ b/modulefiles/landda_orion.intel.lua @@ -1,26 +1,88 @@ help([[ -loads Land DA prerequisites for Orion/Intel +loads UFS Model prerequisites for Orion/Intel ]]) -setenv("EPICHOME", "/work/noaa/epic-ps/role-epic-ps") +prepend_path("MODULEPATH", "/work/noaa/epic-ps/role-epic-ps/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core") +prepend_path("MODULEPATH", "/work/noaa/da/role-da/spack-stack/modulefiles") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +stack_python_ver=os.getenv("stack_python_ver") or "3.9.7" +load(pathJoin("stack-python", stack_python_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.22.1" +load(pathJoin("cmake", cmake_ver)) + +ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5" +load(pathJoin("ecbuild", ecbuild_ver)) + +jasper_ver=os.getenv("jasper_ver") or "2.0.32" +load(pathJoin("jasper", jasper_ver)) + +zlib_ver=os.getenv("zlib_ver") or "1.2.13" +load(pathJoin("zlib", zlib_ver)) + +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) + +hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" +load(pathJoin("hdf5", hdf5_ver)) + +netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.0" +load(pathJoin("netcdf-c", netcdf_c_ver)) + +netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" +load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) -prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"miniconda3/modulefiles")) +pio_ver=os.getenv("pio_ver") or "2.5.9" +load(pathJoin("parallelio", pio_ver)) -load("miniconda3/4.12.0") +esmf_ver=os.getenv("esmf_ver") or "8.3.0b09" +load(pathJoin("esmf", esmf_ver)) -prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/envs/landda-release-1.0-intel/install/modulefiles/Core")) +fms_ver=os.getenv("fms_ver") or "2022.04" +load(pathJoin("fms",fms_ver)) -load("stack-intel") -load("stack-intel-oneapi-mpi") -load("netcdf-c") -load("netcdf-fortran") -load("cmake") -load("ecbuild") -load("stack-python") +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) + +crtm_ver=os.getenv("crtm_ver") or "2.4.0" +load(pathJoin("crtm", crtm_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) + +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2" +load(pathJoin("g2tmpl", g2tmpl_ver)) + +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) + +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) + +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +gftl_shared_ver=os.getenv("gftl_shared_ver") or "v1.5.0" +load(pathJoin("gftl-shared", gftl_shared_ver)) + +mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09" +load(pathJoin("mapl", mapl_ver)) + +load("ufs-pyenv") setenv("CC", "mpiicc") setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") -setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib")) +setenv("CMAKE_Platform", "orion.intel") + +setenv("EPICHOME", "/work/noaa/epic-ps/role-epic-ps") +setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib/v1.1")) + +whatis("Description: UFS build environment") -whatis("Description: Land DA build environment") From 641eb6f6b0357856785f63d622572045c4f36c66 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Fri, 28 Apr 2023 08:44:39 -0400 Subject: [PATCH 14/19] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index affc3a9e..84a7f032 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ cmake_minimum_required( VERSION 3.12 ) project( LandDA VERSION 0.0.0 LANGUAGES C CXX Fortran) if(DEFINED ENV{JEDI_INSTALL}) - set( JEDI_INSTALL $ENV{JEDI_INSTALL}/fv3-bundle) + set( JEDI_INSTALL $ENV{JEDI_INSTALL}/jedi-bundle) else() message(FATAL_ERROR "Define the environment variable 'JEDI_INSTALL' to point to the parent directory of fv3-bundle on your system") endif() From 4213c5c7c1a79d491fbb5c0e1fa29a9b17f90780 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Fri, 28 Apr 2023 08:47:04 -0400 Subject: [PATCH 15/19] Update release.environment --- release.environment | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release.environment b/release.environment index 443fb9f8..ff178c02 100644 --- a/release.environment +++ b/release.environment @@ -36,6 +36,6 @@ export OUTDIR=${LANDDA_EXPTS}/${exp_name} export TEST_BASEDIR=${TEST_BASEDIR:-${EPICHOME}/landda/cycle_land/DA_GHCN_test/mem000/restarts/vector} # JEDI directories -export JEDI_EXECDIR=${JEDI_EXECDIR:-"${JEDI_INSTALL}/fv3-bundle/build/bin"} -export IODA_BUILD_DIR=${JEDI_INSTALL}/ioda-bundle/build -export JEDI_STATICDIR=${JEDI_INSTALL}/fv3-bundle/fv3-jedi/test/Data +export JEDI_EXECDIR=${JEDI_EXECDIR:-"${JEDI_INSTALL}/jedi-bundle/build/bin"} +export IODA_BUILD_DIR=${JEDI_INSTALL}/jedi-bundle/build +export JEDI_STATICDIR=${JEDI_INSTALL}/jedi-bundle/fv3-jedi/test/Data From e274fdfd2e7ccff1e8a3132db788c8551a4d5e0b Mon Sep 17 00:00:00 2001 From: Jong Kim Date: Fri, 28 Apr 2023 13:11:41 +0000 Subject: [PATCH 16/19] turn of ci/cd yaml --- .github/workflows/{landda_ci_cd.yml => landda_ci_cd._yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{landda_ci_cd.yml => landda_ci_cd._yml} (100%) diff --git a/.github/workflows/landda_ci_cd.yml b/.github/workflows/landda_ci_cd._yml similarity index 100% rename from .github/workflows/landda_ci_cd.yml rename to .github/workflows/landda_ci_cd._yml From faa341ef1e92c64a3cbcd4d5f478705b0dd2c6d8 Mon Sep 17 00:00:00 2001 From: Jong Kim Date: Fri, 28 Apr 2023 13:22:52 +0000 Subject: [PATCH 17/19] add run_container script --- run_container_executable.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 run_container_executable.sh diff --git a/run_container_executable.sh b/run_container_executable.sh new file mode 100755 index 00000000..152b3de6 --- /dev/null +++ b/run_container_executable.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +export SINGULARITYENV_FI_PROVIDER=tcp +export SINGULARITY_SHELL=/bin/bash +BINDDIR="/"`pwd | awk -F"/" '{print $2}'` +CONTAINERLOC=${EPICCONTAINERS:-${HOME}} +img=${img:-${CONTAINERLOC}/ubuntu20.04-intel-ue-landda.img} +CONTAINERBASE="/"`echo $img | xargs realpath | awk -F"/" '{print $2}'` +cmd=$(basename "$0") +arg="$@" +if [ ! -z "$LANDDA_INPUTS" ]; then + INPUTBASE="/"`echo $LANDDA_INPUTS | xargs realpath | awk -F"/" '{print $2}'` + INPUTBIND="-B $INPUTBASE:$INPUTBASE" +else + INPUTBIND="" +fi +echo running: ${SINGULARITYBIN} exec $img $cmd $arg +${SINGULARITYBIN} exec -B $BINDDIR:$BINDDIR -B $CONTAINERBASE:$CONTAINERBASE $INPUTBIND $img $cmd $arg + From 5765e8925e13c5ce3ffc13cebf30d83f08c88807 Mon Sep 17 00:00:00 2001 From: Jong Kim Date: Fri, 28 Apr 2023 13:51:41 +0000 Subject: [PATCH 18/19] update runtime_vars with jedi-bundle --- test/runtime_vars.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtime_vars.sh b/test/runtime_vars.sh index 2e1a5b65..19d3b07e 100755 --- a/test/runtime_vars.sh +++ b/test/runtime_vars.sh @@ -36,12 +36,12 @@ export EXECDIR=${EXECDIR:-$project_binary_dir/bin} export LANDDA_INPUTS=${LANDDA_INPUTS:-"`dirname $project_source_dir`/inputs"} # set IODA path -export IODA_BUILD_DIR=${IODA_BUILD_DIR:-"${JEDI_INSTALL}/ioda-bundle/build"} +export IODA_BUILD_DIR=${IODA_BUILD_DIR:-"${JEDI_INSTALL}/jedi-bundle/build"} export PYTHON_VERSION=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}".format(*version))'` export PYTHONPATH=$PYTHONPATH:${IODA_BUILD_DIR}/lib/python${PYTHON_VERSION}/pyioda:${IODA_BUILD_DIR}/lib/pyiodaconv # JEDI directories -export JEDI_EXECDIR=${JEDI_EXECDIR:-"${JEDI_INSTALL}/fv3-bundle/build/bin"} +export JEDI_EXECDIR=${JEDI_EXECDIR:-"${JEDI_INSTALL}/jedi-bundle/build/bin"} export JEDI_STATICDIR=${JEDI_STATICDIR:-"${JEDI_EXECDIR}/../fv3-jedi/test/Data"} # set executables From 61c37de3d1155dc17fd95b753658c47a26e00a22 Mon Sep 17 00:00:00 2001 From: Jong Kim Date: Mon, 1 May 2023 12:54:30 +0000 Subject: [PATCH 19/19] update release.environment --- release.environment | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/release.environment b/release.environment index ff178c02..0a6b9c25 100644 --- a/release.environment +++ b/release.environment @@ -6,7 +6,7 @@ export LANDDA_INPUTS=${LANDDA_INPUTS:-${LANDDAROOT}/inputs} export CYCLEDIR=$(pwd) export LANDDA_EXPTS=${LANDDA_EXPTS:-${LANDDAROOT}/landda_expts} if [[ ! $BASELINE =~ 'hera.internal' ]]; then - export PYTHON=`which python` + export PYTHON=`/usr/bin/which python` fi export BUILDDIR=${BUILDDIR:-${CYCLEDIR}/build} @@ -14,15 +14,15 @@ export BUILDDIR=${BUILDDIR:-${CYCLEDIR}/build} if [[ ${USE_SINGULARITY} =~ yes ]]; then EPICHOME=/opt #use the python that is built into the container. It has all the pythonpaths set and can run the ioda converters - export PYTHON=$PWD/singularity/bin/python + export PYTHON=$PWD/build/bin/python #JEDI is installed under /opt in the container export JEDI_INSTALL=/opt #Scripts that launch containerized versions of the executables are in $PWD/singularity/bin They should be called #from the host system to be run (e.g. mpiexec -n 6 $BUILDDIR/bin/fv3jedi_letkf.x ) - export BUILDDIR=$PWD/singularity - export JEDI_EXECDIR=${CYCLEDIR}/singularity/bin + export BUILDDIR=$PWD/build + export JEDI_EXECDIR=${CYCLEDIR}/build/bin module try-load singularity - export SINGULARITYBIN=`which singularity` + export SINGULARITYBIN=`/usr/bin/which singularity` sed -i 's/singularity exec/${SINGULARITYBIN} exec/g' run_container_executable.sh fi