[OMPI users] 100% CPU doing nothing!?

2009-04-22 Thread Douglas Guptill
Hi Ross:

On Tue, Apr 21, 2009 at 07:19:53PM -0700, Ross Boylan wrote:
> I'm using Rmpi (a pretty thin wrapper around MPI for R) on Debian Lenny
> (amd64).  My set up has a central calculator and a bunch of slaves to
> wich work is distributed.
> 
> The slaves wait like this:
> mpi.send(as.double(0), doubleType, root, requestCode, comm=comm)
> request <- request+1
> cases <- mpi.recv(cases, integerType, root, mpi.any.tag(),
> comm=comm)
> 
> I.e., they do a simple send and then a receive.
> 
> It's possible there's no one to talk to, so it could be stuck at
> mpi.send or mpi.recv.
> 
> Are either of those operations that should chew up CPU?  At this point,
> I'm just trying to figure out where to look for the source of the
> problem.

Search the list archives
  http://www.open-mpi.org/community/lists/users/
for "100% CPU" and you will get lots to look at.

I had a similar problem with a FORTRAN program.  With the help of Jeff
Squyres and Eugene Loh I wrote a solution: user-written MPI_Recv.c and
MPI_Send.c which I load them with my application, and the MPI problem
"100% CPU usage while doing nothing" is cured.

The code for MPI_Recv.c and MPI_Send.c is here:
  http://www.open-mpi.org/community/lists/users/2008/12/7563.php

Cheers,
Douglas.



Re: [OMPI users] 100% CPU doing nothing!?

2009-04-22 Thread Terry Frankcombe
On Tue, 2009-04-21 at 19:19 -0700, Ross Boylan wrote:
> I'm using Rmpi (a pretty thin wrapper around MPI for R) on Debian Lenny
> (amd64).  My set up has a central calculator and a bunch of slaves to
> wich work is distributed.
> 
> The slaves wait like this:
> mpi.send(as.double(0), doubleType, root, requestCode, comm=comm)
> request <- request+1
> cases <- mpi.recv(cases, integerType, root, mpi.any.tag(),
> comm=comm)
> 
> I.e., they do a simple send and then a receive.
> 
> It's possible there's no one to talk to, so it could be stuck at
> mpi.send or mpi.recv.
> 
> Are either of those operations that should chew up CPU?  At this point,
> I'm just trying to figure out where to look for the source of the
> problem.


The short response is:  why do you not want it to use the whole CPU
while waiting?

There's some discussion starting here:


If you really want to make your application run slower, you can yield
the CPU when not doing much:



Ciao
Terry

-- 
Dr. Terry Frankcombe
Research School of Chemistry, Australian National University
Ph: (+61) 0417 163 509Skype: terry.frankcombe



[OMPI users] 100% CPU doing nothing!?

2009-04-21 Thread Ross Boylan
I'm using Rmpi (a pretty thin wrapper around MPI for R) on Debian Lenny
(amd64).  My set up has a central calculator and a bunch of slaves to
wich work is distributed.

The slaves wait like this:
mpi.send(as.double(0), doubleType, root, requestCode, comm=comm)
request <- request+1
cases <- mpi.recv(cases, integerType, root, mpi.any.tag(),
comm=comm)

I.e., they do a simple send and then a receive.

It's possible there's no one to talk to, so it could be stuck at
mpi.send or mpi.recv.

Are either of those operations that should chew up CPU?  At this point,
I'm just trying to figure out where to look for the source of the
problem.

Running openmpi-bin 1.2.7~rc2-2

Ross