Skip to content
Snippets Groups Projects
Commit 2ac97b39 authored by Georgiana Mania's avatar Georgiana Mania
Browse files

remove -O3 from hands-on

parent 7b714ae6
No related branches found
No related tags found
1 merge request!72Draft: Compute devices lecture
Pipeline #70243 passed
...@@ -126,12 +126,12 @@ module load gcc ...@@ -126,12 +126,12 @@ module load gcc
``` ```
2. Compile and run the serial example 2. Compile and run the serial example
```bash ```bash
gcc -O3 main.c -o serial.x -lm gcc main.c -o serial.x -lm
time ./serial.x # use `time` to check the runtime time ./serial.x # use `time` to check the runtime
``` ```
3. Compile and run the example using OpenMP 3. Compile and run the example using OpenMP
```bash ```bash
gcc -O3 -fopenmp main.c -o parallel.x -lm gcc -fopenmp main.c -o parallel.x -lm
export OMP_NUM_THREADS=2 export OMP_NUM_THREADS=2
time ./parallel.x time ./parallel.x
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment