From 254b8ce2ce53d6d99aca8125b504667a8591d9a2 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Wed, 16 Oct 2024 17:01:10 +0000 Subject: [PATCH 1/9] Updating module files for building with current spack stack --- CMakeLists.txt | 6 ++- modulefiles/ufs_common.lua | 32 +++++++++++++++ modulefiles/ufs_derecho.intel.lua | 30 ++++++++++++++ modulefiles/ufs_gaea.intel.lua | 33 ++++++++++++++++ modulefiles/ufs_hera.intel.lua | 26 ++++++++++++ modulefiles/ufs_hera.intelllvm.lua | 33 ++++++++++++++++ modulefiles/ufs_hercules.intel.lua | 26 ++++++++++++ modulefiles/ufs_hercules.intelllvm.lua | 30 ++++++++++++++ modulefiles/ufs_orion.intel.lua | 29 ++++++++++++++ modulefiles/ufs_wcoss2.intel.lua | 55 ++++++++++++++++++++++++++ 10 files changed, 298 insertions(+), 2 deletions(-) create mode 100644 modulefiles/ufs_common.lua create mode 100644 modulefiles/ufs_derecho.intel.lua create mode 100644 modulefiles/ufs_gaea.intel.lua create mode 100644 modulefiles/ufs_hera.intel.lua create mode 100644 modulefiles/ufs_hera.intelllvm.lua create mode 100644 modulefiles/ufs_hercules.intel.lua create mode 100644 modulefiles/ufs_hercules.intelllvm.lua create mode 100644 modulefiles/ufs_orion.intel.lua create mode 100644 modulefiles/ufs_wcoss2.intel.lua diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a99c58..1a5e6b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,11 +2,13 @@ cmake_minimum_required(VERSION 3.5) # set compiler -if(NOT DEFINED ENV{CMAKE_Fortran_COMPILER}) +if(NOT DEFINED ENV{FC}) message(FATAL_ERROR "CMAKE_Fortran_COMPILER is not defined") endif() -set(CMAKE_Fortran_COMPILER $ENV{CMAKE_Fortran_COMPILER}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) # set the project name and version project(NEXUS diff --git a/modulefiles/ufs_common.lua b/modulefiles/ufs_common.lua new file mode 100644 index 0000000..3c7ddbc --- /dev/null +++ b/modulefiles/ufs_common.lua @@ -0,0 +1,32 @@ +whatis("Description: UFS build environment common libraries") + +help([[Load UFS Model common libraries]]) + +local ufs_modules = { + {["jasper"] = "2.0.32"}, + {["zlib"] = "1.2.13"}, + {["libpng"] = "1.6.37"}, + {["hdf5"] = "1.14.0"}, + {["netcdf-c"] = "4.9.2"}, + {["netcdf-fortran"] = "4.6.1"}, + {["parallelio"] = "2.5.10"}, + {["esmf"] = "8.6.0"}, + {["fms"] = "2024.01"}, + {["bacio"] = "2.4.1"}, + {["crtm"] = "2.4.0"}, + {["g2"] = "3.5.1"}, + {["g2tmpl"] = "1.13.0"}, + {["ip"] = "4.3.0"}, + {["sp"] = "2.5.0"}, + {["w3emc"] = "2.10.0"}, + {["gftl-shared"] = "1.6.1"}, + {["mapl"] = "2.40.3-esmf-8.6.0"}, + {["scotch"] = "7.0.4"}, +} + +for i = 1, #ufs_modules do + for name, default_version in pairs(ufs_modules[i]) do + local env_version_name = string.gsub(name, "-", "_") .. "_ver" + load(pathJoin(name, os.getenv(env_version_name) or default_version)) + end +end \ No newline at end of file diff --git a/modulefiles/ufs_derecho.intel.lua b/modulefiles/ufs_derecho.intel.lua new file mode 100644 index 0000000..e3bc52f --- /dev/null +++ b/modulefiles/ufs_derecho.intel.lua @@ -0,0 +1,30 @@ +help([[ +loads UFS Model prerequisites for NOAA Parallelworks/Intel +]]) + +setenv("LMOD_TMOD_FIND_FIRST","yes") +prepend_path("MODULEPATH", "/glade/work/epicufsrt/contrib/spack-stack/derecho/modulefiles") +load("ecflow/5.8.4") +load("mysql/8.0.33") + +setenv("LMOD_TMOD_FIND_FIRST","yes") +prepend_path("MODULEPATH", "/lustre/desc1/scratch/epicufsrt/contrib/modulefiles_extra") +prepend_path("MODULEPATH", "/glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/fms-2024.01/install/modulefiles/Core") + +unload("ncarcompilers") +stack_intel_ver=os.getenv("stack_intel_ver") or "2021.10.0" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_cray_mpich_ver=os.getenv("stack-cray-mpich_ver") or "8.1.25" +load(pathJoin("stack-cray-mpich", stack_cray_mpich_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +stack_python_ver=os.getenv("stack_python_ver") or "3.10.13" +load(pathJoin("stack-python", stack_python_ver)) + +setenv("CMAKE_Platform", "derecho.intel") +load("ufs-weather-model-env") + +whatis("Description: UFS build environment") \ No newline at end of file diff --git a/modulefiles/ufs_gaea.intel.lua b/modulefiles/ufs_gaea.intel.lua new file mode 100644 index 0000000..5014c19 --- /dev/null +++ b/modulefiles/ufs_gaea.intel.lua @@ -0,0 +1,33 @@ +help([[ + This module loads libraries required for building and running UFS Weather Model + on the NOAA RDHPC machine Gaea C5 using Intel-2023.1.0. +]]) + +whatis([===[Loads libraries needed for building the UFS Weather Model on Gaea ]===]) + +prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/spack-stack-1.6.0/envs/fms-2024.01/install/modulefiles/Core") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2023.1.0" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.25" +load(pathJoin("stack-cray-mpich", stack_cray_mpich_ver)) + +stack_python_ver=os.getenv("stack_python_ver") or "3.10.13" +load(pathJoin("stack-python", stack_python_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +load("ufs_common") + +nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" +load(pathJoin("nccmp", nccmp_ver)) + +unload("darshan-runtime") +unload("cray-libsci") + +setenv("CC","cc") +setenv("CXX","CC") +setenv("FC","ftn") +setenv("CMAKE_Platform","gaea.intel") \ No newline at end of file diff --git a/modulefiles/ufs_hera.intel.lua b/modulefiles/ufs_hera.intel.lua new file mode 100644 index 0000000..d4c61c0 --- /dev/null +++ b/modulefiles/ufs_hera.intel.lua @@ -0,0 +1,26 @@ +help([[ +loads UFS Model prerequisites for Hera/Intel +]]) + +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/fms-2024.01/install/modulefiles/Core") + +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)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +load("ufs_common") + +nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" +load(pathJoin("nccmp", nccmp_ver)) + +setenv("CC", "mpiicc") +setenv("CXX", "mpiicpc") +setenv("FC", "mpiifort") +setenv("CMAKE_Platform", "hera.intel") + +whatis("Description: UFS build environment") \ No newline at end of file diff --git a/modulefiles/ufs_hera.intelllvm.lua b/modulefiles/ufs_hera.intelllvm.lua new file mode 100644 index 0000000..213135d --- /dev/null +++ b/modulefiles/ufs_hera.intelllvm.lua @@ -0,0 +1,33 @@ +help([[ +loads UFS Model prerequisites for Hera/IntelLLVM +]]) + +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core") + +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)) + +load("gnu") +load("intel/2023.2.0") + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +load("ufs_common") + +nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" +load(pathJoin("nccmp", nccmp_ver)) + +setenv("I_MPI_CC", "icx") +setenv("I_MPI_CXX", "icpx") +setenv("I_MPI_FC", "ifx") + +setenv("CC", "mpicc") +setenv("CXX", "mpiicpc") +setenv("FC", "mpifc") +setenv("CMAKE_Platform", "hera.intel") + +whatis("Description: UFS build environment") \ No newline at end of file diff --git a/modulefiles/ufs_hercules.intel.lua b/modulefiles/ufs_hercules.intel.lua new file mode 100644 index 0000000..087939b --- /dev/null +++ b/modulefiles/ufs_hercules.intel.lua @@ -0,0 +1,26 @@ +help([[ +loads UFS Model prerequisites for Hercules/Intel +]]) + +prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/fms-2024.01/install/modulefiles/Core") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.9.0" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +load("ufs_common") + +nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" +load(pathJoin("nccmp", nccmp_ver)) + +setenv("CC", "mpiicc") +setenv("CXX", "mpiicpc") +setenv("FC", "mpiifort") +setenv("CMAKE_Platform", "hercules.intel") + +whatis("Description: UFS build environment") \ No newline at end of file diff --git a/modulefiles/ufs_hercules.intelllvm.lua b/modulefiles/ufs_hercules.intelllvm.lua new file mode 100644 index 0000000..f0b509e --- /dev/null +++ b/modulefiles/ufs_hercules.intelllvm.lua @@ -0,0 +1,30 @@ +help([[ +loads UFS Model prerequisites for Hercules/IntelLLVM +]]) + +prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.9.0" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +load("ufs_common") + +nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" +load(pathJoin("nccmp", nccmp_ver)) + +setenv("I_MPI_CC", "icx") +setenv("I_MPI_CXX", "icpx") +setenv("I_MPI_F90", "ifx") + +setenv("CC", "mpiicc") +setenv("CXX", "mpiicpc") +setenv("FC", "mpiifort") +setenv("CMAKE_Platform", "hercules.intel") + +whatis("Description: UFS build environment") \ No newline at end of file diff --git a/modulefiles/ufs_orion.intel.lua b/modulefiles/ufs_orion.intel.lua new file mode 100644 index 0000000..556e0a5 --- /dev/null +++ b/modulefiles/ufs_orion.intel.lua @@ -0,0 +1,29 @@ +help([[ +loads UFS Model prerequisites for Orion/Intel +]]) + +prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/fms-2024.01/install/modulefiles/Core") + +stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0" +load(pathJoin("stack-intel", stack_intel_ver)) + +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.9.0" +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.23.1" +load(pathJoin("cmake", cmake_ver)) + +load("ufs_common") + +-- HDF5 needed for LM4 +hdf5_ver=os.getenv("hdf5_ver") or "1.14.0" +load(pathJoin("hdf5", hdf5_ver)) +nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" +load(pathJoin("nccmp", nccmp_ver)) + +setenv("CC", "mpiicc") +setenv("CXX", "mpiicpc") +setenv("FC", "mpiifort") +setenv("CMAKE_Platform", "orion.intel") + +whatis("Description: UFS build environment") \ No newline at end of file diff --git a/modulefiles/ufs_wcoss2.intel.lua b/modulefiles/ufs_wcoss2.intel.lua new file mode 100644 index 0000000..a825af6 --- /dev/null +++ b/modulefiles/ufs_wcoss2.intel.lua @@ -0,0 +1,55 @@ +help([[ +loads UFS Model prerequisites on Cactus and Dogwood +]]) + +-- First, look for libraries in "prod" space +PrgEnv_intel_ver=os.getenv("PrgEnv_intel_ver") or "8.1.0" +load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver)) + +intel_ver=os.getenv("intel_ver") or "19.1.3.304" +load(pathJoin("intel", intel_ver)) + +craype_ver=os.getenv("craype_ver") or "2.7.13" +load(pathJoin("craype", craype_ver)) + +cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.12" +load(pathJoin("cray-mpich", cray_mpich_ver)) + +cmake_ver=os.getenv("cmake_ver") or "3.20.2" +load(pathJoin("cmake", cmake_ver)) + +local ufs_modules = { + {["jasper"] = "2.0.25"}, + {["zlib"] = "1.2.11"}, + {["libpng"] = "1.6.37"}, + {["hdf5-C"] = "1.14.0"}, + {["netcdf-C"] = "4.9.2"}, + {["pio-C"] = "2.5.10"}, + {["esmf-C"] = "8.6.0"}, + {["fms"] = "2024.01"}, + {["bacio"] = "2.4.1"}, + {["crtm"] = "2.4.0"}, + {["g2"] = "3.5.1"}, + {["g2tmpl"] = "1.13.0"}, + {["ip"] = "4.0.0"}, + {["sp"] = "2.3.3"}, + {["w3emc"] = "2.12.0"}, + {["gftl-shared"] = "1.6.1"}, + {["mapl-C"] = "2.40.3"}, + {["pnetcdf-C"] = "1.12.2"}, + {["scotch"] = "7.0.4"}, +} + +for i = 1, #ufs_modules do + for name, default_version in pairs(ufs_modules[i]) do + local env_version_name = string.gsub(name, "-", "_") .. "_ver" + load(pathJoin(name, os.getenv(env_version_name) or default_version)) + end +end + +setenv("CC", "cc") +setenv("CXX", "CC") +setenv("FC", "ftn") +setenv("CMAKE_Platform", "wcoss2") + +whatis("Description: UFS build environment") \ No newline at end of file From 5048098391082b54eba094ff0f4de4882714ea8f Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Wed, 16 Oct 2024 17:37:14 +0000 Subject: [PATCH 2/9] adding generic linux module build --- modulefiles/ufs_linux.gnu | 37 +++++++++++++++++++++++++++++++++++++ modulefiles/ufs_linux.intel | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 modulefiles/ufs_linux.gnu create mode 100644 modulefiles/ufs_linux.intel diff --git a/modulefiles/ufs_linux.gnu b/modulefiles/ufs_linux.gnu new file mode 100644 index 0000000..34e325e --- /dev/null +++ b/modulefiles/ufs_linux.gnu @@ -0,0 +1,37 @@ +#!/bin/bash + +#%Module###################################################################### +## +## UFS prerequisites: Linux (tested: Ubuntu) with gcc/gfortran compilers + +echo "Setting environment variables for UFS Model on Linux with gcc/gfortran" + +## +## load programming environment: compiler, flags, paths +## +export CC=${CC:-mpicc} +export CXX=${CXX:-mpicxx} +export F77=${F77:-mpif77} +export F90=${F90:-mpif90} +export FC=${FC:-mpif90} + +## +## set up variables for ../cmake/configure_linux.gnu.cmake +## +export CMAKE_Platform=linux.gnu + +## +## use own NetCDF library +## +export NETCDF=${NETCDF:-/home/builder/opt} + +## +## use pre-compiled EMSF library for above compiler / MPI combination +## +export ESMFMKFILE=${ESMFMKFILE:-/home/builder/opt/lib/esmf.mk} + +## +## NCEP libraries (need to download and build manually, see doc/README_{UBUNTU,CENTOS,...}.txt and https://github.com/NCAR/NCEPlibs) +## +export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/home/builder/opt} +export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR} \ No newline at end of file diff --git a/modulefiles/ufs_linux.intel b/modulefiles/ufs_linux.intel new file mode 100644 index 0000000..674dd76 --- /dev/null +++ b/modulefiles/ufs_linux.intel @@ -0,0 +1,37 @@ +#!/bin/bash + +#%Module###################################################################### +## +## UFS prerequisites: Linux (tested: Ubuntu) with gcc/gfortran compilers + +echo "Setting environment variables for UFS Model on Linux with gcc/gfortran" + +## +## load programming environment: compiler, flags, paths +## +export CC=${CC:-mpicc} +export CXX=${CXX:-mpicxx} +export F77=${F77:-mpif77} +export F90=${F90:-mpif90} +export FC=${FC:-mpif90} + +## +## set up variables for ../cmake/configure_linux.intel.cmake +## +export CMAKE_Platform=linux.intel + +## +## use own NetCDF library +## +export NETCDF=${NETCDF:-/home/builder/opt} + +## +## use pre-compiled EMSF library for above compiler / MPI combination +## +export ESMFMKFILE=${ESMFMKFILE:-/home/builder/opt/lib/esmf.mk} + +## +## NCEP libraries (need to download and build manually, see doc/README_{UBUNTU,CENTOS,...}.txt and https://github.com/NCAR/NCEPlibs) +## +export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/home/builder/opt} +export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR} \ No newline at end of file From ee5f5388416a78172ff1f61756a30cd0adc49627 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Thu, 17 Oct 2024 19:01:01 +0000 Subject: [PATCH 3/9] remove whitespace --- CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20b3a3f..e0182ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ # Check environment cmake_minimum_required(VERSION 3.5) +# set the project name and version +project(NEXUS + VERSION 0.2.0 + LANGUAGES Fortran) # set compiler if(NOT DEFINED ENV{FC}) @@ -11,11 +15,6 @@ set(CMAKE_Fortran_COMPILER $ENV{FC}) set(CMAKE_C_COMPILER $ENV{CC}) set(CMAKE_CXX_COMPILER $ENV{CXX}) -# set the project name and version -project(NEXUS - VERSION 0.2.0 - LANGUAGES Fortran) - # Include local macros list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") From a721ee732d673cfa4485d672a4d45df66866b5b0 Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Thu, 17 Oct 2024 19:04:45 +0000 Subject: [PATCH 4/9] precommit issues --- modulefiles/ufs_common.lua | 2 +- modulefiles/ufs_derecho.intel.lua | 2 +- modulefiles/ufs_gaea.intel.lua | 4 +-- modulefiles/ufs_hera.intel.lua | 2 +- modulefiles/ufs_hera.intelllvm.lua | 2 +- modulefiles/ufs_hercules.intel.lua | 2 +- modulefiles/ufs_hercules.intelllvm.lua | 2 +- modulefiles/ufs_linux.gnu | 2 +- modulefiles/ufs_linux.intel | 2 +- modulefiles/ufs_orion.intel.lua | 2 +- modulefiles/ufs_wcoss2.intel.lua | 2 +- modulefiles/wcoss_dell_p3 | 34 -------------------------- 12 files changed, 12 insertions(+), 46 deletions(-) delete mode 100644 modulefiles/wcoss_dell_p3 diff --git a/modulefiles/ufs_common.lua b/modulefiles/ufs_common.lua index 3c7ddbc..062fa38 100644 --- a/modulefiles/ufs_common.lua +++ b/modulefiles/ufs_common.lua @@ -29,4 +29,4 @@ for i = 1, #ufs_modules do local env_version_name = string.gsub(name, "-", "_") .. "_ver" load(pathJoin(name, os.getenv(env_version_name) or default_version)) end -end \ No newline at end of file +end diff --git a/modulefiles/ufs_derecho.intel.lua b/modulefiles/ufs_derecho.intel.lua index e3bc52f..f858670 100644 --- a/modulefiles/ufs_derecho.intel.lua +++ b/modulefiles/ufs_derecho.intel.lua @@ -27,4 +27,4 @@ load(pathJoin("stack-python", stack_python_ver)) setenv("CMAKE_Platform", "derecho.intel") load("ufs-weather-model-env") -whatis("Description: UFS build environment") \ No newline at end of file +whatis("Description: UFS build environment") diff --git a/modulefiles/ufs_gaea.intel.lua b/modulefiles/ufs_gaea.intel.lua index 5014c19..8c21dfa 100644 --- a/modulefiles/ufs_gaea.intel.lua +++ b/modulefiles/ufs_gaea.intel.lua @@ -1,5 +1,5 @@ help([[ - This module loads libraries required for building and running UFS Weather Model + This module loads libraries required for building and running UFS Weather Model on the NOAA RDHPC machine Gaea C5 using Intel-2023.1.0. ]]) @@ -30,4 +30,4 @@ unload("cray-libsci") setenv("CC","cc") setenv("CXX","CC") setenv("FC","ftn") -setenv("CMAKE_Platform","gaea.intel") \ No newline at end of file +setenv("CMAKE_Platform","gaea.intel") diff --git a/modulefiles/ufs_hera.intel.lua b/modulefiles/ufs_hera.intel.lua index d4c61c0..feaa88e 100644 --- a/modulefiles/ufs_hera.intel.lua +++ b/modulefiles/ufs_hera.intel.lua @@ -23,4 +23,4 @@ setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") setenv("CMAKE_Platform", "hera.intel") -whatis("Description: UFS build environment") \ No newline at end of file +whatis("Description: UFS build environment") diff --git a/modulefiles/ufs_hera.intelllvm.lua b/modulefiles/ufs_hera.intelllvm.lua index 213135d..49e9f2b 100644 --- a/modulefiles/ufs_hera.intelllvm.lua +++ b/modulefiles/ufs_hera.intelllvm.lua @@ -30,4 +30,4 @@ setenv("CXX", "mpiicpc") setenv("FC", "mpifc") setenv("CMAKE_Platform", "hera.intel") -whatis("Description: UFS build environment") \ No newline at end of file +whatis("Description: UFS build environment") diff --git a/modulefiles/ufs_hercules.intel.lua b/modulefiles/ufs_hercules.intel.lua index 087939b..455ea4d 100644 --- a/modulefiles/ufs_hercules.intel.lua +++ b/modulefiles/ufs_hercules.intel.lua @@ -23,4 +23,4 @@ setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") setenv("CMAKE_Platform", "hercules.intel") -whatis("Description: UFS build environment") \ No newline at end of file +whatis("Description: UFS build environment") diff --git a/modulefiles/ufs_hercules.intelllvm.lua b/modulefiles/ufs_hercules.intelllvm.lua index f0b509e..5fb97a5 100644 --- a/modulefiles/ufs_hercules.intelllvm.lua +++ b/modulefiles/ufs_hercules.intelllvm.lua @@ -27,4 +27,4 @@ setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") setenv("CMAKE_Platform", "hercules.intel") -whatis("Description: UFS build environment") \ No newline at end of file +whatis("Description: UFS build environment") diff --git a/modulefiles/ufs_linux.gnu b/modulefiles/ufs_linux.gnu index 34e325e..fd1f49e 100644 --- a/modulefiles/ufs_linux.gnu +++ b/modulefiles/ufs_linux.gnu @@ -34,4 +34,4 @@ export ESMFMKFILE=${ESMFMKFILE:-/home/builder/opt/lib/esmf.mk} ## NCEP libraries (need to download and build manually, see doc/README_{UBUNTU,CENTOS,...}.txt and https://github.com/NCAR/NCEPlibs) ## export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/home/builder/opt} -export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR} \ No newline at end of file +export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR} diff --git a/modulefiles/ufs_linux.intel b/modulefiles/ufs_linux.intel index 674dd76..6e47862 100644 --- a/modulefiles/ufs_linux.intel +++ b/modulefiles/ufs_linux.intel @@ -34,4 +34,4 @@ export ESMFMKFILE=${ESMFMKFILE:-/home/builder/opt/lib/esmf.mk} ## NCEP libraries (need to download and build manually, see doc/README_{UBUNTU,CENTOS,...}.txt and https://github.com/NCAR/NCEPlibs) ## export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/home/builder/opt} -export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR} \ No newline at end of file +export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR} diff --git a/modulefiles/ufs_orion.intel.lua b/modulefiles/ufs_orion.intel.lua index 556e0a5..d6e25ef 100644 --- a/modulefiles/ufs_orion.intel.lua +++ b/modulefiles/ufs_orion.intel.lua @@ -26,4 +26,4 @@ setenv("CXX", "mpiicpc") setenv("FC", "mpiifort") setenv("CMAKE_Platform", "orion.intel") -whatis("Description: UFS build environment") \ No newline at end of file +whatis("Description: UFS build environment") diff --git a/modulefiles/ufs_wcoss2.intel.lua b/modulefiles/ufs_wcoss2.intel.lua index a825af6..983365d 100644 --- a/modulefiles/ufs_wcoss2.intel.lua +++ b/modulefiles/ufs_wcoss2.intel.lua @@ -52,4 +52,4 @@ setenv("CXX", "CC") setenv("FC", "ftn") setenv("CMAKE_Platform", "wcoss2") -whatis("Description: UFS build environment") \ No newline at end of file +whatis("Description: UFS build environment") diff --git a/modulefiles/wcoss_dell_p3 b/modulefiles/wcoss_dell_p3 deleted file mode 100644 index 8ca322d..0000000 --- a/modulefiles/wcoss_dell_p3 +++ /dev/null @@ -1,34 +0,0 @@ -#%Module###################################################################### -## -## NEXUS Prerequisites: Venus and Mars (WCOSS Dell) - -proc ModulesHelp {} { - puts stderr "\tcit - loads modules required for building and running NEXUS on the Dell side of WCOSS" -} - -module-whatis "loads NEXUS prerequisites on Venus and Mars" - -## clean up environment --------------------------------------------------- -module purge - -module load ips/18.0.5.274 -module load impi/18.0.1 -module load lsf/10.1 - -## load hpc-stack --------------------------------------------------------- -module use /usrx/local/nceplibs/dev/hpc-stack/libs/hpc-stack/modulefiles/stack -module load hpc/1.1.0 -module load hpc-ips/18.0.5.274 -module load hpc-impi/18.0.1 - -## load esmf / netcdf ----------------------------------------------------- -module load hdf5/1.10.6 -module load netcdf/4.7.4 -module load esmf/8_2_0 - -## cmake environment ------------------------------------------------------ -module load cmake/3.20.0 -setenv CMAKE_C_COMPILER mpiicc -setenv CMAKE_CXX_COMPILER mpiicpc -setenv CMAKE_Fortran_COMPILER mpiifort -setenv CMAKE_Platform wcoss_dell_p3 From b1481f229aaff0e43de2911b72c4ed7b40faf39c Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Thu, 17 Oct 2024 19:49:05 +0000 Subject: [PATCH 5/9] remoe old files --- modulefiles/hera.intel | 30 ------------------------------ modulefiles/orion.intel | 32 -------------------------------- 2 files changed, 62 deletions(-) delete mode 100644 modulefiles/hera.intel delete mode 100644 modulefiles/orion.intel diff --git a/modulefiles/hera.intel b/modulefiles/hera.intel deleted file mode 100644 index c3dfab4..0000000 --- a/modulefiles/hera.intel +++ /dev/null @@ -1,30 +0,0 @@ -#%Module###################################################################### -## -## NEXUS Prerequisites: Hera/Intel - -proc ModulesHelp {} { - puts stderr "\tcit - loads modules required for building and running NEXUS on Hera/Intel" -} - -module-whatis "loads NEXUS prerequisites for Hera/Intel" - -## clean up environment --------------------------------------------------- -module purge - -## load hpc-stack -module use /scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack -module load hpc/1.1.0 -module load hpc-intel/18.0.5.274 -module load hpc-impi/2018.0.4 - -## load esmf / netcdf ----------------------------------------------------- -module load hdf5/1.10.6 -module load netcdf/4.7.4 -module load esmf/8_2_0 - -## cmake environment ------------------------------------------------------ -module load cmake/3.20.1 -setenv CMAKE_C_COMPILER mpiicc -setenv CMAKE_CXX_COMPILER mpiicpc -setenv CMAKE_Fortran_COMPILER mpiifort -setenv CMAKE_Platform hera.intel diff --git a/modulefiles/orion.intel b/modulefiles/orion.intel deleted file mode 100644 index 51487c3..0000000 --- a/modulefiles/orion.intel +++ /dev/null @@ -1,32 +0,0 @@ -#%Module###################################################################### -## -## NEXUS Prerequisites: Orion/Intel - -proc ModulesHelp {} { - puts stderr "\tcit - loads modules required for building and running NEXUS on Orion/Intel" -} - -module-whatis "loads NEXUS prerequisites for Orion/Intel" - -## clean up environment --------------------------------------------------- -module purge - -module load contrib noaatools - -## load hpc-stack --------------------------------------------------------- -module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack -module load hpc/1.1.0 -module load hpc-intel/2018.4 -module load hpc-impi/2018.4 - -## load esmf / netcdf ----------------------------------------------------- -module load hdf5/1.10.6 -module load netcdf/4.7.4 -module load esmf/8_2_0 - -## cmake environment ------------------------------------------------------ -module load cmake/3.18.1 -setenv CMAKE_C_COMPILER mpiicc -setenv CMAKE_CXX_COMPILER mpiicpc -setenv CMAKE_Fortran_COMPILER mpiifort -setenv CMAKE_Platform orion.intel From 7d4caf91047108342fdadb4009e609ed86835ecf Mon Sep 17 00:00:00 2001 From: bbakernoaa Date: Fri, 18 Oct 2024 01:08:36 +0000 Subject: [PATCH 6/9] remove FC etc --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0182ac..a4aecc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,10 +11,6 @@ if(NOT DEFINED ENV{FC}) message(FATAL_ERROR "CMAKE_Fortran_COMPILER is not defined") endif() -set(CMAKE_Fortran_COMPILER $ENV{FC}) -set(CMAKE_C_COMPILER $ENV{CC}) -set(CMAKE_CXX_COMPILER $ENV{CXX}) - # Include local macros list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") From af46dd68cc5316cc0f58eb402a0055676a10dd2a Mon Sep 17 00:00:00 2001 From: Barry Baker Date: Fri, 18 Oct 2024 11:32:26 -0400 Subject: [PATCH 7/9] Update CMakeLists.txt Co-authored-by: Zachary Moon --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4aecc1..135f0c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Check environment cmake_minimum_required(VERSION 3.5) -# set the project name and version +# Set the project name and version project(NEXUS VERSION 0.2.0 LANGUAGES Fortran) From c3e6bacad5bb1256b87692e77c7acc32aa389447 Mon Sep 17 00:00:00 2001 From: Barry Baker Date: Fri, 18 Oct 2024 11:32:41 -0400 Subject: [PATCH 8/9] Update CMakeLists.txt Co-authored-by: Zachary Moon --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 135f0c1..cf22830 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,9 +6,15 @@ project(NEXUS VERSION 0.2.0 LANGUAGES Fortran) -# set compiler +# FC should be used to set compiler if(NOT DEFINED ENV{FC}) - message(FATAL_ERROR "CMAKE_Fortran_COMPILER is not defined") + message(WARNING "FC is not set. You may want to use it to specify a specific compiler.") +else() + if("$ENV{FC}" STREQUAL "") + message(WARNING "FC is set to empty string. You may want to use it to specify a specific compiler.") + else() + message(STATUS "FC is set: '${FC}'") + endif() endif() # Include local macros From 252aa4317f0945b52ba24b2958b8623592223327 Mon Sep 17 00:00:00 2001 From: Barry Baker Date: Fri, 18 Oct 2024 11:38:00 -0400 Subject: [PATCH 9/9] Update ufs_common.lua --- modulefiles/ufs_common.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/modulefiles/ufs_common.lua b/modulefiles/ufs_common.lua index 062fa38..aa6702f 100644 --- a/modulefiles/ufs_common.lua +++ b/modulefiles/ufs_common.lua @@ -11,17 +11,6 @@ local ufs_modules = { {["netcdf-fortran"] = "4.6.1"}, {["parallelio"] = "2.5.10"}, {["esmf"] = "8.6.0"}, - {["fms"] = "2024.01"}, - {["bacio"] = "2.4.1"}, - {["crtm"] = "2.4.0"}, - {["g2"] = "3.5.1"}, - {["g2tmpl"] = "1.13.0"}, - {["ip"] = "4.3.0"}, - {["sp"] = "2.5.0"}, - {["w3emc"] = "2.10.0"}, - {["gftl-shared"] = "1.6.1"}, - {["mapl"] = "2.40.3-esmf-8.6.0"}, - {["scotch"] = "7.0.4"}, } for i = 1, #ufs_modules do