runstate: Detect State of a Run Using File Existence Criteria

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

In real time, determines the status of a run generated by NONR.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
runstate(
	run,
	project=getwd(),
	rundir=file.path(project,run),
	testfile=c('FCON','FILE10','INTER'),
	queued=   c(0, 0, 0),
	compiled= c(1, 0, 0),
	running=  c(1, 1, 1),
	done=     c(NA,0, 1),
	...
)
progress(run,project=getwd(),...)
follow(
	run,
	project=getwd(),
	interval=10,
	watch='done',
	until=length(run),
	visible=TRUE,
	...
)

Arguments

run

a run name or number (scalar)

project

path to the directory containing run subdirectories

rundir

the path to the run directory

testfile

vector of filenames possibly present in rundir

queued

logical vector (or coercible); see details

compiled

logical vector (or coercible); see details

running

logical vector (or coercible); see details

done

logical vector (or coercible); see details

interval

integer

watch

character

until

integer

visible

logical

...

passed to called functions

Details

The status of a run is either queued, compiled, running, done, or indeterminate. The last occurs if the run directory does not exist. It also occurs if the more than one or fewer than one of the other states is detected. queued, compiled, running, and done must have the same length as testfile and must be coercible to logical. They indicate the subset of testfile that is present in rundir when that state applies. Obviously, they should be different from each other.

runstate only analyzes one run at a time, but can be easily wrapped in sapply.

NA in queued, compiled, running, or done indicates not to consider the corresponding file when testing for this state.

The defaults for testfile are defined by NONMEM. FCON: nm/ABLOCK.f. FILE10: nm/BLKDAT.f. OUTPUT: nm/BEGIN.f. rlog() tests INTER instead of OUTPUT if tool is 'nm7'.

progress tabulates the states for one or more runs. follow prints the progress of one or more runs if visible = TRUE; if the element specified by watch is less than until, it sleeps interval seconds and tries again. By default, it updates status at the console until all runs are 'done'. You may need to interrupt manually if any are hung.

Value

Author(s)

Tim Bergsma.

References

http://metrumrg.googlecode.com

See Also

Examples

1
2
## Not run: metrumrgURL('example/project/script/model.pdf')
runstate(1)

metrumrg documentation built on May 2, 2019, 5:55 p.m.