Skip to content

Commit

Permalink
Updates to build emcsfc_snow2mdl with intelLLVM.
Browse files Browse the repository at this point in the history
  • Loading branch information
George Gayno committed Aug 12, 2024
1 parent 47705d5 commit 8ace80f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
30 changes: 15 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ option(OPENMP "use OpenMP threading" ON)
option(ENABLE_DOCS "Enable generation of doxygen-based documentation." OFF)

# Utilities to be built (Default: ALL)
option(ICEBLEND "Enable building emcsfc_ice_blend.fd" ON)
option(ICEBLEND "Enable building emcsfc_ice_blend.fd" OFF)
option(SNOW2MDL "Enable building emcsfc_snow2mdl.fd" ON)
option(GCYCLE "Enable building global_cycle.fd" ON)
option(FRENCTOOLS "Enable building fre-nctools.fd" ON)
option(GRIDTOOLS "Enable building grid_tools.fd" ON)
option(CHGRES "Enable building chgres_cube.fd" ON)
option(GCYCLE "Enable building global_cycle.fd" OFF)
option(FRENCTOOLS "Enable building fre-nctools.fd" OFF)
option(GRIDTOOLS "Enable building grid_tools.fd" OFF)
option(CHGRES "Enable building chgres_cube.fd" OFF)
option(CHGRES_ALL "Build chgres with all input data options." OFF)
option(OROG_MASK_TOOLS "Enable building orog_mask_tools.fd" ON)
option(OROG_MASK_TOOLS "Enable building orog_mask_tools.fd" OFF)
# OROG_MASK_TOOLS must be ON for OROG_NETCDF_TOOLS to build.
option(OROG_NETCDF_TOOLS "Enable building orog_netcdf_tools.fd" OFF)
option(SFC_CLIMO_GEN "Enable building sfc_climo_gen.fd" ON)
option(VCOORD_GEN "Enable building vcoord_gen.fd" ON)
option(FVCOMTOOLS "Enable building fvcom_tools.fd" ON)
option(GBLEVENTS "Enable building gblevents.fd" ON)
option(CPLD_GRIDGEN "Enable building cpld_gridgen.fd" ON)
option(OCNICE_PREP "Enable building ocnice_prep.fd" ON)
option(WEIGHT_GEN "Enable building weight_gen.fd" ON)
option(OCEAN_MERGE "Enable building ocean_merge.fd" ON)
option(SFC_CLIMO_GEN "Enable building sfc_climo_gen.fd" OFF)
option(VCOORD_GEN "Enable building vcoord_gen.fd" OFF)
option(FVCOMTOOLS "Enable building fvcom_tools.fd" OFF)
option(GBLEVENTS "Enable building gblevents.fd" OFF)
option(CPLD_GRIDGEN "Enable building cpld_gridgen.fd" OFF)
option(OCNICE_PREP "Enable building ocnice_prep.fd" OFF)
option(WEIGHT_GEN "Enable building weight_gen.fd" OFF)
option(OCEAN_MERGE "Enable building ocean_merge.fd" OFF)

# Option to build application specific utilities
option(GFS "Enable building GFS-only utilities" OFF)
Expand Down Expand Up @@ -67,7 +67,7 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
endif()

# Set compiler flags.
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check all -ftrapuv")
Expand Down
3 changes: 3 additions & 0 deletions modulefiles/build.hercules.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,7 @@ load(pathJoin("esmf", esmf_ver))
nco_ver=os.getenv("nco_ver") or "5.0.6"
load(pathJoin("nco", nco_ver))

setenv("CC", "icx")
setenv("FC", "ifx")

whatis("Description: UFS_UTILS build environment")
2 changes: 1 addition & 1 deletion sorc/emcsfc_snow2mdl.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(lib_src

set(exe_src driver.F90)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fconvert=big-endian")
Expand Down

0 comments on commit 8ace80f

Please sign in to comment.