Author Topic: Regarding recent MPI Lecture video (some quesitons part 1/2)  (Read 5185 times)

faisal

  • Newbie
  • *
  • Posts: 5
    • View Profile
Regarding recent MPI Lecture video (some quesitons part 1/2)
« on: January 07, 2021, 03:43:38 PM »
I have some questions from recently uploaded MPI video @11.46 of the video time.

Q1. Which one will be faster? sum1.c, sum2.c or sum3.c?

Q2. In code dot1.c Will the tid will always be 0 in for(int i = tid ... will always be 0?
Q3. Followup: Will numT = number of elements in sum? 64?
Q4. Followup: Why the second for loop is outside #pragma?

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 232
    • View Profile
Re: Regarding recent MPI Lecture video (some quesitons part 1/2)
« Reply #1 on: January 08, 2021, 04:31:34 PM »
1. sum1 .. false sharing again in 2 .. would assume 3 will be close to 1 as letting compiler put in what it thinks best
2. no
3. if you could, but numT not known at that statment location for a compile time setup
4. not sure which file you are referring to