HPC

Run pcvct on an HPC.

Public API

Private API

pcvct.defaultJobOptionsMethod
defaultJobOptions()

Return a dictionary with default options for a job script for use with SLURM. See setJobOptions for setting these options and others.

Current defaults are:

  • job-name: simulation_id -> "S$(simulation_id)" (use the simulation ID for the job name)
  • mem: "1G" (1 GB of memory)
source
pcvct.isRunningOnHPCMethod
isRunningOnHPC()

Return true if the current environment is an HPC environment, false otherwise.

Currently, this function checks if the sbatch command is available, indicating a SLURM environment.

source
pcvct.setJobOptionsMethod
setJobOptions(options::Dict)

Set the default job options for use with SLURM.

For any key-value pair in options, the corresponding key in the global sbatch_options dictionary is set to the value. A flag is then added to the sbatch command for each key-value pair in options: --key=value. When running simulations, any values in this dictionary that are Function's will be assumed to be functions of the simulation id.

source
pcvct.useHPCFunction
useHPC([use::Bool=true])

Set the global variable run_on_hpc to use.

Examples

useHPC() # Set to true so `sbatch` is used for running simulations
useHPC(true) # set to true so `sbatch` is used for running simulations
useHPC(false) # Set to false so simulations are run locally
source