Newsgroups: comp.parallel.pvm
From: edemaine@ug.cs.dal.ca (Erik Demaine)
Subject: Re: pvm message passing timing
Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada
Date: Mon, 7 Aug 1995 18:07:30 GMT
Message-ID: <DCyD0I.7Ky@cs.dal.ca>

Eve Li (eve_li@btgmax.zko.dec.com) wrote:
: I looked at the example director of pvm, and find most of the examples
: are timed using gettimeofday instead of clock(3), which gives you both
: user and system time instead of ellapsed time. In a multitasking system,
: the wall clock time (get from gettimeofday) seems to be inaccurate than
: clock (the time spent by the process). Can someone discuss the pros
: and cons of both scheme in measuring times took by pvm for passing
: messages, Esp, why does one choose gettimeofday instead of clock? 

clock (user and system time) does *not* include the extra time to wait
for a message to be received in typical message-passing (e.g., PVM), because
the method used is blocking (which takes wall-clock time, but no CPU time)
and not polling.  Thus, gettimeofday (or equivalent) _must_ be used to take
into account message-passing time, unless it is guaranteed that the message
is already available.  Unfortunately, this doesn't work well when other
jobs are running simulaneously.  As far as I know, there is no great way
to time a parallel program under these circumstances.

Anyone care to comment?
Erik
--
Erik Demaine        || edemaine@ug.cs.dal.ca  || edemaine@fx2800.dal.ca
edemaine@cs.dal.ca  || 01ERIK@ac.dal.ca       || edemaine@is.dal.ca
URL: http://ug.cs.dal.ca:3400/~edemaine/edemaine.html
--> A glob is a round substance of thick liquid. A blob is an unformed object.

