Skip to content

[SPEC2017] Use correct input/output file paths for different benchmark types #247

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 12 additions & 10 deletions External/SPEC/CFP2017rate/503.bwaves_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,19 @@ speccpu2017_run_test(
RUN_TYPE ref
)

speccpu2017_run_test(
< "${RUN_ref_DIR_REL}/bwaves_3.in"
STDOUT bwaves_3.out
RUN_TYPE ref
)
if (BENCHMARK_SUITE_TYPE STREQUAL rate)
speccpu2017_run_test(
< "${RUN_ref_DIR_REL}/bwaves_3.in"
STDOUT bwaves_3.out
RUN_TYPE ref
)

speccpu2017_run_test(
< "${RUN_ref_DIR}/bwaves_4.in"
STDOUT bwaves_4.out
RUN_TYPE ref
)
speccpu2017_run_test(
< "${RUN_ref_DIR}/bwaves_4.in"
STDOUT bwaves_4.out
RUN_TYPE ref
)
endif ()


################################################################################
Expand Down
19 changes: 10 additions & 9 deletions External/SPEC/CFP2017rate/521.wrf_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ speccpu2017_benchmark(RATE)
# that will be processed by specpp and is common to ${PROG} and ${VALIDATOR}
# wrf_netcdf an object library for the netcdf sources

# There is only one argument to the validator. Only the location
# of the reference data changes. Tolerances and filenames are hard
# coded.
#
# ${SPECDIFF_BIN} is used to check that all the test pass in
# diffwrf_output_01.txt. We replace this with a call to `diff -b` so
# that SPEC need not be installed. The `-b` is used to ignore
# extraneous whitespace.
macro(wrf_validator)
cmake_parse_arguments(_carg "" "RUN_TYPE" "" ${ARGN})
cmake_parse_arguments(_carg "" "RUN_TYPE;WRF_OUT_FILE" "" ${ARGN})

set(VALIDATOR wrf_validate-target_${BENCHMARK_SUITE_TYPE})
if (NOT TARGET ${VALIDATOR})
Expand All @@ -41,7 +37,7 @@ macro(wrf_validator)
llvm_test_verify(WORKDIR ${RUN_${_carg_RUN_TYPE}_DIR_REL}
"%S/${VALIDATOR}"
"${RUN_${_carg_RUN_TYPE}_DIR_REL}/compare/wrf_reference_01"
wrfout_d01_2000-01-24_14_00_00 >
${_carg_WRF_OUT_FILE} >
"${RUN_${_carg_RUN_TYPE}_DIR_REL}/diffwrf_output_01.txt" &&
diff -b "${RUN_${_carg_RUN_TYPE}_DIR_REL}/diffwrf_output_01.txt" "${RUN_${_carg_RUN_TYPE}_DIR_REL}/compare/diffwrf_output_01.txt"
RUN_TYPE ${_carg_RUN_TYPE}
Expand Down Expand Up @@ -79,19 +75,24 @@ endif ()

speccpu2017_run_test(RUN_TYPE test)

wrf_validator(RUN_TYPE test)
wrf_validator(RUN_TYPE test WRF_OUT_FILE wrfout_d01_2000-01-24_12_10_00)

## train #######################################################################

speccpu2017_run_test(RUN_TYPE train)

wrf_validator(RUN_TYPE train)
wrf_validator(RUN_TYPE train WRF_OUT_FILE wrfout_d01_2000-01-24_14_00_00)

## ref #########################################################################

speccpu2017_run_test(RUN_TYPE ref)

wrf_validator(RUN_TYPE ref)
if (BENCHMARK_SUITE_TYPE STREQUAL rate)
wrf_validator(RUN_TYPE ref WRF_OUT_FILE wrfout_d01_2000-01-24_20_00_00)
endif ()
if (BENCHMARK_SUITE_TYPE STREQUAL speed)
wrf_validator(RUN_TYPE ref WRF_OUT_FILE wrfout_d01_2000-01-24_15_00_00)
endif ()

################################################################################

Expand Down
21 changes: 15 additions & 6 deletions External/SPEC/CFP2017rate/554.roms_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,22 @@ speccpu2017_run_test(
)

## ref #########################################################################

speccpu2017_run_test(
< ocean_benchmark2.in.x
STDOUT ocean_benchmark2.log
STDERR ocean_benchmark2.err
RUN_TYPE ref
if (BENCHMARK_SUITE_TYPE STREQUAL rate)
speccpu2017_run_test(
< ocean_benchmark2.in.x
STDOUT ocean_benchmark2.log
STDERR ocean_benchmark2.err
RUN_TYPE ref
)
endif ()
if (BENCHMARK_SUITE_TYPE STREQUAL speed)
speccpu2017_run_test(
< ocean_benchmark3.in.x
STDOUT ocean_benchmark3.log
STDERR ocean_benchmark3.err
RUN_TYPE ref
)
endif ()

################################################################################

Expand Down