diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,11 @@ if(TEST_SUITE_FORTRAN) enable_language(Fortran) + if(NOT CMAKE_GENERATOR STREQUAL "Ninja") + message(WARNING + "Fortran test suite may NOT build with this CMAKE_GENERATOR = ${CMAKE_GENERATOR}.\n" + "Recommend using Ninja 1.10 or later by adding -G \"Ninja\" to cmake invocation.") + endif() endif() function(append value) diff --git a/External/SPEC/CFP2017rate/554.roms_r/CMakeLists.txt b/External/SPEC/CFP2017rate/554.roms_r/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/External/SPEC/CFP2017rate/554.roms_r/CMakeLists.txt @@ -0,0 +1,53 @@ +# https://www.spec.org/cpu2017/Docs/benchmarks/554.roms_r.html +include(../../SpecCPU2017.cmake) +if (NOT TEST_SUITE_SPEC2017_ROOT) + return () +endif () + +speccpu2017_benchmark(RATE) + +speccpu2017_add_include_dirs(.) + +# SPEC benchmark uses customized version of filepp, called specpp. +# However, these additional filepp flags do not make any impact +# to the benchmark results. This note serves a a reminder. +# set(MODULE_SPECPP_DIR "${TEST_SUITE_SPEC2017_ROOT}/bin/modules.specpp") +# add_definitions(-w -m literal-single.pm -m c-comment.pm) + +add_definitions(-DBENCHMARK -DNestedGrids=1 -DNO_GETTIMEOFDAY) + +## test ######################################################################## + +speccpu2017_run_test( + < ocean_benchmark0.in.x + STDOUT ocean_benchmark0.log + STDERR ocean_benchmark0.err + RUN_TYPE test +) + +## train ####################################################################### + +speccpu2017_run_test( + < ocean_benchmark1.in.x + STDOUT ocean_benchmark1.log + STDERR ocean_benchmark1.err + RUN_TYPE train +) + +## ref ######################################################################### + +speccpu2017_run_test( + < ocean_benchmark2.in.x + STDOUT ocean_benchmark2.log + STDERR ocean_benchmark2.err + RUN_TYPE ref +) + +################################################################################ + +# ROMS has both relative and absolute tolerances +speccpu2017_verify_output(RELATIVE_TOLERANCE 1.0e-7 ABSOLUTE_TOLERANCE 1.0e-7) + +speccpu2017_add_executable() + +speccpu2017_prepare_rundir() diff --git a/External/SPEC/CFP2017rate/CMakeLists.txt b/External/SPEC/CFP2017rate/CMakeLists.txt --- a/External/SPEC/CFP2017rate/CMakeLists.txt +++ b/External/SPEC/CFP2017rate/CMakeLists.txt @@ -13,7 +13,7 @@ add_subdirectory(544.nab_r) # C if (TEST_SUITE_FORTRAN) add_subdirectory(549.fotonik3d_r) # Fortran - #add_subdirectory(554.roms_r) # Fortran + add_subdirectory(554.roms_r) # Fortran endif () add_subdirectory(997.specrand_fr) # C diff --git a/External/SPEC/CFP2017speed/654.roms_s/CMakeLists.txt b/External/SPEC/CFP2017speed/654.roms_s/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/External/SPEC/CFP2017speed/654.roms_s/CMakeLists.txt @@ -0,0 +1,9 @@ +# https://www.spec.org/cpu2017/Docs/benchmarks/654.roms_s.html +include(../../SpecCPU2017.cmake) +if (NOT TEST_SUITE_SPEC2017_ROOT) + return () +endif () + +speccpu2017_benchmark(SPEED ORIGIN 554.roms_r) + +speccpu2017_inherit(../../CFP2017rate/554.roms_r) diff --git a/External/SPEC/CFP2017speed/CMakeLists.txt b/External/SPEC/CFP2017speed/CMakeLists.txt --- a/External/SPEC/CFP2017speed/CMakeLists.txt +++ b/External/SPEC/CFP2017speed/CMakeLists.txt @@ -10,7 +10,7 @@ add_subdirectory(644.nab_s) # C if (TEST_SUITE_FORTRAN) add_subdirectory(649.fotonik3d_s) # Fortran - #add_subdirectory(654.roms_s) # Fortran + add_subdirectory(654.roms_s) # Fortran endif () add_subdirectory(996.specrand_fs) # C