1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-23 00:24:23 +00:00
hpc-2022-g3/README.md

95 lines
2.8 KiB
Markdown
Raw Normal View History

2022-11-17 19:59:38 +00:00
\[ **Stefano Pigozzi** + **Caterina Gazzotti** + **Fabio Zanichelli** | Topic OpenMP | High Performance Computing Laboratory | Unimore \]
2022-11-14 15:21:17 +00:00
2022-11-28 13:30:41 +00:00
# C code optimization using NVIDIA CUDA
2022-11-14 15:21:17 +00:00
2022-11-28 13:30:41 +00:00
> ### Assignment #2
2022-11-14 15:21:17 +00:00
>
> Every team is called to optimize (parallellize) the execution time of the assigned applications on multi-processor system.
>
> #### Expected outcomes
>
> * Repository of the code (github/gitlab is ok, or .zip )
> * Oral presentation (5 min + 5 min Q&A) of your work
>
> #### Assigned application
>
> Group 3: `OpenMP/linear-algebra/kernels/atax`
2022-11-17 19:59:38 +00:00
## Results
2022-12-02 00:10:05 +00:00
```console
steffo@nitro:/s/D/W/S/u/atax[130]$ make bench
./.bench.sh
Flags: -DMINI_DATASET
CB*** Average of 3 runs: 3.33e-06 seconds
Flags: -DMINI_DATASET -DHPC_INCLUDE_INIT
CB*** Average of 3 runs: 8.33e-06 seconds
Flags: -DMINI_DATASET -DHPC_USE_CUDA
CB*** Average of 3 runs: 6.8e-05 seconds
Flags: -DMINI_DATASET -DHPC_INCLUDE_INIT -DHPC_USE_CUDA
CB*** Average of 3 runs: 7.2e-05 seconds
Flags: -DSMALL_DATASET
CB*** Average of 3 runs: 0.000563 seconds
Flags: -DSMALL_DATASET -DHPC_INCLUDE_INIT
CB*** Average of 3 runs: 0.00139 seconds
Flags: -DSMALL_DATASET -DHPC_USE_CUDA
CB*** Average of 3 runs: 0.000229 seconds
Flags: -DSMALL_DATASET -DHPC_INCLUDE_INIT -DHPC_USE_CUDA
CB*** Average of 3 runs: 0.000309 seconds
Flags: -DSTANDARD_DATASET
CB*** Average of 3 runs: 0.0276 seconds
Flags: -DSTANDARD_DATASET -DHPC_INCLUDE_INIT
CB*** Average of 3 runs: 0.0664 seconds
Flags: -DSTANDARD_DATASET -DHPC_USE_CUDA
CB*** Average of 3 runs: 0.00938 seconds
Flags: -DSTANDARD_DATASET -DHPC_INCLUDE_INIT -DHPC_USE_CUDA
CB*** Average of 3 runs: 0.0128 seconds
Flags: -DLARGE_DATASET
CB*** Average of 3 runs: 0.109 seconds
Flags: -DLARGE_DATASET -DHPC_INCLUDE_INIT
CB*** Average of 3 runs: 0.243 seconds
Flags: -DLARGE_DATASET -DHPC_USE_CUDA
CB*** Average of 3 runs: 0.0449 seconds
Flags: -DLARGE_DATASET -DHPC_INCLUDE_INIT -DHPC_USE_CUDA
CB*** Average of 3 runs: 0.0459 seconds
Flags: -DEXTRALARGE_DATASET
CB*** Average of 3 runs: 0.248 seconds
Flags: -DEXTRALARGE_DATASET -DHPC_INCLUDE_INIT
CB*** Average of 3 runs: 0.584 seconds
Flags: -DEXTRALARGE_DATASET -DHPC_USE_CUDA
CB*** Average of 3 runs: 0.0971 seconds
Flags: -DEXTRALARGE_DATASET -DHPC_INCLUDE_INIT -DHPC_USE_CUDA
CB*** Average of 3 runs: 0.108 seconds
```
2022-11-17 19:59:38 +00:00
### Validation
2022-11-28 13:30:41 +00:00
* Compiler used: **nvcc**
2022-12-02 00:10:05 +00:00
* Device used: `NVIDIA GTX 1070` with `525.60.11` driver
2022-11-17 19:59:38 +00:00
To reproduce the obtained results:
2022-12-02 00:10:05 +00:00
1. Clone the repository on @Steffo99's computer:
2022-11-17 19:59:38 +00:00
```console
2022-11-28 13:30:41 +00:00
$ git clone https://github.com/Steffo99/unimore-hpc-assignments
2022-11-17 19:59:38 +00:00
```
2022-11-28 16:08:26 +00:00
2. Checkout the exact commit the tests were executed on:
2022-11-17 19:59:38 +00:00
```console
2022-12-02 00:10:05 +00:00
$ git checkout 2d6448e5aa3707370b837a37db4eb880ca06ddb7
2022-11-17 19:59:38 +00:00
```
2022-11-28 16:08:26 +00:00
3. Access our group's assigned folder:
2022-11-17 19:59:38 +00:00
```console
2022-11-28 16:08:26 +00:00
$ cd unimore-hpc-assignments/atax
2022-11-17 19:59:38 +00:00
```
4. Run the benchmarking script:
```console
$ make bench
```