summaryrefslogtreecommitdiffstats
path: root/BUILD
blob: 01b8ada1c6c8b886d594d2523e0b4ab8655f91d6 (plain)
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
Requirements:
   Vecmathlib requires either GCC 4.7 or Clang 3.1 to build.

After initial checkout: Run "cmake" to create or recreate all
   autogenerated configuration magic. This should otherwise not be
   necessary.
   If you want to use Ninja: run "cmake -G Ninja".

Build:
   Run "make"
   If using Ninja: run "ninja"

Clean:
   Run "make clean"
   If using Ninja: run "ninja -t clean"

Test:
   ./test

Benchmark:
   ./bench



rm -rf CMakeCache.txt CMakeFiles



# Clang:
# C++11: -std=c++11 -stdlib=libc++
# fast math: -ffast-math

# GCC:
# C++11: -std=c++11
# fast math: -ffast-math



# Compute (x86_64):
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS='-Wall -g -Drestrict=__restrict__ -march=native -Ofast' -G Ninja

# Pandora (Power 7):
xlC -qarch=pwr7 -qaltivec -O3 -o test test.cc

# Redshift (OS X):
cmake -DCMAKE_CXX_COMPILER=g++-mp-5 -DCMAKE_CXX_FLAGS='-Wall -g -march=native -Ofast' -G Ninja ../vecmathlib
cmake -DCMAKE_CXX_COMPILER=clang++-mp-3.7 -DCMAKE_CXX_FLAGS='-Wall -g -march=native -Ofast' -G Ninja ../vecmathlib

# Stampede:
module swap intel gcc/4.7.1
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS='-Wall -g -Drestrict=__restrict__ -march=native -Ofast'
cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_CXX_FLAGS='-Wall -g -restrict -xhost -Ofast'

# Vesta (Power 7):
#cmake -DCMAKE_CXX_COMPILER=xlC_r -DCMAKE_CXX_FLAGS='-O3' .
#/soft/compilers/ibmcmp-may2013/vacpp/bg/12.1/bin/xlC_r -O3 -o test test.cc
/soft/compilers/ibmcmp-may2013/vacpp/bg/12.1/bin/xlC_r -O2 -o test test.cc
#cmake -DCMAKE_CXX_COMPILER=/home/projects/llvm/bin/clang++ -DCMAKE_CXX_FLAGS='-O3 -Drestrict=__restrict__ -faltivec' .
/home/projects/llvm/bin/clang++ -O3 -faltivec -o test test.cc

# Vesta (Blue Gene/Q):
/soft/compilers/ibmcmp-may2013/vacpp/bg/12.1/bin/bgxlC_r -O3 -o test test.cc -lmass_simd
#cmake -DCMAKE_CXX_COMPILER=/home/projects/llvm/bin/bgclang++ -DCMAKE_CXX_FLAGS='-O3 -I/soft/compilers/ibmcmp-may2013/xlmass/bg/7.3/include' .
/home/projects/llvm/bin/bgclang++ -O3 -I/soft/compilers/ibmcmp-may2013/xlmass/bg/7.3/include -o test test.cc -L/soft/compilers/ibmcmp-may2013/xlmass/bg/7.3/bglib64 -lmass_simd

# Water (Raspberry PI):
cmake -DCMAKE_CXX_COMPILER=/home/pi/llvm-3.3/bin/clang++ -DCMAKE_CXX_FLAGS='-Wall -g -Drestrict=__restrict__ -Ofast'
OpenPOWER on IntegriCloud