Skip to content

Commit d09203f

Browse files
committed
Faster tests.
Higher degree of parallelism for compiling and linking. Default to release builds. Use -O1 to balance compilation time and runtime performance. Address compiler warnings.
1 parent 791fb09 commit d09203f

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

tests/Makefile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ MODE ?= RUN
3636
BACKEND ?= MACRO
3737

3838
# debug possibly set in environment
39-
DEBUG ?= yes
39+
DEBUG ?= no
4040
OUTPUT_INSTRUMENT ?= no
4141

4242
# possibly set in the environment, enables build from source after preprocessing
@@ -47,15 +47,16 @@ STDERR_OUTPUT_IS_ERROR ?= yes
4747

4848
CXX ?= clang++
4949

50-
FLAGS = $(CXXFLAGS) -std=c++17
50+
FLAGS = $(CXXFLAGS) -std=c++17 -Wall -Wextra -Wpedantic -Werror
5151

5252
ifeq ($(DEBUG),no)
53-
FLAGS += -O3
53+
FLAGS += -O1
5454
else
55-
FLAGS += -O0 -ggdb -Wall -Wextra -Wpedantic -Werror
56-
ifeq ($(OUTPUT_INSTRUMENT),yes)
57-
FLAGS += -DOPDI_OMP_LOGIC_INSTRUMENT=1 -DOUTPUT_INSTRUMENT
58-
endif
55+
FLAGS += -O0 -ggdb
56+
endif
57+
58+
ifeq ($(OUTPUT_INSTRUMENT),yes)
59+
FLAGS += -DOPDI_OMP_LOGIC_INSTRUMENT=1 -DOUTPUT_INSTRUMENT
5960
endif
6061

6162
ifeq ($(MODE),REF)
@@ -152,13 +153,13 @@ generate: clean prepareGenerate $(DRIVERS)
152153
# build all object files
153154
.PHONY: compile
154155
compile:
155-
$(MAKE) -f tempmakefile build_all -j12
156-
156+
$(MAKE) -f tempmakefile build_all -j24
157+
157158
# link
158159
.PHONY: link
159160
link:
160-
$(MAKE) -f tempmakefile link_all -j12
161-
161+
$(MAKE) -f tempmakefile link_all -j24
162+
162163
$(patsubst %,run%,$(DRIVERS)): DRIVER = $(subst run,,$@)
163164
$(patsubst %,run%,$(DRIVERS)):
164165
@rm -f testresults; \

tests/tests/TestExternalFunctionGlobal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct TestExternalFunctionGlobal : public TestBase<4, 1, 3, TestExternalFunctio
6969
T* jobResults = new T[N];
7070
T* intermediate = new T[N];
7171

72-
ExternalFunctionHelper<T>* eh;
72+
ExternalFunctionHelper<T>* eh = nullptr;
7373

7474
OPDI_PARALLEL()
7575
{

tests/tests/TestExternalFunctionLogicCalls.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct TestExternalFunctionLogicCalls : public TestBase<4, 1, 3, TestExternalFun
102102
T* jobResults = new T[N];
103103
T* intermediate = new T[N];
104104

105-
ExternalFunctionHelper<T>* eh;
105+
ExternalFunctionHelper<T>* eh = nullptr;
106106

107107
OPDI_PARALLEL()
108108
{

0 commit comments

Comments
 (0)