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

64 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
## Developed features
* [Workaround for unavailable `M_PI`](https://github.com/Steffo99/unimore-hpc-1/blob/bffa0502393d97e7cda4ac34c57dd9c3ac9ac9dc/OpenMP/linear-algebra/kernels/atax/atax.c#L13-L18)
* [Enabled `POLYBENCH_TIME` by default](https://github.com/Steffo99/unimore-hpc-1/blob/bffa0502393d97e7cda4ac34c57dd9c3ac9ac9dc/OpenMP/linear-algebra/kernels/atax/Makefile#L4-L5)
* [Enabled extra warnings by default](https://github.com/Steffo99/unimore-hpc-1/blob/bffa0502393d97e7cda4ac34c57dd9c3ac9ac9dc/OpenMP/linear-algebra/kernels/atax/Makefile#L6-L8)
* [Applied the maximum level of compiler optimizations](https://github.com/Steffo99/unimore-hpc-1/blob/bffa0502393d97e7cda4ac34c57dd9c3ac9ac9dc/OpenMP/linear-algebra/kernels/atax/Makefile#L9-L10)
* [Replaced `tmp` array with a iteration-local variable](https://github.com/Steffo99/unimore-hpc-1/commit/7fc2506cc7c6743288a56047cbb44e960abec4fc)
* [Allowed the addition of `CFLAGS` from `make` calls](https://github.com/Steffo99/unimore-hpc-1/blob/bffa0502393d97e7cda4ac34c57dd9c3ac9ac9dc/OpenMP/linear-algebra/kernels/atax/Makefile#L13-L14)
* [Disabled `make` output](https://github.com/Steffo99/unimore-hpc-1/commit/f655df0eb7e539b06965de7c79dbc1c7bc6a5950)
* [Created `make bench` target to run](https://github.com/Steffo99/unimore-hpc-1/blob/bffa0502393d97e7cda4ac34c57dd9c3ac9ac9dc/OpenMP/linear-algebra/kernels/atax/Makefile#L20-L23) [a script performing multiple parametrized tests on the code to determine the best optimizations](https://github.com/Steffo99/unimore-hpc-1/blob/master/OpenMP/linear-algebra/kernels/atax/.bench.sh)
* [Moved `polybench_start_instruments` to include the `init_array` function](https://github.com/Steffo99/unimore-hpc-1/commit/0ba75336e60b1cf149684a5f259fa933a36e2c5c)
## Results
2022-11-28 13:30:41 +00:00
TBD
2022-11-17 19:59:38 +00:00
### Validation
2022-11-28 13:30:41 +00:00
* Compiler used: **nvcc**
2022-11-17 19:59:38 +00:00
* Jetson Nano used: `8`
To reproduce the obtained results:
1. Clone the repository on a Jetson Nano:
```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-11-28 16:08:26 +00:00
$ git checkout TBD
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
```