Skip to content

Commit

Permalink
Upgrade to spack-stack on non-production machines
Browse files Browse the repository at this point in the history
Upgrade to spack-stack on non-production machines
  • Loading branch information
aerorahul authored Nov 20, 2023
2 parents 083c4b1 + 8a68f5a commit 427d467
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 76 deletions.
17 changes: 11 additions & 6 deletions modulefiles/gfsutils_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@ help([[
Load common modules to build GFS utilities on all machines
]])

local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4"
local netcdf_c_ver=os.getenv("netcdf_c_ver") or "4.9.2"
local netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0"

local bufr_ver=os.getenv("bufr_ver") or "11.7.0"
local bacio_ver=os.getenv("bacio_ver") or "2.4.1"
local w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
local w3emc_ver=os.getenv("w3emc_ver") or "2.10.0"
local sp_ver=os.getenv("sp_ver") or "2.3.3"
local ip_ver=os.getenv("ip_ver") or "3.3.3"
local ip_ver=os.getenv("ip_ver") or "4.3.0"
local sigio_ver=os.getenv("sigio_ver") or "2.3.2"
local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
local nemsio_ver=os.getenv("nemsio_ver") or "2.5.4"
local nemsiogfs_ver=os.getenv("nemsiogfs_ver") or "2.5.3"
local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0"
local ncio_ver=os.getenv("ncio_ver") or "1.1.2"
local g2_ver=os.getenv("g2_ver") or "3.4.5"
local landsfcutil_ver=os.getenv("landsfcutil_ver") or "2.4.1"
local gempak_ver=os.getenv("gempak_ver") or "7.14.1"
local wgrib2_ver=os.getenv("wgrib2_ver") or "2.0.8"
local libpng_ver=os.getenv("libpng_ver") or "1.6.37"

load(pathJoin("netcdf", netcdf_ver))
load(pathJoin("libpng", libpng_ver))

load(pathJoin("netcdf-c", netcdf_c_ver))
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))

load(pathJoin("bufr", bufr_ver))
load(pathJoin("bacio", bacio_ver))
Expand All @@ -29,7 +34,7 @@ load(pathJoin("ip", ip_ver))
load(pathJoin("sigio", sigio_ver))
load(pathJoin("sfcio", sfcio_ver))
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("wrf_io", wrf_io_ver))
load(pathJoin("wrf-io", wrf_io_ver))
load(pathJoin("ncio", ncio_ver))
load(pathJoin("g2", g2_ver))
load(pathJoin("landsfcutil", landsfcutil_ver))
Expand Down
22 changes: 6 additions & 16 deletions modulefiles/gfsutils_hera.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,16 @@ help([[
Build environment for GFS utilities on Hera
]])

prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core")

local hpc_ver=os.getenv("hpc_ver") or "1.1.0"
local hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.5.274"
local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.0.4"
local cmake_ver=os.getenv("cmake_ver") or "3.20.1"
local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1"
local cmake_ver=os.getenv("cmake_ver") or "3.23.1"

local jasper_ver=os.getenv("jasper_ver") or "2.0.25"
local zlib_ver=os.getenv("zlib_ver") or "1.2.11"
local libpng_ver=os.getenv("libpng_ver") or "1.6.35"

load(pathJoin("hpc", hpc_ver))
load(pathJoin("hpc-intel", hpc_intel_ver))
load(pathJoin("hpc-impi", hpc_impi_ver))
load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))
load(pathJoin("cmake", cmake_ver))

load(pathJoin("jasper", jasper_ver))
load(pathJoin("zlib", zlib_ver))
load(pathJoin("png", libpng_ver))

load("gfsutils_common")

whatis("Description: GFS utilities environment on Hera with Intel Compilers")
22 changes: 6 additions & 16 deletions modulefiles/gfsutils_jet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,16 @@ help([[
Build environment for GFS utilities on Jet
]])

prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/role.epic/hpc-stack/libs/intel-18.0.5.274/modulefiles/stack")
prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core")

local hpc_ver=os.getenv("hpc_ver") or "1.2.0"
local hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.5.274"
local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.4.274"
local cmake_ver=os.getenv("cmake_ver") or "3.20.1"
local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1"
local cmake_ver=os.getenv("cmake_ver") or "3.23.1"

local jasper_ver=os.getenv("jasper_ver") or "2.0.25"
local zlib_ver=os.getenv("zlib_ver") or "1.2.11"
local libpng_ver=os.getenv("libpng_ver") or "1.6.35"

load(pathJoin("hpc", hpc_ver))
load(pathJoin("hpc-intel", hpc_intel_ver))
load(pathJoin("hpc-impi", hpc_impi_ver))
load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))
load(pathJoin("cmake", cmake_ver))

load(pathJoin("jasper", jasper_ver))
load(pathJoin("zlib", zlib_ver))
load(pathJoin("libpng", libpng_ver))

load("gfsutils_common")

whatis("Description: GFS utilities environment on Jet with Intel Compilers")
22 changes: 6 additions & 16 deletions modulefiles/gfsutils_orion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,16 @@ help([[
Build environment for GFS utilities on Orion
]])

prepend_path("MODULEPATH", "/apps/contrib/NCEP/hpc-stack/libs/hpc-stack/modulefiles/stack")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core")

local hpc_ver=os.getenv("hpc_ver") or "1.2.0"
local hpc_intel_ver=os.getenv("hpc_intel_ver") or "2018.4"
local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.4"
local cmake_ver=os.getenv("cmake_ver") or "3.22.1"
local stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2"
local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1"
local cmake_ver=os.getenv("cmake_ver") or "3.23.1"

local jasper_ver=os.getenv("jasper_ver") or "2.0.25"
local zlib_ver=os.getenv("zlib_ver") or "1.2.11"
local libpng_ver=os.getenv("libpng_ver") or "1.6.35"

load(pathJoin("hpc", hpc_ver))
load(pathJoin("hpc-intel", hpc_intel_ver))
load(pathJoin("hpc-impi", hpc_impi_ver))
load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))
load(pathJoin("cmake", cmake_ver))

load(pathJoin("jasper", jasper_ver))
load(pathJoin("zlib", zlib_ver))
load(pathJoin("png", libpng_ver))

load("gfsutils_common")

whatis("Description: GFS utilities environment on Orion with Intel Compilers")
22 changes: 7 additions & 15 deletions modulefiles/gfsutils_s4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,17 @@ help([[
Build environment for GFS utilities on S4
]])

prepend_path("MODULEPATH", "/data/prod/hpc-stack/modulefiles/stack")
prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core")

load("license_intel")

local hpc_ver=os.getenv("hpc_ver") or "1.1.0"
local hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.4"
local hpc_impi_ver=os.getenv("hpc_impi_ver") or "18.0.4"
local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.0"
local cmake_ver=os.getenv("cmake_ver") or "3.23.1"

local jasper_ver=os.getenv("jasper_ver") or "2.0.25"
local zlib_ver=os.getenv("zlib_ver") or "1.2.11"
local libpng_ver=os.getenv("libpng_ver") or "1.6.35"

load(pathJoin("hpc", hpc_ver))
load(pathJoin("hpc-intel", hpc_intel_ver))
load(pathJoin("hpc-impi", hpc_impi_ver))

load(pathJoin("jasper", jasper_ver))
load(pathJoin("zlib", zlib_ver))
load(pathJoin("png", libpng_ver))
load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))
load(pathJoin("cmake", cmake_ver))

load("gfsutils_common")

Expand Down
32 changes: 30 additions & 2 deletions modulefiles/gfsutils_wcoss2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ local cmake_ver= os.getenv("cmake_ver") or "3.20.2"
local jasper_ver=os.getenv("jasper_ver") or "2.0.25"
local zlib_ver=os.getenv("zlib_ver") or "1.2.11"
local libpng_ver=os.getenv("libpng_ver") or "1.6.37"
local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4"

local bufr_ver=os.getenv("bufr_ver") or "11.7.0"
local bacio_ver=os.getenv("bacio_ver") or "2.4.1"
local w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
local sp_ver=os.getenv("sp_ver") or "2.3.3"
local ip_ver=os.getenv("ip_ver") or "3.3.3"
local sigio_ver=os.getenv("sigio_ver") or "2.3.2"
local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
local nemsiogfs_ver=os.getenv("nemsiogfs_ver") or "2.5.3"
local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0"
local g2_ver=os.getenv("g2_ver") or "3.4.5"
local landsfcutil_ver=os.getenv("landsfcutil_ver") or "2.4.1"
local gempak_ver=os.getenv("gempak_ver") or "7.14.1"
local wgrib2_ver=os.getenv("wgrib2_ver") or "2.0.8"

load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver))
load(pathJoin("intel", intel_ver))
Expand All @@ -22,8 +37,21 @@ load(pathJoin("jasper", jasper_ver))
load(pathJoin("zlib", zlib_ver))
load(pathJoin("libpng", libpng_ver))

load("gfsutils_common")
unload("ncio")
load(pathJoin("netcdf", netcdf_ver))

load(pathJoin("bufr", bufr_ver))
load(pathJoin("bacio", bacio_ver))
load(pathJoin("w3emc", w3emc_ver))
load(pathJoin("sp", sp_ver))
load(pathJoin("ip", ip_ver))
load(pathJoin("sigio", sigio_ver))
load(pathJoin("sfcio", sfcio_ver))
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("wrf_io", wrf_io_ver))
load(pathJoin("g2", g2_ver))
load(pathJoin("landsfcutil", landsfcutil_ver))
--load(pathJoin("gempak", gempak_ver))
load(pathJoin("wgrib2", wgrib2_ver))

pushenv("HPC_OPT", "/apps/ops/para/libs")
prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304")
Expand Down
6 changes: 5 additions & 1 deletion src/enkf_chgres_recenter_nc.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
list(APPEND fortran_src
driver.f90
input_data.f90
interp.f90
interp.F90
output_data.f90
setup.f90
utils.f90
Expand All @@ -23,4 +23,8 @@ if(OpenMP_Fortran_FOUND)
target_link_libraries(${exe_name} PRIVATE OpenMP::OpenMP_Fortran)
endif()

if(ip_VERSION VERSION_GREATER_EQUAL 4.0.0)
target_compile_definitions(${exe_name} PRIVATE "IP_V4")
endif()

install(TARGETS ${exe_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ subroutine gaus_to_gaus
use output_data
use input_data
use setup
#ifdef IP_V4
use ip_mod, only: ipolates, ipolatev
#endif

implicit none

Expand Down
6 changes: 5 additions & 1 deletion src/fbwndgfs.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
list(APPEND fortran_src
fbwndgfs.f
fbwndgfs.F
)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
Expand All @@ -15,4 +15,8 @@ target_link_libraries(${exe_name} PRIVATE bacio::bacio_8
sp::sp_8
w3emc::w3emc_8)

if(w3emc_VERSION VERSION_GREATER_EQUAL 2.10)
target_compile_definitions(${exe_name} PRIVATE "W3EMC_V2_10")
endif()

install(TARGETS ${exe_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
5 changes: 5 additions & 0 deletions src/fbwndgfs.fd/fbwndgfs.f → src/fbwndgfs.fd/fbwndgfs.F
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,13 @@
DO 110 J = 1,NRSTNS
C CALL GDSWIZ(KGDS,-1,1,FILL,XPTS(J),YPTS(J),
C & ALON(J),ALAT(J),IRET,0,DUM,DUM)
#ifdef W3EMC_V2_10
CALL GDSWZD_GRIB1(KGDS,-1,1,FILL,XPTS(J),YPTS(J),
& ALON(J),ALAT(J),IRET)
#else
CALL GDSWZD(KGDS,-1,1,FILL,XPTS(J),YPTS(J),
& ALON(J),ALAT(J),IRET)
#endif
ISTN(J) = XPTS(J)
JSTN(J) = YPTS(J)
C PRINT 111,STNID(J),ALAT(J),ALON(J),ISTN(J),JSTN(J)
Expand Down
10 changes: 7 additions & 3 deletions src/mkgfsawps.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
list(APPEND fortran_src
mkgfsawps.f
mkgfsawps.F
)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
Expand All @@ -13,11 +13,15 @@ endif()
set(exe_name mkgfsawps.x)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(${exe_name} PRIVATE bacio::bacio_4
ip::ip_d
ip::ip_4
sp::sp_d
w3emc::w3emc_d)
w3emc::w3emc_4)
if(OpenMP_Fortran_FOUND)
target_link_libraries(${exe_name} PRIVATE OpenMP::OpenMP_Fortran)
endif()

if(ip_VERSION VERSION_GREATER_EQUAL 4.0.0)
target_compile_definitions(${exe_name} PRIVATE "IP_V4")
endif()

install(TARGETS ${exe_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
3 changes: 3 additions & 0 deletions src/mkgfsawps.fd/mkgfsawps.f → src/mkgfsawps.fd/mkgfsawps.F
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ PROGRAM MKGFSAWPS
C ATTRIBUTES:
C LANGUAGE: FORTRAN 90
C
#ifdef IP_V4
USE IP_MOD, ONLY: IPOLATES, IPOLATEV
#endif
PARAMETER (MXSIZE=2000000,MXSIZ3=MXSIZE*3)
PARAMETER (LUGI=31,LUGB=11,LUGO=51)
PARAMETER (LENHEAD=21)
Expand Down

0 comments on commit 427d467

Please sign in to comment.