compilertest.sh

script which tests the different compilers - Adrian Haarbach, 2014-09-20 03:24 pm

Download (2.2 kB)

 
1
echo "
2
3
_______1: 
4
clang++ -o cudatest cudatest.cu -lopencv_core -stdlib=libc++ -std=c++11 && ./cudatest"
5
clang++ -o cudatest cudatest.cu -lopencv_core -stdlib=libc++ -std=c++11 && ./cudatest &&
6
echo "
7
___should have printed:
8
Hello World:
9
[1, 0;
10
  0, 1]
11
after opencv:"
12
13
echo "
14
15
_______2:
16
clang++ -o cudatest cudatest.cu -lopencv_core -stdlib=libstdc++ -std=c++11 && ./cudatest"
17
clang++ -o cudatest cudatest.cu -lopencv_core -stdlib=libstdc++ -std=c++11 && ./cudatest &&
18
echo "
19
___should have printed:
20
Hello World:"
21
22
echo "
23
24
_______3:
25
nvcc -o cudatest cudatest.cu -lopencv_core"
26
nvcc -o cudatest cudatest.cu -lopencv_core
27
echo '
28
___should have printed:
29
/usr/local/include/opencv2/core/mat.hpp(117): error: type name is not allowed
30
31
/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "_Atomic" is undefined
32
33
/usr/local/include/opencv2/core/mat.hpp(117): error: expected an expression
34
35
/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "__c11_atomic_fetch_add" is undefined
36
37
/usr/local/include/opencv2/core/mat.hpp(286): error: type name is not allowed
38
39
...'
40
41
echo "
42
43
_______4:
44
nvcc -o cudatest cudatest.cu --ptxas-options=-v -lopencv_core  -ccbin=clang++ -Xcompiler -std=c++11 -Xlinker -stdlib=libstdc++"
45
nvcc -o cudatest cudatest.cu --ptxas-options=-v -lopencv_core  -ccbin=clang++ -Xcompiler -std=c++11 -Xlinker -stdlib=libstdc++
46
echo '
47
___should have printed:
48
/Developer/NVIDIA/CUDA-6.5/bin/../include/common_functions.h(145): warning: allowing all exceptions is incompatible with previous function "operator new(size_t)"
49
/usr/include/c++/4.2.1/new(99): here
50
51
/Developer/NVIDIA/CUDA-6.5/bin/../include/common_functions.h(146): warning: allowing all exceptions is incompatible with previous function "operator new[](size_t)"
52
/usr/include/c++/4.2.1/new(100): here
53
54
/usr/local/include/opencv2/core/mat.hpp(117): error: type name is not allowed
55
56
/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "_Atomic" is undefined
57
58
/usr/local/include/opencv2/core/mat.hpp(117): error: expected an expression
59
60
/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "__c11_atomic_fetch_add" is undefined
61
62
/usr/local/include/opencv2/core/mat.hpp(286): error: type name is not allowed
63
64
...'
65