build_cluster_script: Builds a cluster shell script

Description Usage Arguments Value Examples

View source: R/cluster.R

Description

Builds a shell script to initialize Hi-sAFe simulations on the MUSE cluster.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
build_cluster_script(
  hip = NULL,
  simu.names = NULL,
  script.path = NULL,
  script.name = NULL,
  simu.prefix = NULL,
  model.version = "Capsis4",
  launch.call = "ScriptGen",
  default.folder = "",
  cluster.path,
  email.type = "NONE",
  email = NULL,
  num.cores = NULL,
  max.per.node = NULL,
  mem.spec = NULL
)

Arguments

hip

A hip object. If NULL, then simu.names and script.path are required.

simu.names

A character vector of the names of the simulations to create the script for. This must match the names of .SIM files as well as the names of the folders that files are in.

script.path

A character string of the local path for where to create the cluster script file. If NULL, hip must be provided, and the path used will be the path element of the hip object.

script.name

A character string of the name of the cluster script file to call.

simu.prefix

A character string of the SimulationName prefix.

model.version

A character string of the name of the Capsis folder (version) to call on the cluster.

launch.call

The name of the safe lanuch script to use (one of 'ScriptGen' or 'ScriptCalib')

default.folder

The folder in safe/data/SimSettings to use for parameter files that are not found in the simulation folder.

cluster.path

A character string of the path on the cluster where the simulation folder is located.

email.type

Type of email notification. Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL. Multiple values may be specified in a comma separated list within a single character string (e.g. "BEGIN,END").

email

A character string of the email address to notify with cluster job updates. Use NULL for no email generation.

num.cores

The number of cores to request from the cluster. Use NULL to make no specification.

max.per.node

The maximum numver of tasks allowed per node on the cluster. This allows memory to be allocated to each task. Use NULL to make no specification.

mem.spec

An integer indicating the maximum memory use (Mb) permitted for each individual instance of Capsis/Hi-sAFe. Use NULL to make no specification.

Value

Invisibly returns TRUE.

Examples

1
2
3
4
5
6
7
## Not run: 
mysim <- build_cluster_script("mysim",
                              script.path  = "/simulations/",
                              cluster.path = "/nfs/work/hisafe/simulations/user/",
                              email        = "me@work.com")

## End(Not run)

kevinwolz/hisafer documentation built on Oct. 19, 2020, 4:43 p.m.