HPC
Run pcvct on an HPC.
Public API
Private API
pcvct.defaultJobOptions
— MethoddefaultJobOptions()
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)
pcvct.isRunningOnHPC
— MethodisRunningOnHPC()
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.
pcvct.setJobOptions
— MethodsetJobOptions(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.
pcvct.shellCommandExists
— MethodshellCommandExists(cmd::Union{String,Cmd})
Check if a shell command exists in the current environment.
pcvct.useHPC
— FunctionuseHPC([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