[Experimental]

Gets attributes of the run like run time, queue time.

job_stats(m)

Arguments

m

An nm object.

Value

A wide format tibble with information about the job execution times.

Examples


## Below code requires NONMEM to be installed
if (FALSE) {

#' # create example object m1 from package demo files
exdir <- system.file("extdata", "examples", "theopp", package = "NMproject")
m1 <- new_nm(run_id = "m1", 
             based_on = file.path(exdir, "Models", "ADVAN2.mod"),
             data_path = file.path(exdir, "SourceData", "THEOPP.csv"))

dc <- tibble(cores = c(1, 3, 10, 30)) %>%
  mutate(m = m1 %>%
    child(run_id = cores) %>%
    run_in("Models/m1_coretest") %>%
    cmd("execute {ctl_name} -parafile={parafile} -dir={run_dir} -nodes={cores}") %>%
    parafile("/opt/NONMEM/nm75/run/mpilinux8.pnm") %>%
    cores(cores))

dc$m %>% cmd()

dc$m %>%
  run_nm() %>%
  wait_finish()

## extract job statistics and plot cores vs Rtime or Ttime
## to get plots of run time and total time vs number of CPUs

dc$m %>%
  job_stats() %>%
  ggplot(aes(x = cores, y = Rtime)) +
  theme_bw() +
  geom_point()
}