diff --git a/README.md b/README.md index 1ac10c705..94f5ae830 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,37 @@ ReadTheDocs documentation files. The `cmake` directory contains CMake package find utilities, and utilities to run units tests on some supported HPC platforms. +## Compile ufs-utils with container on Ursa, and AWS +container SIFs can be found: +AWS: EPIC users: /contrib/containers/ubuntu22.04-intel-ufs-env-v1.9.2.img + NOAA users: /contrib-epic/containers/ubuntu22.04-intel-ufs-env-v1.9.2.img +Ursa: /scratch3/NCEPDEV/nems/role.epic/containers/ubuntu22.04-intel-ufs-env-v1.9.2.img + (or at dir: /scratch4/NAGAPE/epic/Wei.Huang/containers) + +To compile use container: +img=/path/to/ubuntu22.04-intel-ufs-env-v1.9.2.img + +on AWS: + singularity shell -e -B /contrib [-B /contrib-epic] $img + # now in singularity shell with prompt: Singularity> + cd /path/to/ufs-utils-source-code-dir + ./build_all.sh +on Ursa: + singularity shell -e -B /scratch3 -B /scrathc4 $img + # now in singularity shell with prompt: Singularity> + cd /path/to/ufs-utils-source-code-dir + ./build_all.sh + +At Singularity prompt, type "exit" to quit from singularity. + +On other machines, need to copy SIF ubuntu22.04-intel-ufs-env-v1.9.2.img to the machine, +if it is not available there. + +If run executables directly, just issue singularity command as above, +and then run the executable. There is no experience/experiments to run batch jobs yet (outside Global-Workflow), +please contact Wei.Huang@noaa.gov to discuss how to run batch jobs. + + ## References Gayno G., Beck J., Carson L., [Pre-Processing: diff --git a/modulefiles/build.container.intel.lua b/modulefiles/build.container.intel.lua index b5e35f8ec..dfe4c10fc 100644 --- a/modulefiles/build.container.intel.lua +++ b/modulefiles/build.container.intel.lua @@ -2,56 +2,36 @@ help([[ Load environment to compile UFS_UTILS in a container using Intel ]]) -prepend_path("MODULEPATH", "/opt/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core") +prepend_path("MODULEPATH", "/opt/spack-stack/spack-stack-1.9.2/envs/unified-env/install/modulefiles/Core") -stack_intel_ver=os.getenv("stack_intel_ver") or "2021.10.0" -stack_impi_ver=os.getenv("stack_impi_ver") or "2021.9.0" +stack_oneapi_ver=os.getenv("stack_oneapi_ver") or "2024.2.0" +stack_impi_ver=os.getenv("stack_impi_ver") or "2021.13" -load("gnu") -load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-oneapi", stack_oneapi_ver)) load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) -unload("gnu") -cmake_ver=os.getenv("cmake_ver") or "3.23.1" -load(pathJoin("cmake", cmake_ver)) - -bacio_ver=os.getenv("bacio_ver") or "2.4.1" -load(pathJoin("bacio", bacio_ver)) - -g2_ver=os.getenv("g2_ver") or "3.5.1" -load(pathJoin("g2", g2_ver)) - -ip_ver=os.getenv("ip_ver") or "4.3.0" -load(pathJoin("ip", ip_ver)) - -nemsio_ver=os.getenv("nemsio_ver") or "2.5.4" -load(pathJoin("nemsio", nemsio_ver)) - -sp_ver=os.getenv("sp_ver") or "2.5.0" -load(pathJoin("sp", sp_ver)) - -w3emc_ver=os.getenv("w3emc_ver") or "2.10.0" -load(pathJoin("w3emc", w3emc_ver)) - -sigio_ver=os.getenv("sigio_ver") or "2.3.2" -load(pathJoin("sigio", sigio_ver)) - -png_ver=os.getenv("png_ver") or "1.6.37" -load(pathJoin("libpng", png_ver)) - -netcdf_c_ver=os.getenv("netcdf_c_ver") or "4.9.2" -load(pathJoin("netcdf-c", netcdf_c_ver)) - -netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.1" -load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) - -nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1" -load(pathJoin("nccmp", nccmp_ver)) - -esmf_ver=os.getenv("esmf_ver") or "8.6.0" -load(pathJoin("esmf", esmf_ver)) - -nco_ver=os.getenv("nco_ver") or "5.0.6" -load(pathJoin("nco", nco_ver)) +local ufs_utils_modules = { + {["cmake"] = "3.27.9" }, + {["bacio"] = "2.4.1" }, + {["g2"] = "3.5.1" }, + {["ip"] = "5.1.0" }, + {["sp"] = "2.5.0" }, + {["w3emc"] = "2.10.0" }, + {["nemsio"] = "2.5.4" }, + {["sigio"] = "2.3.3" }, + {["libpng"] = "1.6.37" }, + {["netcdf-c"] = "4.9.2" }, + {["netcdf-fortran"] = "4.6.1" }, + {["nccmp"] = "1.9.0.1"}, + {["esmf"] = "8.8.0" }, + {["nco"] = "5.2.4" }, +} + +for i = 1, #ufs_utils_modules do + for name, default_version in pairs(ufs_utils_modules[i]) do + local env_version_name = string.gsub(name, "-", "_") .. "_ver" + load(pathJoin(name, os.getenv(env_version_name) or default_version)) + end +end whatis("Description: UFS_UTILS build environment")