|
### Code example
|
|
### Code example
|
|
|
|
|
|
We will use an [OpenMP](https://en.wikipedia.org/wiki/OpenMP) job as example, you can create a [openmp.cpp](https://gitlab.oca.eu/DSI/HPC/blob/master/SLURM/multithread/openmp.cpp) test program and compile it with:
|
|
We will use an [OpenMP](https://en.wikipedia.org/wiki/OpenMP) job as example, you can create a [coin.cpp](https://gitlab.oca.eu/DSI/HPC/blob/master/SLURM/multithread/openmp.cpp) test program and compile it with:
|
|
```
|
|
```
|
|
$icpc -qopenmp ./openmp.cpp -o openmp
|
|
$icpc -qopenmp ./coin.cpp -o openmp
|
|
$
|
|
$
|
|
```
|
|
```
|
|
the '-qopenmp' option will tell the compiler to recognize the [OpenMP pragmas](https://en.wikipedia.org/wiki/OpenMP#Clauses).
|
|
the '-qopenmp' option will tell the compiler to recognize the [OpenMP pragmas](https://en.wikipedia.org/wiki/OpenMP#Clauses).
|
... | | ... | |