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

faisal

  • Newbie
  • *
  • Posts: 5
    • View Profile
Regarding recent MPI Lecture video (some quesitons part 2/2)
« on: January 07, 2021, 03:54:11 PM »
I can't grasp the idea of false sharing.

Q1. Are pad, sync, and reduction available choices to solve false sharing/sequential
consistency?

Q2. What difference is made by pad (next slide)?
Followup: Here it appears that all calculations are happening in pad0? Is it right?

Q3. What synchronization doing (next slide)? So does sync solve problem of pad0? Second for loop
Code: [Select]
for
dot + = sum
is gone.

Q4. So what the reduction do? Does reduction do the job of sync and pad? So only reduction is
enough to stop false sharing/sequential consistency? And when to use reduction types?

Q5. Finally does intel mkl has parallel capabilities and can't we do multi-threading and multi-processing in cpp?

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 233
    • View Profile
Re: Regarding recent MPI Lecture video (some quesitons part 2/2)
« Reply #1 on: January 08, 2021, 04:15:59 PM »
pad yes .. the other options do not specifially deal with it as they are controlling access to a single variable, however they are overcoming the problem

when p0 writes to a memory that is part of the cache line, that memory has to be sent to shared cache and other cores do not get access to their cache memory until the other cores memory is put out on the shared cache and can be read in

sync solves problem as the programmer explicitly tells compiler that acess to this memory must be controlled, in original it is not told and can do nothing about what happens, which is why what needs to happen ends up killing the performance

reduction is going to be implemented just like the synch, it is just a convenient feature that openmp provides the programmer with to write an operation that is very common.

you can do all this in c++, what is avail in c is avail in c++


have a look at the following: https://www.youtube.com/watch?v=h58X-PaEGng