I'm using MPI (required by a library) to do some work. I'd like the worker processors to pause for a while while the master thread does some non-trivial work. At the moment I have the worker threads pausing waiting for an MPI_Bcast
but they're spinning (100% CPU usage) wasting resources that could be used elsewhere. Is there a way to pause a process and have it rest?
Asked
Active
Viewed 61 times
1

Cramer
- 1,785
- 1
- 12
- 20
-
1I'm not familiar with MPI but I'm surprised it would do a busy loop. Do you have the relevant part of the worker process that you could share with us? – Mark Ransom Oct 10 '14 at 02:23
-
I would think that there should be some form of wait for the MPI_Bcast that each thread could use. – rcgldr Oct 10 '14 at 02:23
-
MPI implementations often busy-wait because users wants minimal latency. You should try MPI_Ibcast and poll at the frequency you like while doing work on that thread otherwise. – Jeff Hammond Apr 19 '15 at 23:44