2023-11-08 11:51:12 +00:00
|
|
|
>[!note] Initial commands
|
2023-11-08 12:01:12 +00:00
|
|
|
>- module load gcc/11.2.0
|
|
|
|
>- gcc -O2 -fopenmp -lm -g -fno-omit-frame-pointer exe1.c -o exe1.out
|
2023-11-08 12:11:12 +00:00
|
|
|
>>- ./exe1.out
|
|
|
|
>- srun --partition=cpar --cpus-per-task=2 ./exe1.out perf stat exe1.out
|
2023-11-08 12:31:12 +00:00
|
|
|
>> sbatch --partition=cpar --cpus-per-task=4
|
2023-11-08 12:01:12 +00:00
|
|
|
time.sh
|
2023-11-08 11:51:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Ex 1
|
2023-11-08 12:11:12 +00:00
|
|
|
### a) Tempos de execução
|
|
|
|
|
2023-11-08 11:51:12 +00:00
|
|
|
| | 2PUs | 4PUs |
|
|
|
|
| --------- | ---- | ---- |
|
2023-11-08 12:21:12 +00:00
|
|
|
| critical | 0.032681249 | 0.031749990 |
|
|
|
|
| atomic | 0.032905756 | 0.031628442 |
|
|
|
|
| reduction | 0.056825000 | 0.032184014 |
|
2023-11-08 11:51:12 +00:00
|
|
|
|
|
|
|
|
2023-11-08 12:21:12 +00:00
|
|
|
b)
|