Character to be used with the cmd()
function to launch a parallelised run.
parallel_execute
An object of class character
of length 1.
A character
object.
Requires cores
and parafile
fields to be set.
# 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")) %>%
cmd(parallel_execute) %>%
parafile("/opt/NONMEM/nm75/run/mpilinux8.pnm") %>%
cores(8)
cmd(m1)
#> [1] "execute -parafile=/opt/NONMEM/nm75/run/mpilinux8.pnm runm1.mod -dir=m1 -nodes=8"
m2 <- m1 %>% child("m2") ## inherits same command as above
parallel_execute ## view the character to see how psn interfaces with SGE
#> [1] "execute -parafile={parafile} {ctl_name} -dir={run_dir} -nodes={cores}"