Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 5f9b2a8

Browse files
author
Charlie Turner
committed
[test-suite] Don't allow FP_TOLERANCE and HASH_PROGRAM_OUTPUT to occur toghether.
Summary: LNT's benchmarks produce their output into files which are then compared in various ways. The benchmarks output numerical scores, which can then be compared by a custom program in the test-suite tree which does a floating-point comparison with a given tolerance (fpcmp). The test-suite system allows allows users to do a hash of the program output for a subsequently speedier comparison. This is used for benchmarks that generate a significant amount of output (currently defined as >100k), The problem is that some benchmarks that chose this feature also chose a floating-point comparison of these hashes, which at best is nonsense, and at worse causes an infinite loop. The fpcmp program is not resilient when it's input is weird like this. For a particular case of an observed mafft failure, it caused fpcmp to go into an infinite loop. Reviewers: kristof.beyls, ddunbar, rengolin Subscribers: rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D13283 llvm-svn: 248898
1 parent 6e995fa commit 5f9b2a8

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

Makefile.programs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,11 @@ endif
500500
# If the program wants its output hashed, add an output filter.
501501
ifdef ENABLE_HASHED_PROGRAM_OUTPUT
502502
ifdef HASH_PROGRAM_OUTPUT
503+
# If the program also wants a floating-point comparison, give
504+
# and error.
505+
ifdef FP_TOLERANCE
506+
$(error Cannot use both FP_TOLERNANCE and HASH_PROGRAM_OUTPUT)
507+
endif
503508
PROGRAM_OUTPUT_FILTER := $(PROGDIR)/HashProgramOutput.sh
504509
endif
505510
endif

MultiSource/Benchmarks/MiBench/automotive-basicmath/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ LEVEL = ../../../..
22

33
PROG = automotive-basicmath
44
LDFLAGS = -lm
5-
FP_TOLERANCE := 0.00000000001
65
HASH_PROGRAM_OUTPUT = 1
76

87
include $(LEVEL)/MultiSource/Makefile.multisrc

MultiSource/Benchmarks/Olden/voronoi/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ PROG = voronoi
44
INCLUDES = defines.h
55
CPPFLAGS = -DTORONTO
66
LDFLAGS = -lm
7-
FP_TOLERANCE = 0.0001
87
ifdef LARGE_PROBLEM_SIZE
98
RUN_OPTIONS = 1000000 20 32 7
109
else

MultiSource/Benchmarks/VersaBench/beamformer/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ LEVEL = ../../../..
22
LDFLAGS += -lm
33

44
PROG = beamformer
5-
FP_TOLERANCE = 0.000001
65
ifdef LARGE_PROBLEM_SIZE
76
RUN_OPTIONS = -i 400
87
else

MultiSource/Benchmarks/mafft/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ CPPFLAGS = -DLLVM
1010
RUN_OPTIONS = -b 62 -g 0.100 -f 2.00 -h 0.100 -L
1111
STDIN_FILENAME = $(PROJ_SRC_DIR)/pyruvate_decarboxylase.fasta
1212
LDFLAGS = -lm
13-
FP_TOLERANCE = 0.00001
1413
HASH_PROGRAM_OUTPUT = 1
1514

1615
ifeq ($(ARCH),XCore)

0 commit comments

Comments
 (0)