jobman.batch_builders package

Submodules

jobman.batch_builders.base_batch_builder module

class jobman.batch_builders.base_batch_builder.BaseBatchBuilder[source]

Bases: object

ENTRYPOINT_NAME = 'entrypoint.sh'
SUBJOBS_DIR_NAME = 'subjobs'
build_batch_jobdir(batch_job=None, subjobs=None, dest=None, extra_cfgs=None, **kwargs)[source]
entrypoint_path
std_log_file_names = {'stdout': 'stdout', 'stderr': 'stderr'}

jobman.batch_builders.bash_batch_builder module

class jobman.batch_builders.bash_batch_builder.BashBatchBuilder(*args, default_preamble=None, **kwargs)[source]

Bases: jobman.batch_builders.base_batch_builder.BaseBatchBuilder

exception CfgSpecAggregationError[source]

Bases: Exception

exception CfgSpecMergeError[source]

Bases: Exception

DEFAULT_PREAMBLE = 'PARALLEL=${PARALLEL:-/bin/bash}'
exception InvalidPreambleError(msg=None, preamble=None)[source]

Bases: Exception

subjob_commands_path

jobman.batch_builders.slurm_batch_builder module

class jobman.batch_builders.slurm_batch_builder.SlurmBatchBuilder(*args, time_fudge_factor=2.0, default_subjob_time=600, **kwargs)[source]

Bases: jobman.batch_builders.bash_batch_builder.BashBatchBuilder

DEFAULT_PREAMBLE = '\nSRUN="srun --exclusive --nodes=1 --ntasks=1"\n# the --exclusive to srun make srun use distinct CPUs for each job step\n# --nodes=1 --ntasks=1 allocates a single core to each task\n\nPARALLEL="parallel --delay .2 -j $SLURM_NTASKS --joblog runtask.log \\\n --resume"\n# --delay .2 prevents overloading the controlling node\n# -j is the number of tasks parallel runs so we set it to $SLURM_NTASKS\n# --joblog makes parallel create a log of tasks that it has already run\n# --resume makes parallel use the joblog to resume from where it has\n# left off\n# The combination of --joblog and --resume allow jobs to be resubmitted\n# if necessary and continue from where they left off.\n'