Skip to content

Commit 7056980

Browse files
committed
Update recipes for compiling Fortran benchmarks
1 parent 0bd1893 commit 7056980

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

tools/make/lib/benchmark/fortran.mk

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
# limitations under the License.
1717
#/
1818

19+
# VARIABLES #
20+
21+
# Define the path to a script for compiling a Fortran benchmark:
22+
compile_fortran_benchmark_bin := $(TOOLS_DIR)/scripts/compile_fortran_benchmark
23+
24+
1925
# RULES #
2026

2127
#/
@@ -40,10 +46,12 @@ benchmark-fortran:
4046
$(QUIET) $(FIND_FORTRAN_BENCHMARKS_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
4147
echo ""; \
4248
echo "Running benchmark: $$file"; \
43-
cd `dirname $$file` && \
44-
$(MAKE) clean && \
45-
$(MAKE) && \
49+
cd `dirname $$file` && $(MAKE) clean && \
50+
OS="$(OS)" \
51+
NODE="$(NODE)" \
52+
NODE_PATH="$(NODE_PATH)" \
4653
FORTRAN_COMPILER="$(FC)" \
54+
"${compile_fortran_benchmark_bin}" $$file && \
4755
$(MAKE) run || exit 1; \
4856
done
4957

@@ -68,10 +76,12 @@ benchmark-fortran-files:
6876
$(QUIET) for file in $(FILES); do \
6977
echo ""; \
7078
echo "Running benchmark: $$file"; \
71-
cd `dirname $$file` && \
72-
$(MAKE) clean && \
73-
$(MAKE) && \
79+
cd `dirname $$file` && $(MAKE) clean && \
80+
OS="$(OS)" \
81+
NODE="$(NODE)" \
82+
NODE_PATH="$(NODE_PATH)" \
7483
FORTRAN_COMPILER="$(FC)" \
84+
"${compile_fortran_benchmark_bin}" $$file && \
7585
$(MAKE) run || exit 1; \
7686
done
7787

0 commit comments

Comments
 (0)