Skip to content

Commit 1edc467

Browse files
PaulMullowneyreuterbal
authored andcommitted
This version of ifs_blocked works. Ulimately, I don't expect to keep this version but it will be use to have around for a while.
1 parent 9e0a480 commit 1edc467

File tree

3 files changed

+1349
-1
lines changed

3 files changed

+1349
-1
lines changed

driver/CMakeLists.txt

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ ecbuild_add_library(
1414
ecrad_driver_read_input.F90
1515
ecrad_driver_config.F90
1616
print_matrix_mod.F90
17+
ifs_blocking.F90
1718
PUBLIC_DEFINITIONS
1819
$<$<NOT:${HAVE_OMP}>:NO_OPENMP>
1920
${GPU_OFFLOAD}GPU
2021
PUBLIC_LIBS
22+
ifs.${PREC}
2123
ecrad.${PREC}
2224
ecrad_base.${PREC}
2325
$<${HAVE_OMP}:OpenMP::OpenMP_Fortran>
26+
PRIVATE_DEFINITIONS ${GPU_OFFLOAD}GPU
2427
)
2528

2629
# To ensure device code is generated and all link time dependencies are
@@ -39,6 +42,7 @@ ecbuild_add_executable(
3942
LIBS
4043
driver_lib.${PREC}
4144
LINKER_LANGUAGE Fortran
45+
DEFINITIONS ${GPU_OFFLOAD}GPU
4246
)
4347

4448
ecbuild_add_executable(
@@ -51,19 +55,20 @@ ecbuild_add_executable(
5155
$<${HAVE_NVTX}:${NVTX_TARGET}>
5256
$<${HAVE_ROCTX}:${ROCTX_LIBRARIES}>
5357
LINKER_LANGUAGE Fortran
58+
DEFINITIONS ${GPU_OFFLOAD}GPU
5459
)
5560

5661
ecbuild_add_executable(
5762
TARGET ecrad_ifs_blocked_${PREC}
5863
SOURCES
5964
ecrad_ifs_driver_blocked.F90
60-
ifs_blocking.F90
6165
LIBS
6266
ifs.${PREC}
6367
driver_lib.${PREC}
6468
$<${HAVE_NVTX}:${NVTX_TARGET}>
6569
$<${HAVE_ROCTX}:${ROCTX_LIBRARIES}>
6670
LINKER_LANGUAGE Fortran
71+
DEFINITIONS ${GPU_OFFLOAD}GPU
6772
)
6873

6974

@@ -90,6 +95,41 @@ if( CMAKE_BUILD_TYPE MATCHES "Debug" )
9095
endif()
9196
endif()
9297

98+
ecbuild_add_executable(
99+
TARGET ecrad_ifs_blocked_new_${PREC}
100+
SOURCES
101+
ecrad_ifs_driver_blocked_new.F90
102+
LIBS
103+
ifs.${PREC}
104+
driver_lib.${PREC}
105+
$<${HAVE_NVTX}:${NVTX_TARGET}>
106+
$<${HAVE_ROCTX}:${ECRAD_GPU_ROCPROFILER_SDK_LIBRARIES}>
107+
DEFINITIONS ${GPU_OFFLOAD}GPU
108+
)
109+
110+
# For ecrad_ifs_driver_blocked_new we have to disable bounds checking
111+
# (which is enabled in Debug builds) because sequence association
112+
# and values initialized to -9999 for unused arguments is used in
113+
# the call to RADIATION_SCHEME.
114+
if( CMAKE_BUILD_TYPE MATCHES "Debug" )
115+
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
116+
set_source_files_properties(
117+
"ecrad_ifs_driver_blocked_new.F90"
118+
PROPERTIES COMPILE_FLAGS "-fcheck=no-bounds"
119+
)
120+
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
121+
set_source_files_properties(
122+
"ecrad_ifs_driver_blocked_new.F90"
123+
PROPERTIES COMPILE_FLAGS "-check nobounds"
124+
)
125+
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "PGI|NVHPC")
126+
set_source_files_properties(
127+
"ecrad_ifs_driver_blocked_new.F90"
128+
PROPERTIES COMPILE_FLAGS "-Mnobounds"
129+
)
130+
endif()
131+
endif()
132+
93133
# Create a symlink for each driver without the precision suffix.
94134
# The default is to link to the double precision version if it is built,
95135
# and single precision otherwise.

0 commit comments

Comments
 (0)