[R-sig-hpc] system.time under openmpi: estimating fixed CPU use

Ross Boylan ross at biostat.ucsf.edu
Tue Jun 30 20:07:52 CEST 2009


A simple estimate of total wall clock time T is
T = S + P/N
where 
S = time spent in the serial (non-parallelized) portion of the code,
P = time spent on the parallel computation, and 
N = the number of parallel processors.
This is a slight reinterpretation of Amdahl's law.

I'd like to know S.

When I run an R computation under openmpi, system.time() on the master
reports, e.g.,
    user   system  elapsed
3733.794 1960.342 5696.241

Is anything other than the elapsed time meaningful here?  For example,
does user time approximate S?  If not, is there an easy way to get S?

The problem is that openmpi busy waiting means the CPU looks busy even
when it's just polling; I'm hoping the polling part ends up mostly as
system time.  It doesn't seem likely, but I thought I'd ask.

Note user+system is just 2 seconds less than elapsed.

I already know S is significant from some experiments with varying
numbers of slots (N) and estimating the equation given at the top.  I
was hoping there might be a more direct way to figure out how much work
master is doing.

By splitting the problem up differently I can reduce S to near 0, but at
the cost of having bigger and more varied chunk sizes.  So the
alternative would be limited to the speed of the slowest chunk.

Thanks.
Ross Boylan



More information about the R-sig-hpc mailing list