Douglas Guptill wrote:
Another option is to use a condition variable -- e.g., pthread_cond_wait() and the like. So, there is a certain wake-up time, but you don't need to tune sleep times or wait for some long sleep time, etc.On Sun, Dec 06, 2009 at 02:29:01PM +0200, Katz, Jacob wrote:Yes, I meant in the question that I was looking for something creative, both fast responding and not using 100% CPU all the time. I guess I’m not the first one to face this question. Have anyone done anything “better” than the simple solution?I got tired of seeing both cpus at 100% load, and based on suggestions from Jeff Squyres and Eugene Loh, wrote MPI_Recv.c and MPI_Send.c. I load these with my application, and bingo! Only one cpu busy at any given time.They use a graduated sleep; the first sleep is short, the second is twice as long, and so on, up to a maximum sleep time. There is no magic bullet here. It's a matter of tuning various trade-offs. Some bullets are better than others, but none of them is magic. :^) |
- Re: [OMPI users] Mimicking timeout for MPI_Wait Richard Treumann
- Re: [OMPI users] Mimicking timeout for MPI_Wait Katz, Jacob
- Re: [OMPI users] Mimicking timeout for MPI_Wait Douglas Guptill
- Re: [OMPI users] Mimicking timeout for MPI_W... Katz, Jacob
- Re: [OMPI users] Mimicking timeout for M... Katz, Jacob
- Re: [OMPI users] Mimicking timeout for M... Richard Treumann
- Re: [OMPI users] Mimicking timeout ... Douglas Guptill
- Re: [OMPI users] Mimicking timeout ... George Bosilca
- Re: [OMPI users] Mimicking timeout ... Number Cruncher
- Re: [OMPI users] Mimicking timeout ... Ashley Pittman
- Re: [OMPI users] Mimicking timeout for MPI_W... Eugene Loh
- Re: [OMPI users] Mimicking timeout for MPI_Wait Tim Prince