diff --git a/4a1s/CP/PL - Aula 7.md b/4a1s/CP/PL - Aula 7.md index f3fe507..d9c377a 100644 --- a/4a1s/CP/PL - Aula 7.md +++ b/4a1s/CP/PL - Aula 7.md @@ -546,3 +546,22 @@ Versão original: ``` Dot is 1.2020569031095949 ``` + +### a) +Run \#1 (--cpus-per-task=2): +``` +Dot is 1.2020569029595982 +``` + +Run \#2 (--cpus-per-task=4): +``` +Dot is 0.0000000005999720 +``` + +Run \#3 (--cpus-per-task=6): +``` +Dot is 0.0000000013500135 +``` + +Varies with the number of cpus per task (cores) because depending on the number of threads, the distribution of the instruction ```dot += a[i]*b[i];'``` per thread will vary, aka the value i will constantly vary, making the memory space alternate between versions. +