forked from alpaka-group/alpaka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
542 lines (498 loc) · 28.9 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
################################################################################
#
################################################################################
language:
- cpp
################################################################################
#
################################################################################
os:
- linux
################################################################################
#
################################################################################
compiler:
- gcc
- clang
################################################################################
# \TODO: Test full matrix:
# ALPAKA_INTEGRATION_TEST : {ON}
# CXX : {g++, clang++}
# [clang++] ALPAKA_CLANG_LIBSTDCPP_VERSION : {4.9}
# [clang++] ALPAKA_CLANG_VER : {3.5, 3.6, 3.7}
# [g++] ALPAKA_GCC_VER : {4.9, 5}
# ALPAKA_BOOST_BRANCH : {boost-1.56.0, boost-1.57.0, boost-1.58.0, develop}
# ALPAKA_CMAKE_VER : {2.8.12.2, 3.0.2, 3.1.3, 3.2.2}
# CMAKE_BUILD_TYPE : {Debug, Release}
# ALPAKA_DEBUG : {0, 1, 2}
# 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_VERSION : {7.0}
# And one analysis build
# ALPAKA_ANALYSIS : {ON, OFF}
################################################################################
env:
global:
- ALPAKA_ACC_CPU_B_SEQ_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_CPU_B_SEQ_T_THREADS_ENABLE=ON
- ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=ON
- ALPAKA_CLANG_LIBSTDCPP_VERSION=4.9
matrix:
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=2 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Debug OMP_NUM_THREADS=4 ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.6 ALPAKA_BOOST_BRANCH=boost-1.56.0 ALPAKA_ACC_GPU_CUDA_ENABLE=ON
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=0 ALPAKA_CMAKE_VER=3.1.3 CMAKE_BUILD_TYPE=Debug OMP_NUM_THREADS=3 ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.5 ALPAKA_BOOST_BRANCH=boost-1.57.0 ALPAKA_ACC_GPU_CUDA_ENABLE=ON
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=2 ALPAKA_CMAKE_VER=3.0.2 CMAKE_BUILD_TYPE=Debug OMP_NUM_THREADS=2 ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.6 ALPAKA_BOOST_BRANCH=boost-1.58.0 ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=0 ALPAKA_CMAKE_VER=2.8.12.2 CMAKE_BUILD_TYPE=Debug OMP_NUM_THREADS=1 ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.5 ALPAKA_BOOST_BRANCH=boost-1.56.0 ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=ON ALPAKA_DEBUG=1 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Debug OMP_NUM_THREADS=4 ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.7 ALPAKA_BOOST_BRANCH=develop ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=2 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Release OMP_NUM_THREADS=4 ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.6 ALPAKA_BOOST_BRANCH=boost-1.57.0 ALPAKA_ACC_GPU_CUDA_ENABLE=ON
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=0 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Release OMP_NUM_THREADS=3 ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.5 ALPAKA_BOOST_BRANCH=boost-1.58.0 ALPAKA_ACC_GPU_CUDA_ENABLE=ON
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=2 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Release OMP_NUM_THREADS=2 ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.6 ALPAKA_BOOST_BRANCH=boost-1.56.0 ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=0 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Release OMP_NUM_THREADS=1 ALPAKA_GCC_VER=4.9 ALPAKA_CLANG_VER=3.5 ALPAKA_BOOST_BRANCH=boost-1.57.0 ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=1 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Release OMP_NUM_THREADS=4 ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.7 ALPAKA_BOOST_BRANCH=develop ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
matrix:
allow_failures:
- compiler: gcc
env: ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=ON ALPAKA_DEBUG=1 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Debug OMP_NUM_THREADS=4 ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.7 ALPAKA_BOOST_BRANCH=develop ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- compiler: gcc
env: ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=1 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Release OMP_NUM_THREADS=4 ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.7 ALPAKA_BOOST_BRANCH=develop ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- compiler: clang
env: ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=ON ALPAKA_DEBUG=1 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Debug OMP_NUM_THREADS=4 ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.7 ALPAKA_BOOST_BRANCH=develop ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- compiler: clang
env: ALPAKA_CUDA_VERSION=7.0 ALPAKA_ANALYSIS=OFF ALPAKA_DEBUG=1 ALPAKA_CMAKE_VER=3.2.2 CMAKE_BUILD_TYPE=Release OMP_NUM_THREADS=4 ALPAKA_GCC_VER=5 ALPAKA_CLANG_VER=3.7 ALPAKA_BOOST_BRANCH=develop ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
- os: osx
branches:
except:
- doc
################################################################################
# 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}"
# g++ / clang dependencies
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
# clang
- if [ "${CXX}" == "clang++" ] ;then sudo add-apt-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.5 main' ;fi
- if [ "${CXX}" == "clang++" ] ;then sudo add-apt-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main' ;fi
- if [ "${CXX}" == "clang++" ] ;then sudo add-apt-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main' ;fi
- if [ "${CXX}" == "clang++" ] ;then wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - ;fi
# git
- sudo add-apt-repository -y ppa:git-core/ppa
- sudo apt-get 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_ANALYSIS}" == "ON" ] ;then sudo apt-get install sloccount ;fi
#-------------------------------------------------------------------------------
# Install cppcheck
# FIXME: Use a better static analysis tool. cppcheck does not support c++11 correctly.
#- if [ "${ALPAKA_ANALYSIS}" == "ON" ] ;then sudo apt-get install cppcheck ;fi
#-------------------------------------------------------------------------------
# Get the current gcc version.
- git --version
- sudo apt-get install git
- git --version
#-------------------------------------------------------------------------------
# gcc 4.6 is too old...
- if [ "${CXX}" == "g++" ]
;then
sudo apt-get 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
;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
# gcc version 5+ require boost-develop (1.59).
- if [ "${CXX}" == "clang++" ]
;then
if (( ${ALPAKA_GCC_VER_MAJOR} == 5 ))
;then
export ALPAKA_BOOST_BRANCH=develop
&& echo ALPAKA_BOOST_BRANCH=${ALPAKA_BOOST_BRANCH} because gcc 5+ is only supported by boost 1.59+!
;fi
;fi
#-------------------------------------------------------------------------------
# Install clang.
# We have to prepend /usr/bin to the path because else the preinstalled clang from usr/bin/local/ is used.
- if [ "${CXX}" == "clang++" ]
;then
sudo apt-get install libstdc++-${ALPAKA_CLANG_LIBSTDCPP_VERSION}-dev
&& sudo apt-get install clang-${ALPAKA_CLANG_VER}
&& sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${ALPAKA_CLANG_VER} 50
&& sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${ALPAKA_CLANG_VER} 50
&& sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 50
&& sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 50
&& export PATH=/usr/bin:$PATH
;fi
# Extract the version numbers.
- 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
# clang versions lower than 3.7 do not support OpenMP 2.0, OpenMP 4.0 is not currently supported by any version.
- 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} < 3 )) || ( (( ${ALPAKA_CLANG_VER_MAJOR} == 3 )) && (( ${ALPAKA_CLANG_VER_MINOR} < 8 )) ) ))
;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
#-------------------------------------------------------------------------------
# Extract the CUDA version numbers.
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
ALPAKA_CUDA_VER_MAJOR=${ALPAKA_CUDA_VERSION:0:1}
&& ALPAKA_CUDA_VER_MINOR=${ALPAKA_CUDA_VERSION:2:1}
&& echo ${ALPAKA_CUDA_VER_MAJOR}
&& echo ${ALPAKA_CUDA_VER_MINOR}
;fi
# CUDA 7.0 does not support gcc > 4.9.2
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ "${CXX}" == "g++" ]
;then
if (( (( ${ALPAKA_GCC_VER_MAJOR} > 4 )) || ( (( ${ALPAKA_GCC_VER_MAJOR} == 4 )) && (( ${ALPAKA_GCC_VER_MINOR} > 9 )) ) ))
;then
if (( (( ${ALPAKA_CUDA_VER_MAJOR} == 7 )) && (( ${ALPAKA_CUDA_VER_MINOR} == 0 )) ))
;then
export ALPAKA_ACC_GPU_CUDA_ENABLE=OFF
&& echo ALPAKA_ACC_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE} because CUDA 7.0 does not support the gcc version!
;fi
;fi
;fi
;fi
# CUDA 7.0 does not support clang on linux.
# CUDA 7.5 does not support clang > 4.6 on linux.
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
if [ "${CXX}" == "clang++" ]
;then
if [ ${TRAVIS_OS_NAME} == "linux" ]
;then
if (( (( ${ALPAKA_CUDA_VER_MAJOR} == 7 )) && (( ${ALPAKA_CUDA_VER_MINOR} < 5 )) ))
;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 CUDA 7.0 on linux!
;fi
&& if (( (( ${ALPAKA_CUDA_VER_MAJOR} == 7 )) && (( ${ALPAKA_CUDA_VER_MINOR} == 5 )) ))
;then
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 CUDA 7.5 on linux!
;fi
;fi
;fi
;fi
;fi
# nvcc does not currently support boost correctly so fibers / threads have to be disabled.
# boost/utility/detail/result_of_iterate.hpp:148:75: error: invalid use of qualified-name 'std::allocator_traits<_Alloc>::propagate_on_container_swap'
- if [ "${ALPAKA_ACC_GPU_CUDA_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!
&& export ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=OFF
&& echo ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=${ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE} because nvcc does not support boost correctly!
;fi
# Install nvcc
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "ON" ]
;then
ALPAKA_CUDA_PKG_FILE_NAME=cuda-repo-ubuntu1204-${ALPAKA_CUDA_VER_MAJOR}-${ALPAKA_CUDA_VER_MINOR}-local_${ALPAKA_CUDA_VERSION}-28_amd64.deb
&& wget http://developer.download.nvidia.com/compute/cuda/${ALPAKA_CUDA_VER_MAJOR}_${ALPAKA_CUDA_VER_MINOR}/Prod/local_installers/rpmdeb/${ALPAKA_CUDA_PKG_FILE_NAME}
&& sudo dpkg -i ${ALPAKA_CUDA_PKG_FILE_NAME}
&& sudo apt-get -y update
&& sudo apt-get -y install cuda-core-${ALPAKA_CUDA_VERSION} cuda-cudart-${ALPAKA_CUDA_VERSION} cuda-cudart-dev-${ALPAKA_CUDA_VERSION} cuda-curand-${ALPAKA_CUDA_VERSION} cuda-curand-dev-${ALPAKA_CUDA_VERSION}
&& sudo ln -s /usr/local/cuda-${ALPAKA_CUDA_VERSION} /usr/local/cuda
&& export PATH=/usr/local/cuda-${ALPAKA_CUDA_VERSION}/bin:$PATH
&& export LD_LIBRARY_PATH=/usr/local/cuda-${ALPAKA_CUDA_VERSION}/lib64:$LD_LIBRARY_PATH
&& sudo rm -f ${ALPAKA_CUDA_PKG_FILE_NAME}
;fi
# 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
#-------------------------------------------------------------------------------
# CMake 2.8.7 is too old...
# Remove the old version.
- sudo apt-get remove cmake
# Extract the version numbers.
- ALPAKA_CMAKE_VER_MAJOR=${ALPAKA_CMAKE_VER:0:1}
- echo ${ALPAKA_CMAKE_VER_MAJOR}
- ALPAKA_CMAKE_VER_MINOR=${ALPAKA_CMAKE_VER:2:1}
- echo ${ALPAKA_CMAKE_VER_MINOR}
# NOTE: Older versions have to be built from source because CMake does not provide older x64 binaries.
- if (( (( ${ALPAKA_CMAKE_VER_MAJOR} < 3 )) || ( (( ${ALPAKA_CMAKE_VER_MAJOR} == 3 )) && (( ${ALPAKA_CMAKE_VER_MINOR} < 1 )) ) ))
;then
ALPAKA_CMAKE_PKG_FILE_NAME=cmake-${ALPAKA_CMAKE_VER}
&& wget http://www.cmake.org/files/v${ALPAKA_CMAKE_VER_MAJOR}.${ALPAKA_CMAKE_VER_MINOR}/${ALPAKA_CMAKE_PKG_FILE_NAME}.tar.gz
&& tar -xzf ${ALPAKA_CMAKE_PKG_FILE_NAME}.tar.gz
&& cd cmake-${ALPAKA_CMAKE_VER}
&& ./bootstrap --prefix=/usr
&& make
&& sudo make install
&& cd ../
&& sudo rm -rf ${ALPAKA_CMAKE_PKG_FILE_NAME}.tar.gz ${ALPAKA_CMAKE_PKG_FILE_NAME}
;else
ALPAKA_CMAKE_PKG_FILE_NAME=cmake-${ALPAKA_CMAKE_VER}-Linux-x86_64
&& wget http://www.cmake.org/files/v${ALPAKA_CMAKE_VER_MAJOR}.${ALPAKA_CMAKE_VER_MINOR}/${ALPAKA_CMAKE_PKG_FILE_NAME}.tar.gz
&& tar -xzf ${ALPAKA_CMAKE_PKG_FILE_NAME}.tar.gz
&& sudo cp -fR cmake-${ALPAKA_CMAKE_VER}-Linux-x86_64/* /usr
&& sudo rm -rf ${ALPAKA_CMAKE_PKG_FILE_NAME}.tar.gz ${ALPAKA_CMAKE_PKG_FILE_NAME}
;fi
#-------------------------------------------------------------------------------
# Clone boost.
# If fibers are enabled we need boost.context 1.58+.
- if [ "${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE}" == "ON" ]
;then
if [ "${ALPAKA_BOOST_BRANCH}" != "develop" ]
;then
export ALPAKA_BOOST_BRANCH=develop
&& echo ALPAKA_BOOST_BRANCH=${ALPAKA_BOOST_BRANCH} set because boost fibers requires boost version 1.58.0+!
;fi
;fi
- git clone -b ${ALPAKA_BOOST_BRANCH} --recursive --single-branch --depth 1 https://github.com/boostorg/boost.git boost
- cd boost/
- export ALPAKA_BOOST_ROOT_DIR=`pwd`
- echo "${ALPAKA_BOOST_ROOT_DIR}"
- cd libs/
# Clone boost.fiber.
- if [ "${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE}" == "ON" ]
;then
git clone -b develop --single-branch --depth 1 https://github.com/olk/boost-fiber.git fiber
;fi
- cd ../
# 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}"
- 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_B2_CXXFLAGS+="-Wno-unused-local-typedef -Wno-c99-extensions -Wno-variadic-macros -Wunknown-warning-option"
;fi
# Select the libraries required.
- ALPAKA_BOOST_B2+=" --with-program_options"
- if [ "${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE}" == "ON" ]
;then
ALPAKA_BOOST_B2_CXXFLAGS+=" -std=c++14"
&& 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}"
- eval "${ALPAKA_BOOST_B2}"
# Clean the intermediate build files.
- sudo rm -rf bin.v2
- cd ../
################################################################################
# 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
which nvcc
&& nvcc -V
;fi
################################################################################
# All commands must exit with code 0 on success. Anything else is considered failure.
################################################################################
script:
#-------------------------------------------------------------------------------
# sloc
- if [ "${ALPAKA_ANALYSIS}" == "ON" ] ;then sloccount . ;fi
#-------------------------------------------------------------------------------
# TODO/FIXME/HACK
- if [ "${ALPAKA_ANALYSIS}" == "ON" ] ;then grep -r HACK * ;fi || true
- if [ "${ALPAKA_ANALYSIS}" == "ON" ] ;then grep -r FIXME * ;fi || true
- if [ "${ALPAKA_ANALYSIS}" == "ON" ] ;then grep -r TODO * ;fi || true
#-------------------------------------------------------------------------------
# Build and execute all tests.
- cd examples/
#-------------------------------------------------------------------------------
# cppcheck
# --inline-suppr
# Once only with errors returning a failure on error.
#- if [ "${ALPAKA_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_ANALYSIS}" == "ON" ] ;then cppcheck --force --verbose --enable=all -j2 vectorAdd/src/ matMul/src/ sharedMem/src/ mandelbrot/src/ ;fi
#-------------------------------------------------------------------------------
# analysis
#- if [ "${ALPAKA_ANALYSIS}" == "ON" -a "${CXX}" == "clang++" ] ;then export CCC_CC=clang ;fi
#- if [ "${ALPAKA_ANALYSIS}" == "ON" -a "${CXX}" == "clang++" ] ;then export CCC_CXX=clang++ ;fi
#- if [ "${ALPAKA_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_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_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE}
# -DALPAKA_DEBUG=${ALPAKA_DEBUG} -DALPAKA_INTEGRATION_TEST=ON -DALPAKA_CUDA_VERSION=${ALPAKA_CUDA_VERSION}
# "../../"
# && scan-build -analyze-headers --status-bugs make VERBOSE=1
# && cd ../../../
# ;fi
#-------------------------------------------------------------------------------
- cd mandelbrot/
- mkdir build/
- cd build/
- mkdir make/
- cd make/
- cmake -G "Unix Makefiles"
-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_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_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE}
-DALPAKA_DEBUG=${ALPAKA_DEBUG} -DALPAKA_INTEGRATION_TEST=ON -DALPAKA_CUDA_VERSION=${ALPAKA_CUDA_VERSION}
"../../"
- make VERBOSE=1
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "OFF" ]
;then
./mandelbrot
;fi
- cd ../../../
#-------------------------------------------------------------------------------
- cd matMul/
- mkdir build/
- cd build/
- mkdir make/
- cd make/
- cmake -G "Unix Makefiles"
-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_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_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE}
-DALPAKA_DEBUG=${ALPAKA_DEBUG} -DALPAKA_INTEGRATION_TEST=ON -DALPAKA_CUDA_VERSION=${ALPAKA_CUDA_VERSION}
"../../"
- make VERBOSE=1
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "OFF" ]
;then
./matMul
;fi
- cd ../../../
#-------------------------------------------------------------------------------
- cd sharedMem/
- mkdir build/
- cd build/
- mkdir make/
- cd make/
- cmake -G "Unix Makefiles"
-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_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_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE}
-DALPAKA_DEBUG=${ALPAKA_DEBUG} -DALPAKA_INTEGRATION_TEST=ON -DALPAKA_CUDA_VERSION=${ALPAKA_CUDA_VERSION}
"../../"
- make VERBOSE=1
- if [ "${ALPAKA_ACC_GPU_CUDA_ENABLE}" == "OFF" ]
;then
./sharedMem
;fi
- cd ../../../
#-------------------------------------------------------------------------------
- cd vectorAdd/
- mkdir build/
- cd build/
- mkdir make/
- cd make/
- cmake -G "Unix Makefiles"
-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_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_GPU_CUDA_ENABLE=${ALPAKA_ACC_GPU_CUDA_ENABLE}
-DALPAKA_DEBUG=${ALPAKA_DEBUG} -DALPAKA_INTEGRATION_TEST=ON -DALPAKA_CUDA_VERSION=${ALPAKA_CUDA_VERSION}
"../../"
- make VERBOSE=1
- if [ "$ALPAKA_ACC_GPU_CUDA_ENABLE" == "OFF" ]
;then
./vectorAdd
;fi
- cd ../../../
- cd ../
################################################################################
#
################################################################################
notifications:
email: false