1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-22 08:04:25 +00:00
Progetti svolti di laboratorio di High Performance Computing
Find a file
2022-12-06 09:07:00 -05:00
.idea Get everything to work 2022-12-02 00:15:33 +01:00
.vscode Get everything to work 2022-12-02 00:15:33 +01:00
atax fix missing data_type cast 2022-12-06 08:46:25 -05:00
.editorconfig Get everything to work 2022-12-02 00:15:33 +01:00
.gitignore Add elf executale to gitignore 2022-11-29 08:24:23 -05:00
CONTRIBUTING.md Remove unused files 2022-11-28 17:02:03 +01:00
ex.txt Adds a file with all the experiments done 2022-12-06 09:07:00 -05:00
README.md Document and improve a bit more 2022-12-02 01:10:05 +01:00

 **Stefano Pigozzi** + **Caterina Gazzotti** + **Fabio Zanichelli** | Topic OpenMP | High Performance Computing Laboratory | Unimore 

C code optimization using NVIDIA CUDA

Assignment #2

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

Results

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

Validation

  • Compiler used: nvcc
  • Device used: NVIDIA GTX 1070 with 525.60.11 driver

To reproduce the obtained results:

  1. Clone the repository on @Steffo99's computer:

    $ git clone https://github.com/Steffo99/unimore-hpc-assignments
    
  2. Checkout the exact commit the tests were executed on:

    $ git checkout 2d6448e5aa3707370b837a37db4eb880ca06ddb7
    
  3. Access our group's assigned folder:

    $ cd unimore-hpc-assignments/atax
    
  4. Run the benchmarking script:

    $ make bench