forked from tcew/OCCA2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
161 lines (139 loc) · 4.76 KB
/
README
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
+---[ (0) README ]------------------------------------------
| Installing:
| Using a termianl, go to your occa directory
| You should see: this README, include, src, lib
| Type "make" to compile libocca
|
| Running Examples: (After compiling libocca)
| Setup your LD_LIBRARY PATH (check (4) below)
| cd examples/addVectors
| make
| ./main (C++), ./main_c (C), python main.py, etc
|
| Further options can be seen in (1)
+===========================================================
+---[ (1) ENVIRONMENT VARIABLES ]---------------------------
| Useful environment variables:
| (2) OCCA_DIR
| (3) OCCA_CACHE_DIR
| (4) LD_LIBRARY_PATH
|
| (5) Pthreads Options
| OCCA_PTHREAD_ENABLED
| OCCA_PTHREAD_COUNT, OCCA_PTHREADS_COMPILER,
| OCCA_PTHREADS_COMPILER_FLAGS
|
| (6) OpenMP Options
| OCCA_OPENMP_ENABLED
| OCCA_OPENMP_COMPILER, OCCA_OPENMP_COMPILER_FLAGS
|
| (7) OpenCL Options
| OCCA_OPENCL_ENABLED
| OCCA_OPENCL_COMPILER_FLAGS
|
| (8) CUDA Options
| OCCA_CUDA_ENABLED
| OCCA_CUDA_COMPILER, OCCA_CUDA_COMPILER_FLAGS
|
| (9) COI Options
| OCCA_COI_ENABLED
| OCCA_COI_COMPILER, OCCA_COI_COMPILER_FLAGS
|
| (A) Running OCCA on Matlab
|
| (B) Running OCCA on Fortran
+===========================================================
+---[ (2) OCCA_DIR ]----------------------------------------
| Info:
| Directory where occa/ is stored:
| $OCCA_DIR/include
| $OCCA_DIR/src
| $OCCA_DIR/lib
|
| Setting it:
| export OCCA_DIR=/absolute/path/to/dir
+===========================================================
+---[ (3) OCCA_CACHE_DIR ]----------------------------------
| Info:
| Directory where compile kernels are
| stored (caching binaries)
|
| Setting it:
| export OCCA_CACHE_DIR=/absolute/path/to/dir
+===========================================================
+---[ (4) LD_LIBRARY_PATH ]---------------------------------
| Info:
| Append directory where libocca is stored
| $OCCA_DIR/lib
|
| Setting it:
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH":${OCCA_DIR}/lib"
+===========================================================
+---[ (5) Pthreads Options ]--------------------------------
| Info:
| OCCA_PTHREAD_ENABLED : Allow Pthread-mode to be used
| OCCA_PTHREAD_COUNT : Threads spawned at each kernel
| OCCA_PTHREADS_COMPILER : Pthreads Compiler
| OCCA_PTHREADS_COMPILER_FLAGS: Pthreads Compiler Flags
|
| Setting it:
| export OCCA_PTHREAD_COUNT="8"
| export OCCA_PTHREADS_COMPILER="clang++"
| export OCCA_PTHREADS_COMPILER_FLAGS="-O3"
+===========================================================
+---[ (6) OpenMP Options ]----------------------------------
| Info:
| OCCA_OPENMP_ENABLED : Allow OpenMP-mode to be used
| OCCA_OPENMP_COMPILER : OpenMP Compiler
| OCCA_OPENMP_COMPILER_FLAGS: OpenMP Compiler Flags
|
| Setting it:
| export OCCA_OPENMP_COMPILER="clang++"
| export OCCA_OPENMP_COMPILER_FLAGS="-O3"
+===========================================================
+---[ (7) OpenCL Options ]----------------------------------
| Info:
| OCCA_OPENCL_ENABLED : Allow OpenCL-mode to be used
| OCCA_OPENCL_COMPILER_FLAGS: OpenCL Compiler Flags
|
| Setting it:
| export OCCA_OPENCL_COMPILER_FLAGS="-cl-mad-enable -cl-finite-math-only"
+===========================================================
+---[ (8) CUDA Options ]------------------------------------
| Info:
| OCCA_CUDA_ENABLED : Allow CUDA-mode to be used
| OCCA_CUDA_COMPILER : CUDA Compiler
| OCCA_CUDA_COMPILER_FLAGS: CUDA Compiler Flags
|
| Setting it:
| export OCCA_CUDA_COMPILER="nvcc"
| export OCCA_CUDA_COMPILER_FLAGS="-O3"
+===========================================================
+---[ (9) COI Options ]-------------------------------------
| Info:
| OCCA_COI_ENABLED : Allow COI-mode to be used
| OCCA_COI_COMPILER : COI Compiler
| OCCA_COI_COMPILER_FLAGS: COI Compiler Flags
|
| Setting it:
| export OCCA_COI_COMPILER="icpc"
| export OCCA_COI_COMPILER_FLAGS="-O3"
+===========================================================
+--[ (A) MATLAB ]-------------------------------------------
|
| path(strcat(getenv('OCCA_DIR'), '/lib'), path)
|
+===========================================================
+--[ (B) Fortran ]-------------------------------------------
|
| Info:
| OCCA_FORTRAN_ENABLED: Build Fortran wrappers
| FC : Fortran Compiler
| FCFLAGS : Fortran Compiler Flags
|
| Setting it:
| export OCCA_FORTRAN_ENABLED="1"
| export FC="gfortran"
| export FCFLAGS="-O3 -wAll"
|
+===========================================================