-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
36 lines (22 loc) · 651 Bytes
/
Copy pathREADME
File metadata and controls
36 lines (22 loc) · 651 Bytes
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
* MPI examples *
** On Mac **
$ source .env
(be sure you have llvm & libomp installed, path in .env should match it)
** Build **
$ mkdir build && cd build
$ cmake ..
$ make
to build cuda samples configure with
$ cmake .. -DBUILD_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=<compute_cap>
where compute cap is
$ nvidia-smi --query-gpu=compute_cap --format=csv compute_cap
times 10 (e.g. 5.2 * 10 = 52)
e.g.
$ cmake .. -DBUILD_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=52
** Run **
$ mpirun -np <num_processes> <file name>
Example:
$ mpirun -np 4 hello
** Create sample **
create a function and then instantiate the sample as
SAMPLE(function_name, args)