From 6ba6885429d44d7328f8fce35fd476b9247e497d Mon Sep 17 00:00:00 2001 From: Alice Date: Wed, 25 Oct 2023 12:11:34 +0100 Subject: [PATCH] vault backup: 2023-10-25 12:11:34 --- 4a1s/CP/PL - Aula 7.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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. +