forked from alpaka-group/alpaka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
745 lines (682 loc) · 39.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
#
# Copyright 2015 Benjamin Worpitz, Erik Zenker
#
# This file is part of alpaka.
#
# alpaka is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# alpaka is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with alpaka.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
#
################################################################################
language:
- cpp
################################################################################
#
################################################################################
os:
- linux
sudo: required
dist: trusty
################################################################################
#
################################################################################
compiler:
- gcc
- clang
################################################################################
# NOTE: Testing the full matrix is not practical.
# Therefore we aim to have each value been set in at lest one job.
# CXX : {g++, clang++}
# [g++] ALPAKA_GCC_VER : {4.9, 5, 6}
# [clang++] ALPAKA_CLANG_LIBSTDCPP_VERSION : {5}
# [clang++] ALPAKA_CLANG_VER : {3.5.2, 3.6.2, 3.7.1, 3.8.1, 3.9.0}
# CMAKE_BUILD_TYPE : {Debug, Release}
# ALPAKA_CI : {ON}
# ALPAKA_CI_BOOST_BRANCH : {boost-1.59.0, boost-1.60.0, boost-1.61.0, boost-1.62.0, boost-1.63.0, develop}
# ALPAKA_CI_CMAKE_VER : {3.3.2, 3.4.3, 3.5.2, 3.6.3, 3.7.2}
# ALPAKA_CI_SANITIZERS : {ASan+UBsan+ESan, TSan+UBsan+ESan, MSan+UBsan+ESan}
# ALPAKA_CI_ANALYSIS : {ON, OFF}
# ALPAKA_DEBUG : {0, 1, 2}
# ALPAKA_ACC_GPU_CUDA_ONLY_MODE : {ON, OFF}
# ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE : {ON, OFF}
# ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE : {ON, OFF}
# ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE : {ON, OFF}
# ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE : {ON, OFF}
# [ON] OMP_NUM_THREADS : {1, 2, 3, 4}
# ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE : {ON, OFF}
# [ON] OMP_NUM_THREADS : {1, 2, 3, 4}
# ALPAKA_ACC_CPU_BT_OMP4_ENABLE : {ON, OFF}
# [ON] OMP_NUM_THREADS : {1, 2, 3, 4}
# ALPAKA_ACC_GPU_CUDA_ENABLE : {ON, OFF}
# [ON] ALPAKA_CUDA_VER : {7.0, 7.5, 8.0}
# [ON] ALPAKA_CUDA_COMPILER : {nvcc, [CXX==clang++]:clang}
# ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE : {ON, OFF}
################################################################################
env:
global:
- ALPAKA_CI_ANALYSIS=OFF
- ALPAKA_DEBUG=0
- ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE=ON
- ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=ON
- ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=ON
- ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE=ON
- ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=ON
- ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=ON
- ALPAKA_ACC_CPU_BT_OMP4_ENABLE=ON
- ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- ALPAKA_ACC_GPU_CUDA_ONLY_MODE=OFF
- ALPAKA_CLANG_LIBSTDCPP_VERSION=5
matrix:
# Analysis builds
- ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Debug ALPAKA_CI_BOOST_BRANCH=boost-1.62.0 ALPAKA_CI_CMAKE_VER=3.5.2 ALPAKA_CI_SANITIZERS= ALPAKA_CI_ANALYSIS=ON ALPAKA_DEBUG=2 ALPAKA_ACC_GPU_CUDA_ENABLE=ON ALPAKA_CUDA_VER=8.0 ALPAKA_CUDA_COMPILER=clang
- ALPAKA_GCC_VER=6 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Debug ALPAKA_CI_BOOST_BRANCH=boost-1.60.0 ALPAKA_CI_CMAKE_VER=3.4.3 ALPAKA_CI_SANITIZERS= ALPAKA_CI_ANALYSIS=ON ALPAKA_DEBUG=2
# Debug builds
- ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.8.1 CMAKE_BUILD_TYPE=Debug ALPAKA_CI_BOOST_BRANCH=boost-1.59.0 ALPAKA_CI_CMAKE_VER=3.5.2 ALPAKA_CI_SANITIZERS= ALPAKA_ACC_GPU_CUDA_ENABLE=ON ALPAKA_CUDA_VER=7.5 ALPAKA_CUDA_COMPILER=clang ALPAKA_ACC_GPU_CUDA_ONLY_MODE=ON ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE=OFF ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=OFF ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=OFF ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE=OFF ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=OFF ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=OFF ALPAKA_ACC_CPU_BT_OMP4_ENABLE=OFF ALPAKA_ACC_CPU_BT_OPENACC2_ENABLE=OFF
- ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.7.1 CMAKE_BUILD_TYPE=Debug ALPAKA_CI_BOOST_BRANCH=boost-1.61.0 ALPAKA_CI_CMAKE_VER=3.7.2 ALPAKA_CI_SANITIZERS=TSan+UBSan+ESan OMP_NUM_THREADS=3 ALPAKA_ACC_GPU_CUDA_ENABLE=ON ALPAKA_CUDA_VER=8.0 ALPAKA_CUDA_COMPILER=nvcc
- ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.8.1 CMAKE_BUILD_TYPE=Debug ALPAKA_CI_BOOST_BRANCH=boost-1.63.0 ALPAKA_CI_CMAKE_VER=3.3.2 ALPAKA_CI_SANITIZERS=ASan+UBSan+ESan OMP_NUM_THREADS=2 ALPAKA_ACC_GPU_CUDA_ENABLE=ON ALPAKA_CUDA_VER=8.0 ALPAKA_CUDA_COMPILER=nvcc
- ALPAKA_GCC_VER=6 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Debug ALPAKA_CI_BOOST_BRANCH=develop ALPAKA_CI_CMAKE_VER=3.6.3 ALPAKA_CI_SANITIZERS=TSan+UBSan+ESan OMP_NUM_THREADS=4
# Release builds
- ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Release ALPAKA_CI_BOOST_BRANCH=boost-1.62.0 ALPAKA_CI_CMAKE_VER=3.5.2 ALPAKA_CI_SANITIZERS=ASan+UBSan+ESan OMP_NUM_THREADS=4 ALPAKA_ACC_GPU_CUDA_ENABLE=ON ALPAKA_CUDA_VER=7.0 ALPAKA_CUDA_COMPILER=clang
- ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.6.2 CMAKE_BUILD_TYPE=Release ALPAKA_CI_BOOST_BRANCH=boost-1.61.0 ALPAKA_CI_CMAKE_VER=3.4.3 ALPAKA_CI_SANITIZERS=TSan+UBSan+ESan OMP_NUM_THREADS=3 ALPAKA_ACC_GPU_CUDA_ENABLE=ON ALPAKA_CUDA_VER=7.5 ALPAKA_CUDA_COMPILER=nvcc
- ALPAKA_GCC_VER=6 ALPAKA_CLANG_VER=3.5.2 CMAKE_BUILD_TYPE=Release ALPAKA_CI_BOOST_BRANCH=boost-1.60.0 ALPAKA_CI_CMAKE_VER=3.3.2 ALPAKA_CI_SANITIZERS=ASan+UBSan+ESan OMP_NUM_THREADS=2
- ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Release ALPAKA_CI_BOOST_BRANCH=develop ALPAKA_CI_CMAKE_VER=3.7.2 ALPAKA_CI_SANITIZERS= OMP_NUM_THREADS=4
matrix:
allow_failures:
- compiler: gcc
env: ALPAKA_GCC_VER=6 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Debug ALPAKA_CI_BOOST_BRANCH=develop ALPAKA_CI_CMAKE_VER=3.6.3 ALPAKA_CI_SANITIZERS=TSan+UBSan+ESan OMP_NUM_THREADS=4
- compiler: gcc
env: ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Release ALPAKA_CI_BOOST_BRANCH=develop ALPAKA_CI_CMAKE_VER=3.7.2 ALPAKA_CI_SANITIZERS= OMP_NUM_THREADS=4
- compiler: clang
env: ALPAKA_GCC_VER=6 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Debug ALPAKA_CI_BOOST_BRANCH=develop ALPAKA_CI_CMAKE_VER=3.6.3 ALPAKA_CI_SANITIZERS=TSan+UBSan+ESan OMP_NUM_THREADS=4
- compiler: clang
env: ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.9.0 CMAKE_BUILD_TYPE=Release ALPAKA_CI_BOOST_BRANCH=develop ALPAKA_CI_CMAKE_VER=3.7.2 ALPAKA_CI_SANITIZERS= OMP_NUM_THREADS=4
- os: osx
branches:
except:
- doc
cache:
directories:
- ${HOME}/cache
################################################################################
# Use this to prepare the system to install prerequisites or dependencies.
################################################################################
before_install:
# Print the travis environment variables: http://docs.travis-ci.com/user/ci-environment/
- echo "${TRAVIS_BRANCH}"
- echo "${TRAVIS_BUILD_DIR}"
- echo "${TRAVIS_BUILD_ID}"
- echo "${TRAVIS_BUILD_NUMBER}"
- echo "${TRAVIS_COMMIT}"
- echo "${TRAVIS_COMMIT_RANGE}"
- echo "${TRAVIS_JOB_ID}"
- echo "${TRAVIS_JOB_NUMBER}"
- echo "${TRAVIS_PULL_REQUEST}"
- echo "${TRAVIS_SECURE_ENV_VARS}"
- echo "${TRAVIS_REPO_SLUG}"
- echo "${TRAVIS_OS_NAME}"
- echo "${TRAVIS_TAG}"
- ls ${HOME}/cache
#-------------------------------------------------------------------------------
# g++ / clang dependencies
- travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
#-------------------------------------------------------------------------------
# clang
- if [ "${CXX}" == "clang++" ]
;then
ALPAKA_CLANG_VER_MAJOR=${ALPAKA_CLANG_VER:0:1}
&& ALPAKA_CLANG_VER_MINOR=${ALPAKA_CLANG_VER:2:1}
&& echo ${ALPAKA_CLANG_VER_MAJOR}
&& echo ${ALPAKA_CLANG_VER_MINOR}
;fi
- if [ "${CXX}" == "clang++" ]
;then
ALPAKA_CLANG_CACHE_DIR=${HOME}/cache/llvm/llvm-${ALPAKA_CLANG_VER}
&& if [ -z "$(ls -A ${ALPAKA_CLANG_CACHE_DIR})" ]
;then
ALPAKA_CLANG_PKG_FILE_NAME=clang+llvm-${ALPAKA_CLANG_VER}-x86_64-linux-gnu-ubuntu-14.04.tar.xz
&& travis_retry wget http://llvm.org/releases/${ALPAKA_CLANG_VER}/${ALPAKA_CLANG_PKG_FILE_NAME}
&& mkdir -p ${ALPAKA_CLANG_CACHE_DIR}
&& xzcat ${ALPAKA_CLANG_PKG_FILE_NAME} | tar -xvf - --strip 1 -C ${ALPAKA_CLANG_CACHE_DIR}
&& sudo rm -rf ${ALPAKA_CLANG_PKG_FILE_NAME}
;fi
&& ${ALPAKA_CLANG_CACHE_DIR}/bin/llvm-config --version
&& export LLVM_CONFIG="${ALPAKA_CLANG_CACHE_DIR}/bin/llvm-config"
;fi
#-------------------------------------------------------------------------------
# CMake
- ALPAKA_CMAKE_VER_MAJOR=${ALPAKA_CI_CMAKE_VER:0:1}
- echo ${ALPAKA_CMAKE_VER_MAJOR}
- ALPAKA_CMAKE_VER_MINOR=${ALPAKA_CI_CMAKE_VER:2:1}
- echo ${ALPAKA_CMAKE_VER_MINOR}
- ALPAKA_CMAKE_CACHE_DIR=${HOME}/cache/CMake/CMake-${ALPAKA_CI_CMAKE_VER}
- if [ -z "$(ls -A ${ALPAKA_CMAKE_CACHE_DIR})" ]
;then
ALPAKA_CMAKE_PKG_FILE_NAME_BASE=cmake-${ALPAKA_CI_CMAKE_VER}-Linux-x86_64
ALPAKA_CMAKE_PKG_FILE_NAME=${ALPAKA_CMAKE_PKG_FILE_NAME_BASE}.tar.gz
&& travis_retry wget https://cmake.org/files/v${ALPAKA_CMAKE_VER_MAJOR}.${ALPAKA_CMAKE_VER_MINOR}/${ALPAKA_CMAKE_PKG_FILE_NAME}
&& mkdir -p ${ALPAKA_CMAKE_CACHE_DIR}
&& tar -xzf ${ALPAKA_CMAKE_PKG_FILE_NAME} -C ${ALPAKA_CMAKE_CACHE_DIR}
&& sudo cp -fR ${ALPAKA_CMAKE_CACHE_DIR}/${ALPAKA_CMAKE_PKG_FILE_NAME_BASE}/* ${ALPAKA_CMAKE_CACHE_DIR}
&& sudo rm -rf ${ALPAKA_CMAKE_PKG_FILE_NAME} ${ALPAKA_CMAKE_CACHE_DIR}/${ALPAKA_CMAKE_PKG_FILE_NAME_BASE}
;fi
#-------------------------------------------------------------------------------
# Boost.
- ALPAKA_CI_BOOST_BRANCH_MAJOR=${ALPAKA_CI_BOOST_BRANCH:6:1}
- echo ${ALPAKA_CI_BOOST_BRANCH_MAJOR}
- ALPAKA_CI_BOOST_BRANCH_MINOR=${ALPAKA_CI_BOOST_BRANCH:8:2}
- echo ${ALPAKA_CI_BOOST_BRANCH_MINOR}
# If fibers are enabled we need boost-1.62.0+ or develop branch.
- if [ "${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE}" == "ON" ]
;then
if [ "${ALPAKA_CI_BOOST_BRANCH}" != "develop" ]
;then
if (( (( ${ALPAKA_CI_BOOST_BRANCH_MAJOR} == 1 )) && (( ${ALPAKA_CI_BOOST_BRANCH_MINOR} < 62 )) ))
;then
export ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE} set because boost fibers requires boost-1.62.0+ or develop branch!
;fi
;fi
;fi
#-------------------------------------------------------------------------------
# CUDA
#-------------------------------------------------------------------------------
# We can only use clang as a CUDA compiler when clang is used as the main compiler.
# For gcc we have to use nvcc.
- if [ "${CXX}" != "clang++" ]
;then
if [ "${ALPAKA_CUDA_COMPILER}" == "clang" ]
;then
export ALPAKA_CUDA_COMPILER=nvcc
;fi
;fi
# clang <= 3.9 used as CUDA compiler does not support CUDA 8.0.
- if [ "${CXX}" == "clang++" ]
;then
if [ "${ALPAKA_CUDA_COMPILER}" == "clang" ]
;then
if [ "${ALPAKA_CUDA_VER}" == "8.0" ]
;then
export ALPAKA_CUDA_VER=7.5
&& echo ALPAKA_CUDA_VER=${ALPAKA_CUDA_VER} because the clang version does not support CUDA 8.0!
;fi
;fi
;fi
# nvcc 7.0 does not support clang on linux.
# nvcc 7.5 does not support clang > 3.6 on linux.
# nvcc 7.5 for clang is buggy and does not compile alpaka correctly.
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ ${ALPAKA_CUDA_COMPILER} == "nvcc" ]
;then
if [ "${CXX}" == "clang++" ]
;then
if [ ${TRAVIS_OS_NAME} == "linux" ]
;then
if [ "${ALPAKA_CUDA_VER}" == "7.0" ]
;then
export ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
&& echo ALPAKA_ACC_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE} because clang is not a supported compiler for nvcc 7.0 on linux!
;elif [ "${ALPAKA_CUDA_VER}" == "7.5" ]
;then
export ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
&& echo ALPAKA_ACC_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE} because the nvcc 7.5 clang support is buggy!
&& if (( (( ${ALPAKA_CLANG_VER_MAJOR} > 3 )) || ( (( ${ALPAKA_CLANG_VER_MAJOR} == 3 )) && (( ${ALPAKA_CLANG_VER_MINOR} > 6 )) ) ))
;then
export ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
&& echo ALPAKA_ACC_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE} because clang versions higher then 3.6 are not a supported compiler for nvcc 7.5 on linux!
;fi
;elif [ "${ALPAKA_CUDA_VER}" == "8.0" ]
;then
if (( (( ${ALPAKA_CLANG_VER_MAJOR} > 3 )) || ( (( ${ALPAKA_CLANG_VER_MAJOR} == 3 )) && (( ${ALPAKA_CLANG_VER_MINOR} > 8 )) ) ))
;then
export ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
&& echo ALPAKA_ACC_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE} because clang versions higher then 3.8 are not a supported compiler for nvcc 8.0 on linux!
;fi
;fi
;fi
;fi
;fi
;fi
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
ALPAKA_CUDA_VER_MAJOR=${ALPAKA_CUDA_VER:0:1}
&& echo ${ALPAKA_CUDA_VER_MAJOR}
&& ALPAKA_CUDA_VER_MINOR=${ALPAKA_CUDA_VER:2:1}
&& echo ${ALPAKA_CUDA_VER_MINOR}
;fi
# nvcc <= 8.0 does not support boost correctly so fibers have to be disabled.
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ "${ALPAKA_CUDA_COMPILER}" == "nvcc" ]
;then
if (( (( ${ALPAKA_CUDA_VER_MAJOR} < 8 )) || ( (( ${ALPAKA_CUDA_VER_MAJOR} == 8 )) && (( ${ALPAKA_CUDA_VER_MINOR} == 0 )) ) ))
;then
if [ ${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE} == "ON" ]
;then
export ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE} because nvcc does not support boost correctly!
;fi
;fi
;fi
;fi
# clang as native CUDA compiler does not support boost fibers
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ ${ALPAKA_CUDA_COMPILER} == "clang" ]
;then
if [ ${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE} == "ON" ]
;then
export ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE} because nvcc does not support boost correctly!
;fi
;fi
;fi
# clang as native CUDA compiler does not support OpenMP
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ ${ALPAKA_CUDA_COMPILER} == "clang" ]
;then
if [ "${ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE}" == "ON" ]
;then
export ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=${ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE} because the clang as native CUDA compiler does not support OpenMP!
;fi
&& if [ "${ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE}" == "ON" ]
;then
export ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE} because the clang as native CUDA compiler does not support OpenMP!
;fi
&& if [ "${ALPAKA_ACC_CPU_BT_OMP4_ENABLE}" == "ON" ]
;then
export ALPAKA_ACC_CPU_BT_OMP4_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_BT_OMP4_ENABLE=${ALPAKA_ACC_CPU_BT_OMP4_ENABLE} because the clang as native CUDA compiler does not support OpenMP!
;fi
;fi
;fi
# FIXME: BOOST_AUTO_TEST_CASE_TEMPLATE is not compilable with nvcc in Release mode.
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ "${ALPAKA_CUDA_COMPILER}" == "nvcc" ]
;then
if [ "${CMAKE_BUILD_TYPE}" == "Release" ]
;then
CMAKE_BUILD_TYPE=Debug
;fi
;fi
;fi
# nvcc 7.x does not support gcc > 4
# nvcc 8.x does not support gcc > 5
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ ${ALPAKA_CUDA_COMPILER} == "nvcc" ]
;then
if [ "${CXX}" == "g++" ]
;then
if (( ${ALPAKA_CUDA_VER_MAJOR} < 8 ))
;then
if (( ${ALPAKA_GCC_VER_MAJOR} > 4 ))
;then
echo CUDA 7.x does not support the gcc version!
&& exit 1
;fi
;elif (( ${ALPAKA_CUDA_VER_MAJOR} < 7 ))
;then
if (( ${ALPAKA_GCC_VER_MAJOR} > 5 ))
;then
echo CUDA 8.x does not support the gcc version!
&& exit 1
;fi
;fi
;fi
;fi
;fi
# clang versions lower than 3.7 do not support OpenMP 2.0.
# clang versions lower than 4.0 do not support OpenMP 4.0.
- if [ "${CXX}" == "clang++" ]
;then
if (( (( ${ALPAKA_CLANG_VER_MAJOR} < 3 )) || ( (( ${ALPAKA_CLANG_VER_MAJOR} == 3 )) && (( ${ALPAKA_CLANG_VER_MINOR} < 7 )) ) ))
;then
if [ "${ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE}" == "ON" ]
;then
export ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=${ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE} because the clang version does not support it!
;fi
&& if [ "${ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE}" == "ON" ]
;then
export ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE} because the clang version does not support it!
;fi
;fi
&& if (( (( ${ALPAKA_CLANG_VER_MAJOR} < 4 )) || ( (( ${ALPAKA_CLANG_VER_MAJOR} == 4 )) && (( ${ALPAKA_CLANG_VER_MINOR} < 0 )) ) ))
;then
if [ "${ALPAKA_ACC_CPU_BT_OMP4_ENABLE}" == "ON" ]
;then
export ALPAKA_ACC_CPU_BT_OMP4_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_BT_OMP4_ENABLE=${ALPAKA_ACC_CPU_BT_OMP4_ENABLE} because the clang version does not support it!
;fi
;fi
;fi
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
ALPAKA_CUDA_CACHE_DIR=${HOME}/cache/CUDA/CUDA-${ALPAKA_CUDA_VER}
&& if [ "${ALPAKA_CUDA_VER}" == "7.0" ]
;then
ALPAKA_CUDA_PKG_FILE_NAME=cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb
&& ALPAKA_CUDA_PKG_FILE_PATH=http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/${ALPAKA_CUDA_PKG_FILE_NAME}
;elif [ "${ALPAKA_CUDA_VER}" == "7.5" ]
;then
ALPAKA_CUDA_PKG_FILE_NAME=cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
&& ALPAKA_CUDA_PKG_FILE_PATH=http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/${ALPAKA_CUDA_PKG_FILE_NAME}
;elif [ "${ALPAKA_CUDA_VER}" == "8.0" ]
;then
ALPAKA_CUDA_PKG_FILE_NAME=cuda-repo-ubuntu1404-8-0-local_8.0.44-1_amd64-deb
&& ALPAKA_CUDA_PKG_FILE_PATH=https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/${ALPAKA_CUDA_PKG_FILE_NAME}
;else
echo CUDA versions other then 7.0, 7.5 and 8.0 are not currently supported!
;fi
&& if [ -z "$(ls -A ${ALPAKA_CUDA_CACHE_DIR})" ]
;then
mkdir -p ${ALPAKA_CUDA_CACHE_DIR}
&& travis_retry wget -O ${ALPAKA_CUDA_CACHE_DIR}/${ALPAKA_CUDA_PKG_FILE_NAME} ${ALPAKA_CUDA_PKG_FILE_PATH}
;fi
&& sudo dpkg -i ${ALPAKA_CUDA_CACHE_DIR}/${ALPAKA_CUDA_PKG_FILE_NAME}
;fi
#-------------------------------------------------------------------------------
# git
- travis_retry sudo add-apt-repository -y ppa:git-core/ppa
- travis_retry sudo apt-get -y update
################################################################################
# Use this to install any prerequisites or dependencies necessary to run your build.
################################################################################
install:
# Step out of the alpaka directory.
- cd ../../
#-------------------------------------------------------------------------------
# Install sloc
- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then travis_retry sudo apt-get install sloccount ;fi
#-------------------------------------------------------------------------------
# Install cppcheck
# FIXME: Use a better static analysis tool. cppcheck does not support c++11 correctly.
#- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then travis_retry sudo apt-get install cppcheck ;fi
#-------------------------------------------------------------------------------
# Get the current git version.
- git --version
- travis_retry sudo apt-get -y install git
- git --version
#-------------------------------------------------------------------------------
# Install gcc
- if [ "${CXX}" == "g++" ]
;then
travis_retry sudo apt-get -y install g++-${ALPAKA_GCC_VER}
&& sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${ALPAKA_GCC_VER} 50
&& sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${ALPAKA_GCC_VER} 50
&& if [ "${ALPAKA_CI_SANITIZERS}" == *"TSan"* ]
; then
travis_retry sudo apt-get -y install libtsan0
; fi
;fi
# Extract the version numbers.
- if [ "${CXX}" == "g++" ]
;then
ALPAKA_GCC_VER_MAJOR=${ALPAKA_GCC_VER:0:1}
&& ALPAKA_GCC_VER_MINOR=${ALPAKA_GCC_VER:2:1}
&& echo ${ALPAKA_GCC_VER_MAJOR}
&& echo ${ALPAKA_GCC_VER_MINOR}
;fi
#-------------------------------------------------------------------------------
# Install clang.
# We have to prepend /usr/bin to the path because else the preinstalled clang from usr/bin/local/ is used.
# && travis_retry sudo apt-get -y install clang-${ALPAKA_CLANG_VER}
- if [ "${CXX}" == "clang++" ]
;then
travis_retry sudo apt-get -y install libstdc++-${ALPAKA_CLANG_LIBSTDCPP_VERSION}-dev
&& travis_retry sudo apt-get -y install libiomp-dev
&& sudo update-alternatives --install /usr/bin/clang clang ${ALPAKA_CLANG_CACHE_DIR}/bin/clang 50
&& sudo update-alternatives --install /usr/bin/clang++ clang++ ${ALPAKA_CLANG_CACHE_DIR}/bin/clang++ 50
&& sudo update-alternatives --install /usr/bin/cc cc ${ALPAKA_CLANG_CACHE_DIR}/bin/clang 50
&& sudo update-alternatives --install /usr/bin/c++ c++ ${ALPAKA_CLANG_CACHE_DIR}/bin/clang++ 50
&& export PATH=${ALPAKA_CLANG_CACHE_DIR}/bin:${PATH}
&& export LD_LIBRARY_PATH=${ALPAKA_CLANG_CACHE_DIR}/lib:${LD_LIBRARY_PATH}
&& export CPPFLAGS="-I ${ALPAKA_CLANG_CACHE_DIR}/include/c++/v1 ${CPPFLAGS}"
&& export CXXFLAGS="-lc++ ${CXXFLAGS}"
;fi
# Install some specific parts instead of the whole 'build-essential'
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ "${ALPAKA_CUDA_COMPILER}" == "clang" ]
;then
travis_retry sudo apt-get -y install g++-multilib
;fi
;fi
#-------------------------------------------------------------------------------
# Remove the old CMake version.
- sudo apt-get -y remove cmake
# Replace it with the new version.
- export PATH=${ALPAKA_CMAKE_CACHE_DIR}/bin:${PATH}
#-------------------------------------------------------------------------------
# Install CUDA
# Currently we do not install CUDA fully: sudo apt-get -y install cuda
# We only install the minimal packages. Because of our manual partial installation we have to create a symlink at /usr/local/cuda
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
sudo apt-get -y install cuda-core-${ALPAKA_CUDA_VER} cuda-cudart-${ALPAKA_CUDA_VER} cuda-cudart-dev-${ALPAKA_CUDA_VER} cuda-curand-${ALPAKA_CUDA_VER} cuda-curand-dev-${ALPAKA_CUDA_VER}
&& sudo ln -s /usr/local/cuda-${ALPAKA_CUDA_VER} /usr/local/cuda
&& export PATH=/usr/local/cuda-${ALPAKA_CUDA_VER}/bin:$PATH
&& export LD_LIBRARY_PATH=/usr/local/cuda-${ALPAKA_CUDA_VER}/lib64:$LD_LIBRARY_PATH
;fi
#-------------------------------------------------------------------------------
# Clone boost.
# --depth 1 does not necessarily always work.
# There seem to be problems when the super-project references a non-HEAD commit
# as the submodules are also cloned with --depth 1.
- git clone -b ${ALPAKA_CI_BOOST_BRANCH} --quiet --recursive --single-branch https://github.com/boostorg/boost.git boost
- cd boost/
- export ALPAKA_BOOST_ROOT_DIR=`pwd`
- echo "ALPAKA_BOOST_ROOT_DIR=${ALPAKA_BOOST_ROOT_DIR}"
# Prepare building of boost.
- sudo ./bootstrap.sh --with-toolset=${CC}
# Create file links.
- sudo ./b2 headers
# Prepare the library destination directory.
- cd ..
- mkdir boost_libs
- cd boost_libs/
- mkdir x64
- export ALPAKA_BOOST_LIB_DIR=`pwd`/x64/lib
- echo "ALPAKA_BOOST_LIB_DIR=${ALPAKA_BOOST_LIB_DIR}"
- cd ../
- cd boost/
# Create the boost build command.
# --layout=versioned
- ALPAKA_BOOST_B2_CXXFLAGS=
- ALPAKA_BOOST_B2="sudo ./b2 -j1 --layout=tagged --toolset=${CC}"
- ALPAKA_BOOST_B2+=" architecture=x86 address-model=64 variant=debug,release link=static threading=multi runtime-link=shared"
# Clang is not supported by the FindBoost script.
# boost (especially old versions) produces too much warnings when using clang (newer versions) so that the 4 MiB log is too short.
- if [ "${CXX}" == "clang++" ]
;then
export ALPAKA_BOOST_COMPILER=-clang${ALPAKA_CLANG_VER_MAJOR}${ALPAKA_CLANG_VER_MINOR}
&& echo "ALPAKA_BOOST_COMPILER=${ALPAKA_BOOST_COMPILER}"
&& ALPAKA_BOOST_B2_CXXFLAGS+="-Wno-unused-local-typedef -Wno-c99-extensions -Wno-variadic-macros -Wunknown-warning-option -fPIC"
;fi
# Select the libraries required.
- ALPAKA_BOOST_B2+=" --with-test"
- if [ "${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE}" == "ON" ]
;then
ALPAKA_BOOST_B2_CXXFLAGS+=" -std=c++11"
&& ALPAKA_BOOST_B2+=" --with-fiber --with-context --with-thread --with-system --with-atomic --with-chrono --with-date_time"
;fi
- if [ "${ALPAKA_BOOST_B2_CXXFLAGS}" != "" ]
;then
ALPAKA_BOOST_B2+=' cxxflags="'
ALPAKA_BOOST_B2+="${ALPAKA_BOOST_B2_CXXFLAGS}"
ALPAKA_BOOST_B2+='"'
;fi
- ALPAKA_BOOST_B2+=" --stagedir=../boost_libs/x64 stage"
# Build boost.
- echo "ALPAKA_BOOST_B2=${ALPAKA_BOOST_B2}"
- eval "${ALPAKA_BOOST_B2}"
# Clean the intermediate build files.
- sudo rm -rf bin.v2
- cd ../
#-------------------------------------------------------------------------------
# Install TBB
- travis_retry sudo apt-get -y install libtbb-dev
################################################################################
# Use this to prepare your build for testing.
################################################################################
before_script:
- cd ${TRAVIS_BUILD_DIR}/
- pwd
#- which cmake
- cmake --version
- which ${CXX}
- ${CXX} -v
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ "${ALPAKA_CUDA_COMPILER}" == "nvcc" ]
;then
which nvcc
&& nvcc -V
;fi
;fi
################################################################################
# All commands must exit with code 0 on success. Anything else is considered failure.
################################################################################
script:
#-------------------------------------------------------------------------------
# sloc
- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then sloccount . ;fi
#-------------------------------------------------------------------------------
# TODO/FIXME/HACK
- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then grep -r HACK * ;fi || true
- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then grep -r FIXME * ;fi || true
- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then grep -r TODO * ;fi || true
#-------------------------------------------------------------------------------
# cppcheck
# --inline-suppr
# Once only with errors returning a failure on error.
#- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then cppcheck --force --verbose --error-exitcode=1 -j2 vectorAdd/src/ matMul/src/ sharedMem/src/ mandelbrot/src/ ;fi
# Once with warnings but no failure return code.
#- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then cppcheck --force --verbose --enable=all -j2 vectorAdd/src/ matMul/src/ sharedMem/src/ mandelbrot/src/ ;fi
#-------------------------------------------------------------------------------
# sanitizers
# NOTE: There is a bug in the way that clang-3.7 was packaged so the sanitizers can not be enabled out of the box
# See http://askubuntu.com/questions/740289/which-package-do-i-need-to-use-clang-with-asan-for-32-bit/745320
#
# General sanitizer settings
# - to get nicer stack-traces:
- if [ "${ALPAKA_CI_SANITIZERS}" != "" ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer"; fi
# - to get perfect stack-traces:
- if [ "${ALPAKA_CI_SANITIZERS}" != "" ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fno-optimize-sibling-calls"; fi
#
# UBSan - http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
- if [ "${ALPAKA_CI_SANITIZERS}" == *"UBSan"* ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=undefined"; fi
# Previously 'local-bounds' was part of UBsan but has been removed because it is not a pure front-end check
- if [ "${ALPAKA_CI_SANITIZERS}" == *"UBSan"* ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=local-bounds"; fi
# 'unsigned-integer-overflow' is not really undefined behaviour but we want to handle it as such for our tests.
- if [ "${ALPAKA_CI_SANITIZERS}" == *"UBSan"* ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=unsigned-integer-overflow"; fi
#
#
# ESan
- if [ "${ALPAKA_CI_SANITIZERS}" == *"ESan"* ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=efficiency-cache-frag"; fi
- if [ "${ALPAKA_CI_SANITIZERS}" == *"ESan"* ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=efficiency-working-set"; fi
#
# It is not possible to combine more than one of the -fsanitize=address, -fsanitize=thread, and -fsanitize=memory checkers in the same program.
#
# ASan - http://clang.llvm.org/docs/AddressSanitizer.html
- if [ "${ALPAKA_CI_SANITIZERS}" == *"ASan"* ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=address"; fi
#
# TSan - http://clang.llvm.org/docs/ThreadSanitizer.html
# TSan requires PositionIndependentCode -pie;-fPIE;-fPIC. clang sets this automatically, gcc not.
# All base libraries (e.g. boost) have to be build with this flag.
# Furthermore, by installing gcc, libtsan0 is not automatically installed.
- if [ "${ALPAKA_CI_SANITIZERS}" == *"TSan"* ]
; then
export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=thread"
&& if [ "${CXX}" == "g++" ]
; then
export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -pie -fPIE"
export CMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} -ltsan"
;fi
; fi
#
# MSan - http://clang.llvm.org/docs/MemorySanitizer.html
# NOTE: Currently we can not enable this for CI as this finds some 'use-of-uninitialized-value' inside:
# - boost`s smart pointers used by the unit test framework
# - alpaka/test/integ/mandelbrot/src/main.cpp:450:9 std::replace
# - alpaka/include/alpaka/exec/ExecCpuThreads.hpp:307:21 used alpaka/include/alpaka/idx/bt/IdxBtRefThreadIdMap.hpp:130:44
- if [ "${ALPAKA_CI_SANITIZERS}" == *"MSan"* ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=memory -fsanitize-memory-track-origins"; fi
#-------------------------------------------------------------------------------
# analysis
#- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" -a "${CXX}" == "clang++" ] ;then export CCC_CC=clang ;fi
#- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" -a "${CXX}" == "clang++" ] ;then export CCC_CXX=clang++ ;fi
#- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" -a "${CXX}" == "clang++" ]
# ;then
# cd mandelbrot/
# && mkdir build/
# && cd build/
# && mkdir analyze/
# && cd analyze/
# && scan-build -h
# && scan-build -analyze-headers cmake
# -G "Unix Makefiles"
# -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
# -DBOOST_ROOT="${ALPAKA_BOOST_ROOT_DIR}" -DBOOST_LIBRARYDIR="${ALPAKA_BOOST_LIB_DIR}" -DBoost_COMPILER="${ALPAKA_BOOST_COMPILER}" -DBoost_USE_STATIC_LIBS=ON -DBoost_USE_MULTITHREADED=ON -DBoost_USE_STATIC_RUNTIME=OFF
# -DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE} -DALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE} -DALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE}
# -DALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE="${ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE}"\
# -DALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=${ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE} -DALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE} -DALPAKA_ACC_CPU_BT_OMP4_ENABLE=${ALPAKA_ACC_CPU_BT_OMP4_ENABLE}
# -DALPAKA_ACC_GPU_CUDA_ENABLE="${ALPAKA_ACC_GPU_CUDA_ENABLE}" -DALPAKA_CUDA_VERSION="${ALPAKA_CUDA_VER}" -DALPAKA_CUDA_COMPILER="${ALPAKA_CUDA_COMPILER}" -DALPAKA_ACC_GPU_CUDA_ONLY_MODE="${ALPAKA_ACC_GPU_CUDA_ONLY_MODE}"
# -DALPAKA_DEBUG=${ALPAKA_DEBUG} -DALPAKA_CI=ON
# "../../"
# && scan-build -analyze-headers --status-bugs make VERBOSE=1
# && cd ../../../
# ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "ON" ] ;then ./travis/compileExec.sh "test/analysis/headerCheck/" ./headerCheck ;fi
#-------------------------------------------------------------------------------
# FIXME: Not all tests are running successfully on all platforms:
# - When ALPAKA_ACC_GPU_CUDA_ONLY_MODE is ON, some tests can not be built as the kernel functions are __device__ only.
# Therefore, BOOST_REQUIRE_EQUAL and other unit test macros that call __host__ only functions will not compile
# - Some of the examples are hard-coded to use a CPU accelerator which is not available in ALPAKA_ACC_GPU_CUDA_ONLY_MODE
#-------------------------------------------------------------------------------
# Build and execute all unit tests.
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/acc/" ./acc ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/atomic/" ./atomic ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/block/shared/" ./blockShared ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/kernel/" ./kernel ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/mem/buf/" ./memBuf ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/mem/view/" ./memView ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/meta/" ./meta ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/time/" ./time ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/unit/vec/" ./vec ;fi
#-------------------------------------------------------------------------------
# Build and execute all integration tests.
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/integ/axpy/" ./axpy ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" -a "${ALPAKA_ACC_GPU_CUDA_ONLY_MODE}" == "ON" ] ;then ./travis/compileExec.sh "test/integ/cudaOnly/" ./cudaOnly ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/integ/mandelbrot/" ./mandelbrot ;fi
#- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/integ/matMul/" ./matMul ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" ] ;then ./travis/compileExec.sh "test/integ/sharedMem/" ./sharedMem ;fi
#-------------------------------------------------------------------------------
# Build and execute all examples.
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" -a "${ALPAKA_ACC_GPU_CUDA_ONLY_MODE}" == "OFF" ] ;then ./travis/compileExec.sh "example/bufferCopy" ./bufferCopy ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" -a "${ALPAKA_ACC_GPU_CUDA_ONLY_MODE}" == "OFF" ] ;then ./travis/compileExec.sh "example/helloWorld" ./helloWorld ;fi
- if ([ "${ALPAKA_CI_ANALYSIS}" == "OFF" -a "${ALPAKA_ACC_GPU_CUDA_ONLY_MODE}" == "OFF" ]) && (([ ${ALPAKA_CUDA_VER_MAJOR} -ge 8 ]) || ([ "${ALPAKA_CUDA_VER_MAJOR}" == "7" -a "${ALPAKA_CUDA_VER_MINOR}" == "5" ]));then ./travis/compileExec.sh "example/helloWorldLambda" ./helloWorldLambda ;fi
- if [ "${ALPAKA_CI_ANALYSIS}" == "OFF" -a "${ALPAKA_ACC_GPU_CUDA_ONLY_MODE}" == "OFF" ] ;then ./travis/compileExec.sh "example/vectorAdd" ./vectorAdd ;fi
################################################################################
#
################################################################################
notifications:
email: false