0

I'm noticing that all the MPI calls need some amount of symmetry or they hang and/or produce unexpected results. How do you attack a dynamic problem or data set?

Every example I find online always breaks the problem into evenly divisible chunks or uses the repetition of code blocks in their calculation.

Let's say I have 8 threads available, but the work I want to do comes in units of 57, 80, 99, 64, 13, etc...

Is there a preferred approach to tackling such a problem? Reduction seems to require equal calls to the function between threads? (i.e. 57 would require 8 calls from each thread even though the last 7 would be pointless) Scatter seems to be similar. Is there anything like Scatter that works on non-evenly divisible problem sets?

Zak
  • 12,213
  • 21
  • 59
  • 105

1 Answers1

0

If you use write/send function compared to scatter, you ll have much control on how you distribute data although its a little more burden. Ideally, divide data as evenly as you can and let the master process do the additional work.

BudsNanKis
  • 224
  • 5
  • 17