runTime-class {mspath} | R Documentation |
This low-level class captures the time it takes to run a
particular job. This is for further analysis by runAnalyzer
.
Create with runTime(job)
. It automatically records
the time it was created, so don't make it until you're ready.
The sequence of events is that the job is created locally, started remotely, finished remotely, and completed locally. Scheduling and transmission delays may occur.
job
:"ANY"
start
:"numeric"
end
:remote<-
is called).
Object of class "numeric"
remote
:"numeric"
rank
:"numeric"
signature(analyzer = "runAnalyzer", runTime = "runTime")
:
Once a runTime
object is complete, use this method to add
it to an analyzer for later analysis. This uses the R idiom in
which the return value is the updated runAnalyzer
object. signature(runTime = "runTime")
: CPU seconds
the job took. If the job executed remotedly, this is only the
remote CPU time.signature(runTime = "runTime")
:
time in seconds since start of process that job
ended (set when remote<-
is called).
Object of class "numeric"
signature(runTime = "runTime")
:
Get the job that goes with this runTime
.signature(runTime = "runTime", value =
"numeric")
:
Sets the MPI rank of the job, once it is known. The return value
is the runTime
object with the updated rank. signature(runTime = "runTime")
:
Get the MPI rank of the job. signature(runTime = "runTime", value =
"numeric")
:
Return a runTime
object updated with the vector of time
values from the remote job. See slot remote
for the exact
form the argument should take. This also sets the endTime
of the object as a side-effect. signature(runTime = "runTime")
:
time in seconds since start of process that job began.
Object of class "numeric"
. signature(runTime = "runTime")
:
Number of wall-clock seconds the remote jobs was waiting for a
response from root after the remote job's completion. signature(runTime = "runTime")
: Number of
seconds from the time the master process initiated the job to the
time it was finished with it (i.e. endTime - startTime
).
Resolution of time is system-dependent; it's whatever
proc.time
can get.
The creator of the object is responsible for assuring that the method definitions above are true. In particular,
runTime
object only when the corresponding
job is started.
mpirank
with a proper value.
remoteTime<-
and make this
call exactly when all processing on the job is done.
In order to retain the updated values, you must capture the return value of the update methods, in keeping with the general functional style of R.
Ross Boylan
runTime
constructor,
runAnalyzer
,
proc.time
### Make a runTime object # at the start of the job rt <- runTime("Job1") # in real life, remote computations would then ensue mpirank(rt) <- 3 Sys.sleep(1.5) # time passes # when we get the job back # next line is c( user cpu, system cpu, wall clock time, wall clock wait) remoteTime(rt) <- c(.05, .01, 1.0, .15) ### Use it cat("Job", job(rt), "executed on MPI rank", mpirank(rt)) cat("It took", wallTime(rt), "seconds, out of which remote waited for master", waitTime(rt), "seconds.")