Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IntelLLVM compiler #2224

Merged
merged 49 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9657b82
Update .gitmodules
DusanJovic-NOAA Apr 2, 2024
012800a
Update FV3
DusanJovic-NOAA Apr 2, 2024
062a2c5
Add support for IntelLLVM compiler
DusanJovic-NOAA Apr 3, 2024
185fda7
Add Hercules intel llvm modulefile. Update rt.sh and add rt_intelllvm…
DusanJovic-NOAA Apr 5, 2024
6412557
Update FV3
DusanJovic-NOAA Jul 16, 2024
80111c0
Update FV3
DusanJovic-NOAA Jul 16, 2024
9d071fa
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Jul 16, 2024
f81216c
Remove '-nowarn' flag from cmake/IntelLLVM.cmake
DusanJovic-NOAA Jul 16, 2024
b485936
Add modulefiles/ufs_hera.intelllvm.lua
DusanJovic-NOAA Jul 18, 2024
ed817f8
Update ufs_hercules.intelllvm.lua
DusanJovic-NOAA Jul 18, 2024
e9b17ff
Update rt_intelllvm.conf
DusanJovic-NOAA Jul 18, 2024
39dccea
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Jul 19, 2024
18a1a01
Update FV3
DusanJovic-NOAA Jul 19, 2024
c7413ce
Update FV3, HYCOM-interface/CMakeLists.txt and add orion.intelllvm mo…
DusanJovic-NOAA Jul 22, 2024
fa3aba4
Update FV3
DusanJovic-NOAA Jul 23, 2024
8432e70
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Jul 23, 2024
233c5bf
Update FV3
DusanJovic-NOAA Jul 23, 2024
f98cc25
Update FV3
DusanJovic-NOAA Jul 24, 2024
a865193
Update CICE
DusanJovic-NOAA Jul 24, 2024
8e7c5d1
Update .gitignore (ignore tests/rt_temp.conf)
DusanJovic-NOAA Jul 24, 2024
7dd2459
Orion fixes
DusanJovic-NOAA Jul 25, 2024
9969141
Gaea updates for Intel LLVM
DusanJovic-NOAA Jul 26, 2024
7cb8584
Update FV3
DusanJovic-NOAA Jul 30, 2024
fcff0fe
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Jul 30, 2024
aff45a0
Update CICE-interface/CICE FV3 and WW3
DusanJovic-NOAA Aug 22, 2024
26314bf
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Aug 22, 2024
d8fc0f1
Update FV3
DusanJovic-NOAA Aug 27, 2024
f8e8dac
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Aug 27, 2024
4dce521
Update llvm modulefiles
DusanJovic-NOAA Aug 28, 2024
44eb040
Update FV3
DusanJovic-NOAA Aug 28, 2024
b110ae0
Update FV3
DusanJovic-NOAA Aug 30, 2024
94337af
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Aug 30, 2024
49fcbe2
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Sep 11, 2024
693c90d
Update CICE-interface/CICE and FV3
DusanJovic-NOAA Sep 20, 2024
0787290
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Sep 20, 2024
9c1a32e
Update FV3
DusanJovic-NOAA Sep 25, 2024
0f7fd4c
Merge remote-tracking branch 'origin/develop' into support_intelllvm
DusanJovic-NOAA Sep 25, 2024
fc61949
Update CICE submodule
DusanJovic-NOAA Sep 26, 2024
4c3c9f1
Update FV3
DusanJovic-NOAA Sep 26, 2024
7d136e0
Update repo_check.sh
jkbk2004 Sep 26, 2024
0f4cbb8
add hera RT log: passed
jkbk2004 Sep 26, 2024
a7cef67
WCOSS2 RT Log
BrianCurtis-NOAA Sep 26, 2024
84261f2
add orion RT log: passed
jkbk2004 Sep 27, 2024
891befb
add gaea RT log: passed
jkbk2004 Sep 27, 2024
017dabe
add derecho RT log: passed
jkbk2004 Sep 27, 2024
b6921da
add jet RT log: passed
jkbk2004 Sep 27, 2024
68d3b0f
add hercules RT log: passed
jkbk2004 Sep 27, 2024
8d515f1
Acorn RT Log: Passed
BrianCurtis-NOAA Sep 27, 2024
3ef3caf
Revert .gitmodules and update CICE, FV3 and WW3
DusanJovic-NOAA Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ tests/fv3_conf/compile_slurm.IN
tests/fv3_conf/compile_qsub.IN
tests/fv3_conf/fv3_slurm.IN
tests/fv3_conf/fv3_qsub.IN
tests/rt_temp.conf
build*.log*
rocoto_workflow*
fail_compile_*
Expand Down
2 changes: 1 addition & 1 deletion CICE-interface/CICE
Submodule CICE updated 49 files
+4 −0 cicecore/cicedyn/analysis/ice_history.F90
+1 −1 cicecore/cicedyn/analysis/ice_history_shared.F90
+1 −2 cicecore/cicedyn/dynamics/ice_dyn_eap.F90
+2 −4 cicecore/cicedyn/dynamics/ice_dyn_evp.F90
+6 −7 cicecore/cicedyn/dynamics/ice_dyn_vp.F90
+1 −2 cicecore/cicedyn/dynamics/ice_transport_driver.F90
+8 −7 cicecore/cicedyn/general/ice_forcing.F90
+1 −4 cicecore/cicedyn/general/ice_init.F90
+46 −62 cicecore/cicedyn/general/ice_step_mod.F90
+2 −6 cicecore/cicedyn/infrastructure/ice_restart_driver.F90
+0 −1 cicecore/cicedyn/infrastructure/ice_restoring.F90
+2 −2 cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90
+8 −11 cicecore/drivers/direct/hadgem3/CICE_InitMod.F90
+8 −11 cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90
+8 −11 cicecore/drivers/mct/cesm1/CICE_InitMod.F90
+8 −10 cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90
+2 −2 cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
+1 −3 cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90
+9 −11 cicecore/drivers/nuopc/dmi/CICE_InitMod.F90
+8 −11 cicecore/drivers/standalone/cice/CICE_InitMod.F90
+10 −12 cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90
+10 −12 cicecore/drivers/unittest/halochk/CICE_InitMod.F90
+8 −11 cicecore/drivers/unittest/opticep/CICE_InitMod.F90
+260 −305 cicecore/drivers/unittest/opticep/ice_init_column.F90
+47 −62 cicecore/drivers/unittest/opticep/ice_step_mod.F90
+10 −12 cicecore/drivers/unittest/sumchk/CICE_InitMod.F90
+2 −6 cicecore/shared/ice_arrays_column.F90
+1 −1 cicecore/shared/ice_distribution.F90
+259 −303 cicecore/shared/ice_init_column.F90
+6 −1 configuration/scripts/cice.batch.csh
+54 −54 configuration/scripts/ice_in
+1 −1 configuration/scripts/machines/Macros.derecho_intelclassic
+6 −5 configuration/scripts/machines/Macros.derecho_inteloneapi
+6 −6 configuration/scripts/machines/env.derecho_cray
+6 −6 configuration/scripts/machines/env.derecho_intel
+8 −7 configuration/scripts/machines/env.derecho_inteloneapi
+6 −6 configuration/scripts/machines/env.derecho_nvhpc
+1 −0 configuration/scripts/options/set_env.gx1
+17 −5 configuration/scripts/options/set_nml.bgcz
+25 −11 configuration/scripts/options/set_nml.bgczclim
+17 −5 configuration/scripts/options/set_nml.bgczm
+7 −7 configuration/scripts/options/set_nml.e3smbgc
+7 −0 configuration/scripts/options/set_nml.zaero
+6 −4 configuration/scripts/tests/base_suite.ts
+6 −5 configuration/scripts/tests/io_suite.ts
+2 −1 configuration/scripts/tests/nothread_suite.ts
+55 −55 doc/source/user_guide/ug_case_settings.rst
+4 −2 doc/source/user_guide/ug_testing.rst
+1 −1 icepack
225 changes: 118 additions & 107 deletions CICE-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,107 +1,118 @@
### CICE Fortran compiler flags
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -fbacktrace")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fconvert=big-endian -ffree-line-length-none ")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif()
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -Wall -Wextra -fcheck=bounds -ffpe-trap=invalid,zero,overflow,underflow" )
set(CMAKE_Fortran_LINK_FLAGS "" )
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -FR -convert big_endian -assume byterecl -ftz -align array64byte")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -init=snan,arrays")
set(CMAKE_Fortran_LINK_FLAGS "")
else()
message(WARNING "Fortran compiler with ID ${CMAKE_Fortran_COMPILER_ID} will be used with CMake default options")
endif()

### CICE C compiler flags
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS_DEBUG "-O0")
set(CMAKE_C_LINK_FLAGS "")
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -traceback")
set( CMAKE_C_FLAGS_RELEASE "-O2 -fp-model precise")
set( CMAKE_C_FLAGS_DEBUG "-O0 -ftrapuv")
set( CMAKE_C_LINK_FLAGS "")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
set( CMAKE_C_FLAGS_RELEASE "-O3" )
set( CMAKE_C_FLAGS_DEBUG "-O0" )
set( CMAKE_C_LINK_FLAGS "" )
else()
message(WARNING "C compiler with ID ${CMAKE_C_COMPILER_ID} will be used with CMake default options")
endif()

# Configuration Options
set(CICE_IO "PIO" CACHE STRING "CICE OPTIONS: Choose IO options.")
set_property(CACHE CICE_IO PROPERTY STRINGS "NetCDF" "PIO" "Binary")

# Too many files to list, so include them via this file
include("cice_files.cmake")

# Collect source files for library
list(APPEND lib_src_files
${cice_shared_files}
${cice_shared_files_c}
${icepack_files}
${cice_mpi_comm_files}
${cice_nuopc_cmeps_driver_files}
${cice_cdeps_inline_files})

list(APPEND _cice_defs FORTRANUNDERSCORE
coupled)

# Select IO source files based on CICE_IO
if(CICE_IO MATCHES "NetCDF")
list(APPEND lib_src_files ${cice_netcdf_io_files})
list(APPEND _cice_defs USE_NETCDF)
elseif(CICE_IO MATCHES "PIO")
list(APPEND lib_src_files ${cice_pio2_io_files})
list(APPEND _cice_defs USE_NETCDF)
elseif(CICE_IO MATCHES "Binary")
list(APPEND lib_src_files ${cice_binary_io_files})
endif()

### Create target library and set PUBLIC interfaces on the library
add_library(cice STATIC ${lib_src_files})
set_target_properties(cice PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_compile_definitions(cice PUBLIC "${_cice_defs}")
target_include_directories(cice PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)
target_link_libraries(cice PUBLIC esmf)
if(CICE_IO MATCHES "^(NetCDF|PIO)$")
target_link_libraries(cice PUBLIC NetCDF::NetCDF_Fortran)
if(CICE_IO MATCHES "PIO")
target_link_libraries(cice PUBLIC PIO::PIO_Fortran)
endif()
endif()
if(OpenMP_Fortran_FOUND)
target_link_libraries(cice PRIVATE OpenMP::OpenMP_Fortran)
endif()

# ice prescribed
add_dependencies(cice cdeps::cdeps)
target_compile_definitions(cice PUBLIC "DISABLE_FoX")
target_link_libraries(cice PUBLIC cdeps::cdeps)

###############################################################################
### Install
###############################################################################

install(
TARGETS cice
EXPORT cice-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
COMPONENT Library)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX}/CICE)

install(EXPORT cice-config
DESTINATION lib/cmake)
### CICE Fortran compiler flags
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -fbacktrace")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fconvert=big-endian -ffree-line-length-none ")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif()
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -Wall -Wextra -fcheck=bounds -ffpe-trap=invalid,zero,overflow,underflow" )
set(CMAKE_Fortran_LINK_FLAGS "" )
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -FR -convert big_endian -assume byterecl -ftz -align array64byte")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -init=snan,arrays")
set(CMAKE_Fortran_LINK_FLAGS "")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -FR -convert big_endian -assume byterecl -ftz -align array64byte")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -init=snan,arrays")
set(CMAKE_Fortran_LINK_FLAGS "")
else()
message(WARNING "Fortran compiler with ID ${CMAKE_Fortran_COMPILER_ID} will be used with CMake default options")
endif()

### CICE C compiler flags
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS_DEBUG "-O0")
set(CMAKE_C_LINK_FLAGS "")
elseif(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$")
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -traceback")
set( CMAKE_C_FLAGS_RELEASE "-O2 -fp-model precise")
set( CMAKE_C_FLAGS_DEBUG "-O0 -ftrapuv")
set( CMAKE_C_LINK_FLAGS "")
elseif(CMAKE_C_COMPILER_ID MATCHES "^(IntelLLVM)$")
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -traceback")
set( CMAKE_C_FLAGS_RELEASE "-O2 -fp-model precise")
set( CMAKE_C_FLAGS_DEBUG "-O0")
set( CMAKE_C_LINK_FLAGS "")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
set( CMAKE_C_FLAGS_RELEASE "-O3" )
set( CMAKE_C_FLAGS_DEBUG "-O0" )
set( CMAKE_C_LINK_FLAGS "" )
else()
message(WARNING "C compiler with ID ${CMAKE_C_COMPILER_ID} will be used with CMake default options")
endif()

# Configuration Options
set(CICE_IO "PIO" CACHE STRING "CICE OPTIONS: Choose IO options.")
set_property(CACHE CICE_IO PROPERTY STRINGS "NetCDF" "PIO" "Binary")

# Too many files to list, so include them via this file
include("cice_files.cmake")

# Collect source files for library
list(APPEND lib_src_files
${cice_shared_files}
${cice_shared_files_c}
${icepack_files}
${cice_mpi_comm_files}
${cice_nuopc_cmeps_driver_files}
${cice_cdeps_inline_files})

list(APPEND _cice_defs FORTRANUNDERSCORE
coupled)

# Select IO source files based on CICE_IO
if(CICE_IO MATCHES "NetCDF")
list(APPEND lib_src_files ${cice_netcdf_io_files})
list(APPEND _cice_defs USE_NETCDF)
elseif(CICE_IO MATCHES "PIO")
list(APPEND lib_src_files ${cice_pio2_io_files})
list(APPEND _cice_defs USE_NETCDF)
elseif(CICE_IO MATCHES "Binary")
list(APPEND lib_src_files ${cice_binary_io_files})
endif()

### Create target library and set PUBLIC interfaces on the library
add_library(cice STATIC ${lib_src_files})
set_target_properties(cice PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_compile_definitions(cice PUBLIC "${_cice_defs}")
target_include_directories(cice PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)
target_link_libraries(cice PUBLIC esmf)
if(CICE_IO MATCHES "^(NetCDF|PIO)$")
target_link_libraries(cice PUBLIC NetCDF::NetCDF_Fortran)
if(CICE_IO MATCHES "PIO")
target_link_libraries(cice PUBLIC PIO::PIO_Fortran)
endif()
endif()
if(OpenMP_Fortran_FOUND)
target_link_libraries(cice PRIVATE OpenMP::OpenMP_Fortran)
endif()

# ice prescribed
add_dependencies(cice cdeps::cdeps)
target_compile_definitions(cice PUBLIC "DISABLE_FoX")
target_link_libraries(cice PUBLIC cdeps::cdeps)

###############################################################################
### Install
###############################################################################

install(
TARGETS cice
EXPORT cice-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
COMPONENT Library)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX}/CICE)

install(EXPORT cice-config
DESTINATION lib/cmake)
2 changes: 1 addition & 1 deletion FV3
Submodule FV3 updated 3 files
+1 −1 atmos_cubed_sphere
+1 −1 ccpp/physics
+1 −1 upp
14 changes: 12 additions & 2 deletions HYCOM-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -fcheck=bounds -ffpe-trap=invalid,zero,overflow,underflow" )
set(CMAKE_Fortran_LINK_FLAGS "")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "-g -traceback -mcmodel=small -r8 ${HYCOM_Extra_FORTRAN_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model source -warn nogeneral")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check all -fpe0 -ftrapuv -link_mpi=dbg -init=snan,arrays")
set(CMAKE_Fortran_LINK_FLAGS "-V ${CMAKE_Fortran_FLAGS} -static-intel")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "-g -traceback -mcmodel=small -r8 ${HYCOM_Extra_FORTRAN_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model source -warn nogeneral")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check all -fpe0 -ftrapuv -link_mpi=dbg -init=snan,arrays")
Expand All @@ -23,11 +28,16 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS_DEBUG "-O0")
set(CMAKE_C_LINK_FLAGS "")
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
elseif(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_C_FLAGS "-g -traceback -mcmodel=small ${HYCOM_Extra_C_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-O")
set(CMAKE_C_FLAGS_DEBUG "-O0 -ftrapuv")
set(CMAKE_C_LINK_FLAGS "-V ${CMAKE_C_FLAGS} -static-intel")
elseif(CMAKE_C_COMPILER_ID MATCHES "^(IntelLLVM)$")
set(CMAKE_C_FLAGS "-g -traceback -mcmodel=small ${HYCOM_Extra_C_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-O")
set(CMAKE_C_FLAGS_DEBUG "-O0")
set(CMAKE_C_LINK_FLAGS "-V ${CMAKE_C_FLAGS} -static-intel")
else()
message(WARNING "C compiler with ID ${CMAKE_C_COMPILER_ID} will be used with CMake default options")
endif()
Expand Down
9 changes: 8 additions & 1 deletion MOM6-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -fcheck=bounds -ffpe-trap=invalid,zero,overflow,underflow" )
set(CMAKE_Fortran_LINK_FLAGS "")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -i4 -r8")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -sox")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -debug minimal -fp-model source")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check -check noarg_temp_created -check nopointer -fpe0 -ftrapuv -init=snan,arrays")
set(CMAKE_Fortran_LINK_FLAGS "")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -i4 -r8")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -debug minimal -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check -check noarg_temp_created -check nopointer -fpe0 -ftrapuv -init=snan,arrays")
set(CMAKE_Fortran_LINK_FLAGS "")
else()
message(WARNING "Fortran compiler with ID ${CMAKE_Fortran_COMPILER_ID} will be used with CMake default options")
endif()
Expand Down
2 changes: 1 addition & 1 deletion WW3
Submodule WW3 updated 1 files
+15 −0 model/src/CMakeLists.txt
60 changes: 60 additions & 0 deletions cmake/IntelLLVM.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -align array64byte -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -fp-model precise")

# warning #5462: Global name too long.
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 5462")

# remark #7712: This variable has not been used.
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 7712")

# remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 8291")

# warning #5194: Source line truncated.
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 5194")

if(CMAKE_Platform STREQUAL "derecho.intel")
set(CMAKE_Fortran_LINK_FLAGS "-Wl,--copy-dt-needed-entries")
endif()

if(NOT 32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64")
endif()

if(DEBUG)
add_definitions(-DDEBUG)
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug minimal -ftrapuv -init=snan,arrays")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv")
else()
if(FASTER)
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise -assume buffered_stdout -fno-alias -align all -debug minimal -qoverride-limits -ftz")
set(CMAKE_C_FLAGS_RELEASE "-O3 -fp-model precise -debug minimal -qoverride-limits -ftz")
else()
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -debug minimal -qoverride-limits")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fp-model precise")
set(CMAKE_C_FLAGS_RELEASE "-O2 -debug minimal")
endif()
if(AVX2)
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -march=core-avx2")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=core-avx2")
elseif(SIMDMULTIARCH)
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -axSSE4.2,CORE-AVX2")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -axSSE4.2,CORE-AVX2")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mcmodel=medium")
elseif(AVX)
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -march=core-avx-i")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=core-avx-i")
endif()
endif()

if(APPLE)
# The linker on macOS does not include `common symbols` by default
# Passing the -c flag includes them and fixes an error with undefined symbols
set(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -c <TARGET>")
endif()

# This must be last, to override all other optimization settings.
if(DISABLE_FMA)
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
endif()
2 changes: 2 additions & 0 deletions cmake/configure_gaea.intelllvm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(PARALLEL_NETCDF ON CACHE BOOL "Enable parallel NetCDF" FORCE)
set(AVX2 OFF CACHE BOOL "Enable AVX2 instruction set" FORCE)
7 changes: 5 additions & 2 deletions driver/UFS.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ PROGRAM UFS
!
!-----------------------------------------------------------------------
!
use, intrinsic :: iso_fortran_env, only : compiler_version

USE MPI
USE ESMF
!
Expand Down Expand Up @@ -127,9 +129,10 @@ PROGRAM UFS
!
if (mype == 0) then
call w3tagb('ufs-weather-model',0,0,0,'np23')
write(*,'(A,A)') 'Compiler version: ', compiler_version() // new_line("")
call MPI_Get_library_version(library_version, resultlen, rc)
write(*,'(A,A)') 'MPI Library = ', library_version(1:resultlen)
write(*,'(A,I0,A,I0)')'MPI Version = ', mpi_version,'.',mpi_subversion
write(*,'(A,A)') 'MPI Library: ', library_version(1:resultlen)
write(*,'(A,I0,A,I0)')'MPI Version: ', mpi_version,'.',mpi_subversion
endif
!
!-----------------------------------------------------------------------
Expand Down
Loading