getArrayID {SimDesign} | R Documentation |
Get job array ID (e.g., from SLURM or other HPC array distributions)
Description
Get the array ID from an HPC array distribution job (e.g., from SLURM or
from optional command line arguments).
The array ID is used to index the rows in the design
object in runArraySimulation
. For instance,
a SLURM array with 10 independent jobs might have the following shell
instructions.
Usage
getArrayID(type = "slurm", trailingOnly = TRUE)
Arguments
type |
an integer indicating the element from the result of
|
trailingOnly |
logical value passed to |
Details
#!/bin/bash -l
#SBATCH --time=00:01:00
#SBATCH --array=1-10
which names the associated jobs with the numbers 1 through 10.
getArrayID()
then extracts this information per array, which
is used as the runArraySimulation(design, ..., arrayID = getArrayID())
to
pass specific rows for the design
object.
See Also
Examples
## Not run:
# get slurm array ID
arrayID <- getArrayID()
# get ID based on first optional argument in shell specification
arrayID <- getArrayID(type = 1)
# pass to
# runArraySimulation(design, ...., arrayID = arrayID)
## End(Not run)
[Package SimDesign version 2.16 Index]