Skip to content

Commit 04c1155

Browse files
committed
Faster tests.
Degree of parallelism for building and running adapts to number of cores. Default to -O1 release builds. Fix compiler warnings. Fix ExternalFunctionLocal for small N/large nThreads. Smaller local arrays in tests, updated test results. Merge branch 'feature/fasterTests' into develop
2 parents 791fb09 + 4441f72 commit 04c1155

603 files changed

Lines changed: 9802 additions & 9795 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ gcc-macro:
1212
- export OPDI_DIR=$(pwd)/include
1313
- cd tests
1414
- export CXX=g++
15+
- export OMP_NUM_THREADS=$(expr $(nproc --all) / 2)
1516
- make all
1617

1718
clang-macro:
@@ -26,6 +27,7 @@ clang-macro:
2627
- export OPDI_DIR=$(pwd)/include
2728
- cd tests
2829
- export CXX=clang++
30+
- export OMP_NUM_THREADS=$(expr $(nproc --all) / 2)
2931
- make all
3032

3133
clang-ompt:
@@ -42,6 +44,7 @@ clang-ompt:
4244
- export CXX=clang++
4345
- export CXXFLAGS="$FLAGS"
4446
- export BACKEND=OMPT
47+
- export OMP_NUM_THREADS=$(expr $(nproc --all) / 2)
4548
- make all
4649

4750
output:
@@ -55,6 +58,7 @@ output:
5558
- export CXX=g++
5659
- export OUTPUT_INSTRUMENT=yes
5760
- export STDERR_OUTPUT_IS_ERROR=no
61+
- export OMP_NUM_THREADS=$(expr $(nproc --all) / 2)
5862
- make all
5963

6064
syntax:

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 -j $$(expr $$(nproc --all) \* 2)
157+
157158
# link
158159
.PHONY: link
159160
link:
160-
$(MAKE) -f tempmakefile link_all -j12
161-
161+
$(MAKE) -f tempmakefile link_all -j $$(expr $$(nproc --all) \* 2)
162+
162163
$(patsubst %,run%,$(DRIVERS)): DRIVER = $(subst run,,$@)
163164
$(patsubst %,run%,$(DRIVERS)):
164165
@rm -f testresults; \
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Point 0 :
2-
-524.484
3-
70443
4-
1905.62
5-
-159857
6-
-30387.6
2+
-69.2206
3+
4072.98
4+
472.851
5+
-170.998
6+
585.639
77
Point 1 :
8-
-362.937
9-
23881.9
10-
-37841.1
11-
-51032.7
12-
62404.1
8+
-22.7172
9+
109.401
10+
1062.08
11+
2075.01
12+
3004.49
1313
Point 2 :
14-
398.524
15-
62878.5
16-
-12291.6
17-
-42733.6
18-
104665
14+
34.8275
15+
1304.3
16+
-1893.89
17+
-2333.22
18+
-3903.51
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Point 0 :
2-
-524.484
3-
70443
4-
1905.62
5-
-159857
6-
-30387.6
2+
-69.2206
3+
4072.98
4+
472.851
5+
-170.998
6+
585.639
77
Point 1 :
8-
-362.937
9-
23881.9
10-
-37841.1
11-
-51032.7
12-
62404.1
8+
-22.7172
9+
109.401
10+
1062.08
11+
2075.01
12+
3004.49
1313
Point 2 :
14-
398.524
15-
62878.5
16-
-12291.6
17-
-42733.6
18-
104665
14+
34.8275
15+
1304.3
16+
-1893.89
17+
-2333.22
18+
-3903.51
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Point 0 :
2-
-519.699
3-
115228
4-
3477.57
5-
-118744
6-
-14333.2
2+
-70.4151
3+
3091.49
4+
382.947
5+
-307.231
6+
413.529
77
Point 1 :
8-
-364.32
9-
49251.7
10-
-68899.4
11-
-97499.6
12-
114015
8+
-20.7305
9+
-482.314
10+
-117.294
11+
1144.94
12+
3279.1
1313
Point 2 :
14-
409.667
15-
56343.5
16-
11630.2
17-
-17082.3
18-
228925
14+
36.6485
15+
2698.8
16+
-3676.77
17+
-4553.23
18+
-6264.57
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Point 0 :
2-
358.725
3-
7.3232e+07
4-
-3.09295e+07
5-
8.1604e+07
6-
1.74782e+07
2+
43.7971
3+
-68441.7
4+
-108005
5+
451425
6+
63930.5
77
Point 1 :
8-
298.759
9-
-9.18313e+07
10-
-6.69257e+07
11-
9.5149e+06
12-
4.98709e+07
8+
26.3045
9+
3.17309e+06
10+
2.9848e+06
11+
1.36585e+06
12+
1.10654e+06
1313
Point 2 :
14-
97.7815
15-
-8.88214e+07
16-
-8.42372e+07
17-
-1.5157e+07
18-
-1.5929e+08
14+
4.42991
15+
-2.35929e+06
16+
2.68921e+06
17+
3.41815e+06
18+
1.85118e+06
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Point 0 :
2-
595.487
3-
177.011
4-
392.217
5-
13697.3
6-
3466.68
2+
66.0028
3+
-223.25
4+
-459.298
5+
274.127
6+
-136.691
77
Point 1 :
8-
579.603
9-
12167.2
10-
5538.64
11-
-2783.46
12-
1269.94
8+
58.2352
9+
353.754
10+
917.8
11+
823.982
12+
-227.845
1313
Point 2 :
14-
309.709
15-
4216.91
16-
13059.9
17-
11645.2
18-
135468
14+
27.3712
15+
481.951
16+
-523.207
17+
-737.256
18+
-1570.04
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Point 0 :
2-
-348.826
3-
769.932
4-
1996.83
5-
-14980.6
6-
-2788.03
2+
-38.9791
3+
373.795
4+
56.7667
5+
553.336
6+
216.477
77
Point 1 :
8-
-336.432
9-
-818.028
10-
3154.85
11-
4708.61
12-
1741.92
8+
-32.4856
9+
-1305.72
10+
-1569.5
11+
-889.039
12+
35.1266
1313
Point 2 :
14-
-38.4341
15-
-3102.3
16-
-8004.34
17-
-5462.34
18-
-46717.7
14+
-2.24915
15+
-461.574
16+
405.365
17+
619.295
18+
832.111
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Point 0 :
2-
-723.925
3-
-5515.29
4-
95.0474
5-
-6729
6-
-2140.22
2+
-79.9235
3+
-225.656
4+
423.421
5+
-257.64
6+
88.8672
77
Point 1 :
8-
-325.634
9-
3921.84
10-
7865.3
11-
4847.89
12-
-3985.11
8+
-29.7063
9+
-877.013
10+
-1758.64
11+
-1586.99
12+
-263.202
1313
Point 2 :
14-
237.233
15-
4779.5
16-
-3268.62
17-
-5359.29
18-
-10427.2
14+
28.3306
15+
-302.06
16+
100.675
17+
299.426
18+
683.226
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Point 0 :
2-
-723.925
3-
-5515.29
4-
95.0474
5-
-6729
6-
-2140.22
2+
-79.9235
3+
-225.656
4+
423.421
5+
-257.64
6+
88.8672
77
Point 1 :
8-
-325.634
9-
3921.84
10-
7865.3
11-
4847.89
12-
-3985.11
8+
-29.7063
9+
-877.013
10+
-1758.64
11+
-1586.99
12+
-263.202
1313
Point 2 :
14-
237.233
15-
4779.5
16-
-3268.62
17-
-5359.29
18-
-10427.2
14+
28.3306
15+
-302.06
16+
100.675
17+
299.426
18+
683.226

0 commit comments

Comments
 (0)