douglas.gupt...@dal.ca wrote:It isn't a binary situation. The first extreme you mention is "consume a lot of resources and spring into action as soon as there is work to do." The second extreme you mention is "don't use any extra resources, but take a loooong time to wake up once there is something to do". There are a bunch of alternatives in-between. E.g., "don't use as much resource and wake up kind of fast when there is something to do."Proceeding from that, it seems that "mpi_recv" is implemented as "poll forever until the message comes" and NOT as "sleep until the message comes"I had assumed, until now, that mpi_recv would be implemented as the second. OMPI's yield behavior is such an in-between alternative. I could imagine another alternative. Construct a wrapper function that intercepts MPI_Recv and turn it into something likeIf "mpi_recv" is implemented as "poll forever", openmpi (or any MPI with the same implementation) would seem to be unsuitable for my application, since the application is using two cpus, but only getting real work out of one. PMPI_Irecv while ( ! done ) { nanosleep(short); PMPI_Test(&done); } I don't know how useful this would be for your particular case. Douglas Guptill wrote: But in that case, be careful what you measure. If a process is performing a lot of yields, it may be running up the CPU utilization, but a new process that you submit may still get a lot of time.On Mon, Dec 08, 2008 at 08:56:59PM +1100, Terry Frankcombe wrote:As Eugene said: Why are you desperate for an idle CPU?So I can run another job. :-) I think of an automobile-traffic analogy. Let's say you have a bunch of cars that will all yield to an ambulance. If there is no ambulance on the road, it looks like there is a lot of traffic and a vehicle will not be able to go fast. But, if you put the ambulance on the road, all those vehicles yield and the ambulance goes pretty fast -- on a road that just minutes ago looked congested. In both cases (OMPI yield and the traffic analogy), things would be better if there were no traffic whatsoever. But, if processes are yielding, then the appearance of congestion is not a reliable indication of how well an added process will perform. |
- [OMPI users] trouble using --mca mpi_yield_when_idle 1 Douglas Guptill
- Re: [OMPI users] trouble using --mca mpi_yield_when... Eugene Loh
- Re: [OMPI users] trouble using --mca mpi_yield_... Jens
- Re: [OMPI users] trouble using --mca mpi_yi... Terry Frankcombe
- Re: [OMPI users] trouble using --mca mp... Jens
- Re: [OMPI users] trouble using --mca mp... Douglas Guptill
- Re: [OMPI users] trouble using --mca mpi_yield_... douglas . guptill
- Re: [OMPI users] trouble using --mca mpi_yi... Eugene Loh
- Re: [OMPI users] trouble using --mca mp... Jeff Squyres
- Re: [OMPI users] trouble using --m... Eugene Loh
- Re: [OMPI users] trouble using... Jeff Squyres
- Re: [OMPI users] trouble u... Eugene Loh
- Re: [OMPI users] trouble using --m... douglas . guptill
- Re: [OMPI users] trouble using... Jeff Squyres
- Re: [OMPI users] trouble using --mca mp... douglas . guptill
- Re: [OMPI users] trouble using --m... Jeff Squyres
- Re: [OMPI users] trouble using... douglas . guptill