diff --git a/scm/doc/TechGuide/chap_quick.rst b/scm/doc/TechGuide/chap_quick.rst index 78191f568..5c7880535 100644 --- a/scm/doc/TechGuide/chap_quick.rst +++ b/scm/doc/TechGuide/chap_quick.rst @@ -214,13 +214,24 @@ However, we have provided an example procedure in The main downside to spack-stack is that it contains a large number of libraries and utilities used by the whole Unified Forecast System and related applications, only a minority of which are required for the SCM. Users may install libraries manually if they wish, but they will need to make sure the appropriate environment variables -are set to the correct values so that the build system can find them, as described in the following chapter. +are set to the correct values so that the build system can find them, as described in the following paragraphs. +<<<<<<< HEAD Setting up compilation environment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For users on a pre-configured platform, the spack-stack environment can be loaded via one of the provided modules in ``scm/etc/modules/`` as described in :numref:`Section %s `. +======= +For users on a pre-configured platform, you can load the spack-stack environment via one of the provided modules in ``scm/etc/modules/``. +For example, users on the NSF NCAR machine Derecho who wish to use Intel compilers can do the following: + +:: + + cd [path/to/ccpp-scm/] + module use scm/etc/modules/ + module load derecho_intel +>>>>>>> feature/modulefile_updates Additionally, for users who have installed spack-stack on their own MacOS or Linux machine can use the provided ``macos_clang`` or ``linux_gnu`` modules. @@ -237,6 +248,19 @@ compilers (``CC``, ``CXX``, ``FC``), as well as the root directories for the lib provided Dockerfile in ``ccpp-scm/docker/``, so users can reference that file for guidance on how to install this software and set these variables. +If libraries were installed via spack-stack, users can load modules similarly to those available on pre-configured platforms. +For a user on MacOS, who has installed spack-stack with ``clang``/``gfortran`` compilers, they can set up the build environment +by setting the SPACK_STACK_DIR variable to the appropriate path, and loading the module as on pre-configured platforms described above. + +:: + + export SPACK_STACK_DIR=[/path/to/spack-stack] + cd [path/to/ccpp-scm/] + module use scm/etc/modules/ + module load macos_clang + +A module file is also provided for a generic linux platform with gnu compilers. For other platforms/combinations, you may be able +to modify the provided modulefiles to work with your spack-stack install, otherwise reference the above procedure for manually installed libraries. Python requirements """"""""""""""""""""" @@ -487,7 +511,7 @@ If using the main branch, you should run the above command to ensure you have th - ``--case [-c]`` - - **This is the only required argument.** The provided argument should correspond to the name of a case in + - The provided argument should correspond to the name of a case in ``../etc/case_config`` (without the ``.nml`` extension). - ``--suite [-s]`` @@ -589,7 +613,11 @@ configuration files located in ``../etc/case_config`` (*without the .nml extensi specifying a suite other than the default, the suite name used must match the value of the suite name in one of the suite definition files located in ``../../ccpp/suites`` (Note: not the filename of the suite definition file). As +<<<<<<< HEAD part of the CCPP SCM v7.0.0 release, the following suite names are supported: +======= +part of the seventh CCPP release, the following suite names are supported: +>>>>>>> feature/modulefile_updates #. SCM_GFS_v16 diff --git a/scm/etc/CENTOS_docker_setup.sh b/scm/etc/CENTOS_docker_setup.sh deleted file mode 100755 index c7164cfd0..000000000 --- a/scm/etc/CENTOS_docker_setup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -echo "Setting environment variables for SCM-CCPP on CENTOS with gcc/gfortran" - -MYDIR=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P) - -export SCM_ROOT=$MYDIR/../.. - -export CC=/opt/rh/devtoolset-9/root/usr/bin/gcc -export CXX=/opt/rh/devtoolset-9/root/usr/bin/g++ -export F77=/opt/rh/devtoolset-9/root/usr/bin/gfortran -export F90=/opt/rh/devtoolset-9/root/usr/bin/gfortran -export FC=/opt/rh/devtoolset-9/root/usr/bin/gfortran - -export NETCDF=/comsoftware/libs/netcdf - -echo "Running NCEPLIBS installation script for SCM-CCPP" -cd .. -./contrib/build_nceplibs.sh $PWD/nceplibs -cd scm diff --git a/scm/etc/modules/derecho_gnu.lua b/scm/etc/modules/derecho_gnu.lua index be07155c4..f7f64fb57 100644 --- a/scm/etc/modules/derecho_gnu.lua +++ b/scm/etc/modules/derecho_gnu.lua @@ -1,28 +1,27 @@ help([[ This module loads libraries for building the CCPP Single-Column Model on -the CISL machine Derecho (Cray) using Intel-classic-2023.0.0 +the CISL machine Derecho (Cray) using GNU 12.2.0 ]]) whatis([===[Loads spack-stack libraries needed for building the CCPP SCM on Derecho with GNU compilers]===]) -setenv("LMOD_TMOD_FIND_FIRST","yes") -load("ncarenv/23.09") -load("cmake/3.26.3") - -prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/spack-stack/derecho/modulefiles") -prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core") +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/unified-env/install/modulefiles/Core") load("stack-gcc/12.2.0") load("stack-cray-mpich/8.1.25") -load("stack-python/3.10.8") -load("py-f90nml") -load("py-netcdf4/1.5.8") +load("stack-python/3.10.13") +load("cmake/3.23.1") +load("hdf5/1.14.0") load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.0") +load("netcdf-fortran/4.6.1") load("bacio/2.4.1") -load("sp/2.3.3") -load("w3emc") +load("sp/2.5.0") +load("w3emc/2.10.0") + +load("py-f90nml") +load("py-netcdf4/1.5.8") setenv("CMAKE_C_COMPILER","mpicc") setenv("CMAKE_CXX_COMPILER","mpicxx") diff --git a/scm/etc/modules/derecho_intel.lua b/scm/etc/modules/derecho_intel.lua index 37f784bfe..07b8d3627 100644 --- a/scm/etc/modules/derecho_intel.lua +++ b/scm/etc/modules/derecho_intel.lua @@ -1,28 +1,28 @@ help([[ This module loads libraries for building the CCPP Single-Column Model on -the CISL machine Derecho (Cray) using Intel-classic-2023.0.0 +the CISL machine Derecho (Cray) using Intel-classic-2021.10.0 ]]) whatis([===[Loads spack-stack libraries needed for building the CCPP SCM on Derecho with Intel compilers]===]) setenv("LMOD_TMOD_FIND_FIRST","yes") load("ncarenv/23.09") -load("cmake/3.26.3") -prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/spack-stack/derecho/modulefiles") -prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core") +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/unified-env/install/modulefiles/Core") load("stack-intel/2021.10.0") load("stack-cray-mpich/8.1.25") -load("stack-python/3.10.8") +load("stack-python/3.10.13") load("py-f90nml") load("py-netcdf4/1.5.8") +load("cmake/3.23.1") load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.0") +load("netcdf-fortran/4.6.1") load("bacio/2.4.1") -load("sp/2.3.3") -load("w3emc") +load("sp/2.5.0") +load("w3emc/2.10.0") setenv("CMAKE_C_COMPILER","cc") setenv("CMAKE_CXX_COMPILER","CC") diff --git a/scm/etc/modules/hera_gnu.lua b/scm/etc/modules/hera_gnu.lua index 10d0c82f4..5725ba371 100644 --- a/scm/etc/modules/hera_gnu.lua +++ b/scm/etc/modules/hera_gnu.lua @@ -12,10 +12,10 @@ prepend_path("MODULEPATH", "/scratch2/NCEPDEV/stmp1/role.epic/spack-stack/spack- load("stack-gcc/13.3.0") load("stack-openmpi/4.1.6") -load("cmake/3.23.1") load("stack-python/3.10.13") load("py-f90nml") load("py-netcdf4/1.5.8") +load("cmake/3.23.1") load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.1") diff --git a/scm/etc/modules/hera_intel.lua b/scm/etc/modules/hera_intel.lua index e682bef4e..35e483934 100644 --- a/scm/etc/modules/hera_intel.lua +++ b/scm/etc/modules/hera_intel.lua @@ -9,10 +9,10 @@ prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-s load("stack-intel/2021.5.0") load("stack-intel-oneapi-mpi/2021.5.1") -load("cmake/3.23.1") load("stack-python/3.10.13") load("py-f90nml") load("py-netcdf4/1.5.8") +load("cmake/3.23.1") load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.1") diff --git a/scm/etc/modules/jet_gnu.lua b/scm/etc/modules/jet_gnu.lua deleted file mode 100644 index 96d5a1c97..000000000 --- a/scm/etc/modules/jet_gnu.lua +++ /dev/null @@ -1,31 +0,0 @@ -help([[ -This module loads libraries for building the CCPP Single-Column Model on -the NOAA RDHPC machine Jet using GNU 9.2.0 -]]) - -whatis([===[Loads libraries needed for building the CCPP SCM on Jet with GNU compilers ]===]) - -prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/spack-stack/modulefiles") - -load("cmake/3.26.4") -load("miniconda/3.9.12") - -prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/role.epic/modulefiles") -prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core") - -load("stack-gcc/9.2.0") -load("stack-openmpi/3.1.4") -load("stack-python/3.10.8") -load("py-f90nml") -load("py-netcdf4/1.5.8") - -load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.0") -load("bacio/2.4.1") -load("sp/2.3.3") -load("w3emc") - -setenv("CMAKE_C_COMPILER","mpicc") -setenv("CMAKE_CXX_COMPILER","mpicxx") -setenv("CMAKE_Fortran_COMPILER","mpif90") -setenv("CMAKE_Platform","jet.gnu") diff --git a/scm/etc/modules/jet_intel.lua b/scm/etc/modules/jet_intel.lua index 8c232ed26..5376fe006 100644 --- a/scm/etc/modules/jet_intel.lua +++ b/scm/etc/modules/jet_intel.lua @@ -5,25 +5,20 @@ the NOAA RDHPC machine Jet using Intel-2021.5.0 whatis([===[Loads libraries needed for building the CCPP SCM on Jet with Intel compilers ]===]) -prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/spack-stack/modulefiles") - -load("cmake/3.26.4") -load("miniconda/3.9.12") - -prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/role.epic/modulefiles") -prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core") +prepend_path("MODULEPATH","/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core") load("stack-intel/2021.5.0") load("stack-intel-oneapi-mpi/2021.5.1") -load("stack-python/3.10.8") +load("stack-python/3.10.13") load("py-f90nml") load("py-netcdf4/1.5.8") +load("cmake/3.23.1") load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.0") +load("netcdf-fortran/4.6.1") load("bacio/2.4.1") -load("sp/2.3.3") -load("w3emc") +load("sp/2.5.0") +load("w3emc/2.10.0") setenv("CMAKE_C_COMPILER","mpiicc") setenv("CMAKE_CXX_COMPILER","mpiicpc") diff --git a/scm/etc/modules/linux_gnu.lua b/scm/etc/modules/linux_gnu.lua index 1c0c65efa..488706d2e 100644 --- a/scm/etc/modules/linux_gnu.lua +++ b/scm/etc/modules/linux_gnu.lua @@ -17,13 +17,11 @@ load("stack-openmpi/4.1.6") load("cmake/3.28.3") -load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.1") - load("py-f90nml/1.4.3") load("py-netcdf4/1.5.8") - +load("netcdf-c/4.9.2") +load("netcdf-fortran/4.6.1") load("bacio/2.4.1") load("sp/2.5.0") load("w3emc/2.10.0") diff --git a/scm/etc/modules/macos_clang.lua b/scm/etc/modules/macos_clang.lua index 41aef7680..b25aad8ca 100644 --- a/scm/etc/modules/macos_clang.lua +++ b/scm/etc/modules/macos_clang.lua @@ -15,13 +15,11 @@ load("stack-openmpi/4.1.6") load("cmake/3.28.3") -load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.1") - load("py-f90nml/1.4.3") load("py-netcdf4/1.5.8") - +load("netcdf-c/4.9.2") +load("netcdf-fortran/4.6.1") load("bacio/2.4.1") load("sp/2.5.0") load("w3emc/2.10.0") diff --git a/scm/etc/modules/orion_gnu.lua b/scm/etc/modules/orion_gnu.lua deleted file mode 100644 index 17eb12b09..000000000 --- a/scm/etc/modules/orion_gnu.lua +++ /dev/null @@ -1,30 +0,0 @@ -help([[ -This module loads libraries for building the CCPP Single-Column Model on -the NOAA RDHPC machine orion using GNU 10.2.0 -]]) - -whatis([===[Loads libraries needed for building the CCPP SCM on Orion with GNU compilers ]===]) - -prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/modulefiles") - -load("cmake/3.22.1") -load("python/3.9.2") - -prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core") - -load("stack-gcc/10.2.0") -load("stack-openmpi/4.0.4") -load("stack-python/3.10.8") -load("py-f90nml") -load("py-netcdf4/1.5.8") - -load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.0") -load("bacio/2.4.1") -load("sp/2.3.3") -load("w3emc") - -setenv("CMAKE_C_COMPILER","mpicc") -setenv("CMAKE_CXX_COMPILER","mpicxx") -setenv("CMAKE_Fortran_COMPILER","mpif90") -setenv("CMAKE_Platform","orion.gnu") diff --git a/scm/etc/modules/orion_intel.lua b/scm/etc/modules/orion_intel.lua index 005119c5d..b95162412 100644 --- a/scm/etc/modules/orion_intel.lua +++ b/scm/etc/modules/orion_intel.lua @@ -5,24 +5,21 @@ the NOAA RDHPC machine Orion using Intel-2021.5.0 whatis([===[Loads libraries needed for building the CCPP SCM on Orion with Intel compilers ]===]) -prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/modulefiles") +prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/unified-env-rocky9/install/modulefiles/Core") -load("cmake/3.22.1") -load("python/3.9.2") - -prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core") - -load("stack-intel/2022.0.2") -load("stack-intel-oneapi-mpi/2021.5.1") -load("stack-python/3.10.8") +load("stack-intel/2021.9.0") +load("stack-intel-oneapi-mpi/2021.9.0") +load("stack-python/3.10.13") load("py-f90nml") load("py-netcdf4/1.5.8") +load("cmake/3.23.1") load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.0") +load("netcdf-fortran/4.6.1") load("bacio/2.4.1") -load("sp/2.3.3") -load("w3emc") +load("sp/2.5.0") +load("w3emc/2.10.0") + setenv("CMAKE_C_COMPILER","mpiicc") setenv("CMAKE_CXX_COMPILER","mpiicpc") diff --git a/scm/src/run_scm.py b/scm/src/run_scm.py index b879dd824..c14938fe0 100755 --- a/scm/src/run_scm.py +++ b/scm/src/run_scm.py @@ -195,6 +195,9 @@ def parse_arguments(): mpi_command = args.mpi_command stop_on_error = args.stop_on_error + if not case and not file: + parser.error('Either "--case" or "--file" must be specified. Use "--help" for more information.') + if not sdf: sdf = DEFAULT_SUITE diff --git a/scm/src/supported_suites.py b/scm/src/supported_suites.py index 6c1f0d311..2beaff71f 100644 --- a/scm/src/supported_suites.py +++ b/scm/src/supported_suites.py @@ -1,2 +1,2 @@ -suites = ["SCM_GFS_v16","SCM_GFS_v16_RRTMGP","SCM_GFS_v17_p8_ugwpv1","SCM_RAP","SCM_HRRR_gf","SCM_WoFS_v0"] +suites = ["SCM_GFS_v16","SCM_GFS_v16_RRTMGP","SCM_GFS_v17_p8_ugwpv1","SCM_HRRR_gf","SCM_WoFS_v0"]