slurm_script_generator.pragmas
Attributes
| Name | Description |
|---|---|
PragmaTypes | No description. |
acc | No description. |
pragmas_ordered | No description. |
Classes
| Name | Description |
|---|---|
Account | Represents the SLURM #SBATCH --account pragma. |
Array | Represents the SLURM #SBATCH --array pragma. |
Bb_file | Represents the SLURM #SBATCH --bbf pragma. |
Begin | Represents the SLURM #SBATCH --begin pragma. |
Bell | Represents the SLURM #SBATCH --bell pragma. |
Burst_buffer | Represents the SLURM #SBATCH --bb pragma. |
Chdir | Represents the SLURM #SBATCH --chdir pragma. |
Cluster_constraint | Represents the SLURM #SBATCH --cluster-constraint pragma. |
Clusters | Represents the SLURM #SBATCH --clusters pragma. |
Comment | Represents the SLURM #SBATCH --comment pragma. |
Constraint | Represents the SLURM #SBATCH --constraint pragma. |
Container | Represents the SLURM #SBATCH --container pragma. |
Container_id | Represents the SLURM #SBATCH --container-id pragma. |
Contiguous | Represents the SLURM #SBATCH --contiguous pragma. |
Core_spec | Represents the SLURM #SBATCH --core-spec pragma. |
Cores_per_socket | Represents the SLURM #SBATCH --cores-per-socket pragma. |
Cpu_freq | Represents the SLURM #SBATCH --cpu-freq pragma. |
Cpus_per_gpu | Represents the SLURM #SBATCH --cpus-per-gpu pragma. |
Cpus_per_task | Represents the SLURM #SBATCH --cpus-per-task pragma. |
Deadline | Represents the SLURM #SBATCH --deadline pragma. |
Delay_boot | Represents the SLURM #SBATCH --delay-boot pragma. |
Dependency | Represents the SLURM #SBATCH --dependency pragma. |
Disable_output_job_summary | Represents the SLURM #SBATCH --disable-output-job-summary pragma. |
Distribution | Represents the SLURM #SBATCH --distribution pragma. |
Error | Represents the SLURM #SBATCH --error pragma. |
Exclude | Represents the SLURM #SBATCH --exclude pragma. |
Exclusive_mcs | Represents the SLURM #SBATCH --exclusive-mcs pragma. |
Exclusive_user | Represents the SLURM #SBATCH --exclusive-user pragma. |
Extra_node_info | Represents the SLURM #SBATCH --extra-node-info pragma. |
Get_user_env | Represents the SLURM #SBATCH --get-user-env pragma. |
Gpu_bind | Represents the SLURM #SBATCH --gpu-bind pragma. |
Gpu_freq | Represents the SLURM #SBATCH --gpu-freq pragma. |
Gpus | Represents the SLURM #SBATCH --gpus pragma. |
Gpus_per_node | Represents the SLURM #SBATCH --gpus-per-node pragma. |
Gpus_per_socket | Represents the SLURM #SBATCH --gpus-per-socket pragma. |
Gpus_per_task | Represents the SLURM #SBATCH --gpus-per-task pragma. |
Gres | Represents the SLURM #SBATCH --gres pragma. |
Gres_flags | Represents the SLURM #SBATCH --gres-flags pragma. |
Hint | Represents the SLURM #SBATCH --hint pragma. |
Hold | Represents the SLURM #SBATCH --hold pragma. |
Immediate | Represents the SLURM #SBATCH --immediate pragma. |
Job_name | Represents the SLURM #SBATCH --job-name pragma. |
Kill_command | Represents the SLURM #SBATCH --kill-command pragma. |
Licenses | Represents the SLURM #SBATCH --licenses pragma. |
Mail_type | Represents the SLURM #SBATCH --mail-type pragma. |
Mail_user | Represents the SLURM #SBATCH --mail-user pragma. |
Mcs_label | Represents the SLURM #SBATCH --mcs-label pragma. |
Mem | Represents the SLURM #SBATCH --mem pragma. |
Mem_bind | Represents the SLURM #SBATCH --mem-bind pragma. |
Mem_per_cpu | Represents the SLURM #SBATCH --mem-per-cpu pragma. |
Mem_per_gpu | Represents the SLURM #SBATCH --mem-per-gpu pragma. |
Mincpus | Represents the SLURM #SBATCH --mincpus pragma. |
Nice | Represents the SLURM #SBATCH --nice pragma. |
No_kill | Represents the SLURM #SBATCH --no-kill pragma. |
Nodefile | Represents the SLURM #SBATCH --nodefile pragma. |
Nodelist | Represents the SLURM #SBATCH --nodelist pragma. |
Nodes | Represents the SLURM #SBATCH --nodes pragma. |
Ntasks | Represents the SLURM #SBATCH --ntasks pragma. |
Ntasks_per_core | Represents the SLURM #SBATCH --ntasks-per-core pragma. |
Ntasks_per_node | Represents the SLURM #SBATCH --ntasks-per-node pragma. |
Ntasks_per_socket | Represents the SLURM #SBATCH --ntasks-per-socket pragma. |
Nvmps | Represents the SLURM #SBATCH --nvmps pragma. |
Oom_kill_step | Represents the SLURM #SBATCH --oom-kill-step pragma. |
Output | Represents the SLURM #SBATCH --output pragma. |
Overcommit | Represents the SLURM #SBATCH --overcommit pragma. |
Oversubscribe | Represents the SLURM #SBATCH --oversubscribe pragma. |
Partition | Represents the SLURM #SBATCH --partition pragma. |
Power | Represents the SLURM #SBATCH --power pragma. |
Pragma | Base class representing a SLURM #SBATCH pragma. |
PragmaFactory | Factory class for creating and managing SLURM pragma classes. |
Priority | Represents the SLURM #SBATCH --priority pragma. |
Profile | Represents the SLURM #SBATCH --profile pragma. |
Qos | Represents the SLURM #SBATCH --qos pragma. |
Quiet | Represents the SLURM #SBATCH --quiet pragma. |
Reboot | Represents the SLURM #SBATCH --reboot pragma. |
Reservation | Represents the SLURM #SBATCH --reservation pragma. |
Resv_ports | Represents the SLURM #SBATCH --resv-ports pragma. |
Signal | Represents the SLURM #SBATCH --signal pragma. |
Sockets_per_node | Represents the SLURM #SBATCH --sockets-per-node pragma. |
Spread_job | Represents the SLURM #SBATCH --spread-job pragma. |
Switches | Represents the SLURM #SBATCH --switches pragma. |
Thread_spec | Represents the SLURM #SBATCH --thread-spec pragma. |
Threads_per_core | Represents the SLURM #SBATCH --threads-per-core pragma. |
Time | Represents the SLURM #SBATCH --time pragma. |
Time_min | Represents the SLURM #SBATCH --time-min pragma. |
Tmp | Represents the SLURM #SBATCH --tmp pragma. |
Tres_bind | Represents the SLURM #SBATCH --tres-bind pragma. |
Tres_per_task | Represents the SLURM #SBATCH --tres-per-task pragma. |
UnknownPragma | An #SBATCH option this library has no class for. |
Use_min_nodes | Represents the SLURM #SBATCH --use-min-nodes pragma. |
Wckey | Represents the SLURM #SBATCH --wckey pragma. |
Functions
| Name | Description |
|---|---|
to_bool | Interpret value as the boolean of a valueless pragma such as --hold. |
PragmaTypesattributemodule attribute#
PragmaTypes = Literal[
'job_config',
'time_and_priority',
'io_and_directory',
'notifications',
'dependencies_and_arrays',
'core_node_and_task_allocation',
'cpu_topology_and_binding',
'memory',
'gpus',
'generic_resources_and_licenses',
'node_constraints_and_selection',
'exclusivity_and_sharing',
'execution_behavior_and_signals',
'advanced_hardware_misc',
'plugins',
'other_options'
]accattributemodule attribute#
acc = Account('max')pragmas_orderedattributemodule attribute#
pragmas_ordered: List[Type[Pragma]] = [
Job_name,
Account,
Partition,
Qos,
Clusters,
Reservation,
Wckey,
Mcs_label,
Comment,
Time,
Time_min,
Begin,
Deadline,
Priority,
Nice,
Chdir,
Output,
Error,
Disable_output_job_summary,
Get_user_env,
Quiet,
Mail_user,
Mail_type,
Bell,
Dependency,
Array,
Nodes,
Ntasks,
Ntasks_per_node,
Cpus_per_task,
Mincpus,
Distribution,
Spread_job,
Use_min_nodes,
Sockets_per_node,
Cores_per_socket,
Threads_per_core,
Ntasks_per_core,
Ntasks_per_socket,
Extra_node_info,
Hint,
Mem,
Mem_per_cpu,
Mem_bind,
Oom_kill_step,
Gpus,
Gpus_per_node,
Gpus_per_task,
Gpus_per_socket,
Cpus_per_gpu,
Mem_per_gpu,
Gpu_bind,
Gpu_freq,
Nvmps,
Gres,
Gres_flags,
Tres_bind,
Tres_per_task,
Licenses,
Constraint,
Cluster_constraint,
Contiguous,
Nodelist,
Nodefile,
Exclude,
Exclusive_user,
Exclusive_mcs,
Oversubscribe,
Overcommit,
Hold,
Immediate,
Reboot,
Delay_boot,
No_kill,
Kill_command,
Signal,
Core_spec,
Thread_spec,
Cpu_freq,
Tmp,
Resv_ports,
Switches,
Power,
Profile,
Burst_buffer,
Bb_file,
Container,
Container_id
]Accountclass#
class Account(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —account pragma. Specifies the account to charge for resource usage of the job. Usage: —account <ACCOUNT_NAME>
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'account'destattributeclass attributeinstance attribute#
dest = '--account'exampleattributeclass attributeinstance attribute#
example = 'myacct'flagsattributeclass attributeinstance attribute#
flags = ['-A', '--account']helpattributeclass attributeinstance attribute#
help = 'charge job to specified account'metavarattributeclass attributeinstance attribute#
metavar = 'NAME'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strThis class represents the SLURM #SBATCH —account pragma.
Inherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Arrayclass#
class Array(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —array pragma.
Submits a job array, allowing multiple similar jobs to be managed together.
Usage: —array
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'array'destattributeclass attributeinstance attribute#
dest = '--array'flagsattributeclass attributeinstance attribute#
flags = ['--array']helpattributeclass attributeinstance attribute#
help = 'submit a job array'metavarattributeclass attributeinstance attribute#
metavar = 'INDEXES'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'dependencies_and_arrays'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Bb_fileclass#
class Bb_file(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —bbf pragma. Specifies a burst buffer specification file for the job. Usage: —bbf <FILE_NAME>
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'bb_file'destattributeclass attributeinstance attribute#
dest = '--bbf'flagsattributeclass attributeinstance attribute#
flags = ['--bbf']helpattributeclass attributeinstance attribute#
help = 'burst buffer specification file'metavarattributeclass attributeinstance attribute#
metavar = 'FILE_NAME'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'plugins'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Beginclass#
class Begin(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —begin pragma. Defers job start until a specified time (absolute or relative). Usage: —begin
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'begin'destattributeclass attributeinstance attribute#
dest = '--begin'flagsattributeclass attributeinstance attribute#
flags = ['-b', '--begin']helpattributeclass attributeinstance attribute#
help = 'defer job until HH:MM MM/DD/YY'metavarattributeclass attributeinstance attribute#
metavar = 'TIME'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'time_and_priority'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Bellclass#
class Bell(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —bell pragma. Rings the terminal bell when the job is allocated. Usage: —bell
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'bell'destattributeclass attributeinstance attribute#
dest = '--bell'flagsattributeclass attributeinstance attribute#
flags = ['--bell']helpattributeclass attributeinstance attribute#
help = 'ring the terminal bell when the job is allocated'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'notifications'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Burst_bufferclass#
class Burst_buffer(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —bb pragma.
Specifies burst buffer specifications for the job.
Usage: —bb
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'burst_buffer'destattributeclass attributeinstance attribute#
dest = '--bb'flagsattributeclass attributeinstance attribute#
flags = ['--bb']helpattributeclass attributeinstance attribute#
help = 'burst buffer specifications'metavarattributeclass attributeinstance attribute#
metavar = 'SPEC'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'plugins'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Chdirclass#
class Chdir(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —chdir pragma.
Changes the working directory for the job before execution.
Usage: —chdir
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'chdir'destattributeclass attributeinstance attribute#
dest = '--chdir'flagsattributeclass attributeinstance attribute#
flags = ['-D', '--chdir']helpattributeclass attributeinstance attribute#
help = 'change working directory'metavarattributeclass attributeinstance attribute#
metavar = 'PATH'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'io_and_directory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Cluster_constraintclass#
class Cluster_constraint(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —cluster-constraint pragma.
Specifies a list of cluster constraints for node selection.
Usage: —cluster-constraint
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'cluster_constraint'destattributeclass attributeinstance attribute#
dest = '--cluster-constraint'flagsattributeclass attributeinstance attribute#
flags = ['--cluster-constraint']helpattributeclass attributeinstance attribute#
help = 'specify a list of cluster constraints'metavarattributeclass attributeinstance attribute#
metavar = 'LIST'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'node_constraints_and_selection'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Clustersclass#
class Clusters(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —clusters pragma. Specifies a comma-separated list of clusters to issue commands to, for multi-cluster environments. Usage: —clusters <CLUSTER1,CLUSTER2,…>
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'clusters'destattributeclass attributeinstance attribute#
dest = '--clusters'flagsattributeclass attributeinstance attribute#
flags = ['-M', '--clusters']helpattributeclass attributeinstance attribute#
help = 'Comma separated list of clusters to issue commands to'metavarattributeclass attributeinstance attribute#
metavar = 'NAMES'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Commentclass#
class Comment(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —comment pragma.
Adds an arbitrary comment to the job for annotation or tracking.
Usage: —comment
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'comment'destattributeclass attributeinstance attribute#
dest = '--comment'flagsattributeclass attributeinstance attribute#
flags = ['--comment']helpattributeclass attributeinstance attribute#
help = 'arbitrary comment'metavarattributeclass attributeinstance attribute#
metavar = 'NAME'pragma_idattributeclass attributeinstance attribute#
pragma_id = 8pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Constraintclass#
class Constraint(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —constraint pragma.
Specifies a list of constraints for node selection.
Usage: —constraint
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'constraint'destattributeclass attributeinstance attribute#
dest = '--constraint'flagsattributeclass attributeinstance attribute#
flags = ['-C', '--constraint']helpattributeclass attributeinstance attribute#
help = 'specify a list of constraints'metavarattributeclass attributeinstance attribute#
metavar = 'LIST'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'node_constraints_and_selection'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Containerclass#
class Container(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —container pragma.
Specifies the path to an OCI container bundle for the job.
Usage: —container
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'container'destattributeclass attributeinstance attribute#
dest = '--container'flagsattributeclass attributeinstance attribute#
flags = ['--container']helpattributeclass attributeinstance attribute#
help = 'Path to OCI container bundle'metavarattributeclass attributeinstance attribute#
metavar = 'PATH'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'plugins'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Container_idclass#
class Container_id(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —container-id pragma.
Specifies the OCI container ID for the job.
Usage: —container-id
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'container_id'destattributeclass attributeinstance attribute#
dest = '--container-id'flagsattributeclass attributeinstance attribute#
flags = ['--container-id']helpattributeclass attributeinstance attribute#
help = 'OCI container ID'metavarattributeclass attributeinstance attribute#
metavar = 'ID'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'plugins'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Contiguousclass#
class Contiguous(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —contiguous pragma. Demands a contiguous range of nodes for the job. Usage: —contiguous
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'contiguous'destattributeclass attributeinstance attribute#
dest = '--contiguous'flagsattributeclass attributeinstance attribute#
flags = ['--contiguous']helpattributeclass attributeinstance attribute#
help = 'demand a contiguous range of nodes'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'node_constraints_and_selection'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Core_specclass#
class Core_spec(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —core-spec pragma.
Sets the count of reserved cores for the job.
Usage: —core-spec
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'core_spec'destattributeclass attributeinstance attribute#
dest = '--core-spec'flagsattributeclass attributeinstance attribute#
flags = ['-S', '--core-spec']helpattributeclass attributeinstance attribute#
help = 'count of reserved cores'metavarattributeclass attributeinstance attribute#
metavar = 'CORES'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'advanced_hardware_misc'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Cores_per_socketclass#
class Cores_per_socket(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —cores-per-socket pragma.
Sets the number of cores per socket to allocate.
Usage: —cores-per-socket
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'cores_per_socket'destattributeclass attributeinstance attribute#
dest = '--cores-per-socket'exampleattributeclass attributeinstance attribute#
example = '8'flagsattributeclass attributeinstance attribute#
flags = ['--cores-per-socket']helpattributeclass attributeinstance attribute#
help = 'number of cores per socket to allocate'metavarattributeclass attributeinstance attribute#
metavar = 'C'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'cpu_topology_and_binding'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Cpu_freqclass#
class Cpu_freq(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —cpu-freq pragma. Requests CPU frequency and governor settings for the job. Usage: —cpu-freq <MIN[-MAX[:GOV]]>
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'cpu_freq'destattributeclass attributeinstance attribute#
dest = '--cpu-freq'flagsattributeclass attributeinstance attribute#
flags = ['--cpu-freq']helpattributeclass attributeinstance attribute#
help = 'requested cpu frequency (and governor)'metavarattributeclass attributeinstance attribute#
metavar = 'MIN[-MAX[:GOV]]'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'advanced_hardware_misc'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Cpus_per_gpuclass#
class Cpus_per_gpu(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —cpus-per-gpu pragma.
Specifies the number of CPUs required per allocated GPU.
Usage: —cpus-per-gpu
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'cpus_per_gpu'destattributeclass attributeinstance attribute#
dest = '--cpus-per-gpu'exampleattributeclass attributeinstance attribute#
example = '4'flagsattributeclass attributeinstance attribute#
flags = ['--cpus-per-gpu']helpattributeclass attributeinstance attribute#
help = 'number of CPUs required per allocated GPU'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Cpus_per_taskclass#
class Cpus_per_task(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —cpus-per-task pragma.
Sets the number of CPUs required per task.
Usage: —cpus-per-task
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'cpus_per_task'destattributeclass attributeinstance attribute#
dest = '--cpus-per-task'exampleattributeclass attributeinstance attribute#
example = '16'flagsattributeclass attributeinstance attribute#
flags = ['-c', '--cpus-per-task']helpattributeclass attributeinstance attribute#
help = 'number of cpus required per task'metavarattributeclass attributeinstance attribute#
metavar = 'NCPUS'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'core_node_and_task_allocation'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Deadlineclass#
class Deadline(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —deadline pragma. Removes the job if it cannot finish before the specified deadline. Usage: —deadline
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'deadline'destattributeclass attributeinstance attribute#
dest = '--deadline'flagsattributeclass attributeinstance attribute#
flags = ['--deadline']helpattributeclass attributeinstance attribute#
help = 'remove the job if no ending possible before this deadline'metavarattributeclass attributeinstance attribute#
metavar = 'TIME'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'time_and_priority'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Delay_bootclass#
class Delay_boot(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —delay-boot pragma.
Delays node boot for desired features before job execution.
Usage: —delay-boot
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'delay_boot'destattributeclass attributeinstance attribute#
dest = '--delay-boot'flagsattributeclass attributeinstance attribute#
flags = ['--delay-boot']helpattributeclass attributeinstance attribute#
help = 'delay boot for desired node features'metavarattributeclass attributeinstance attribute#
metavar = 'MINS'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'execution_behavior_and_signals'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Dependencyclass#
class Dependency(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —dependency pragma. Defers job start until a condition on another job ID is satisfied (e.g., after, afterok). Usage: —dependency TYPE:JOBID[:TIME]
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'dependency'destattributeclass attributeinstance attribute#
dest = '--dependency'flagsattributeclass attributeinstance attribute#
flags = ['-d', '--dependency']helpattributeclass attributeinstance attribute#
help = 'defer job until condition on jobid is satisfied'metavarattributeclass attributeinstance attribute#
metavar = 'TYPE:JOBID[:TIME]'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'dependencies_and_arrays'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Disable_output_job_summaryclass#
class Disable_output_job_summary(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —disable-output-job-summary pragma. Disables the job summary in the output file for the job. Usage: —disable-output-job-summary
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'disable_output_job_summary'destattributeclass attributeinstance attribute#
dest = '--disable-output-job-summary'flagsattributeclass attributeinstance attribute#
flags = ['--disable-output-job-summary']helpattributeclass attributeinstance attribute#
help = 'disable job summary in output file for the job'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'io_and_directory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Distributionclass#
class Distribution(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —distribution pragma.
Sets the distribution method for processes across nodes (block, cyclic, arbitrary).
Usage: —distribution
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'distribution'choicesattributeclass attributeinstance attribute#
choices = ['block', 'cyclic', 'arbitrary']destattributeclass attributeinstance attribute#
dest = '--distribution'flagsattributeclass attributeinstance attribute#
flags = ['-m', '--distribution']helpattributeclass attributeinstance attribute#
help = 'distribution method for processes to nodes'metavarattributeclass attributeinstance attribute#
metavar = 'TYPE'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'core_node_and_task_allocation'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Errorclass#
class Error(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —error pragma.
Redirects job error to a specified file, supporting job and jobname variables.
Usage: —error
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'error'destattributeclass attributeinstance attribute#
dest = '--error'exampleattributeclass attributeinstance attribute#
example = '--error ./%x.%j.err'flagsattributeclass attributeinstance attribute#
flags = ['--error', '-e']helpattributeclass attributeinstance attribute#
help = 'File to redirect error (%%x=jobname, %%j=jobid)'metavarattributeclass attributeinstance attribute#
metavar = 'ERROR'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'io_and_directory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Excludeclass#
class Exclude(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —exclude pragma.
Excludes a specific list of hosts from job allocation.
Usage: —exclude
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'exclude'destattributeclass attributeinstance attribute#
dest = '--exclude'flagsattributeclass attributeinstance attribute#
flags = ['-x', '--exclude']helpattributeclass attributeinstance attribute#
help = 'exclude a specific list of hosts'metavarattributeclass attributeinstance attribute#
metavar = 'HOST'nargsattributeclass attributeinstance attribute#
nargs = '+'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'node_constraints_and_selection'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Exclusive_mcsclass#
class Exclusive_mcs(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —exclusive-mcs pragma. Allocates nodes in exclusive mode when the mcs plugin is enabled. Usage: —exclusive-mcs
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'exclusive_mcs'destattributeclass attributeinstance attribute#
dest = '--exclusive-mcs'flagsattributeclass attributeinstance attribute#
flags = ['--exclusive-mcs']helpattributeclass attributeinstance attribute#
help = 'allocate nodes in exclusive mode when mcs plugin is enabled'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'exclusivity_and_sharing'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Exclusive_userclass#
class Exclusive_user(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —exclusive-user pragma. Allocates nodes in exclusive mode for CPU consumable resources. Usage: —exclusive-user
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'exclusive_user'destattributeclass attributeinstance attribute#
dest = '--exclusive-user'flagsattributeclass attributeinstance attribute#
flags = ['--exclusive-user']helpattributeclass attributeinstance attribute#
help = 'allocate nodes in exclusive mode for cpu consumable resource'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'exclusivity_and_sharing'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Extra_node_infoclass#
class Extra_node_info(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —extra-node-info pragma. Combines requests for sockets, cores, and threads in a single specification. Usage: —extra-node-info <S[:C[:T]]>
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'extra_node_info'destattributeclass attributeinstance attribute#
dest = '--extra-node-info'flagsattributeclass attributeinstance attribute#
flags = ['-B', '--extra-node-info']helpattributeclass attributeinstance attribute#
help = 'combine request of sockets, cores and threads'metavarattributeclass attributeinstance attribute#
metavar = 'S[:C[:T]]'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'cpu_topology_and_binding'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Get_user_envclass#
class Get_user_env(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —get-user-env pragma. Used by Moab for environment setup; see srun man page for details. Usage: —get-user-env
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'get_user_env'destattributeclass attributeinstance attribute#
dest = '--get-user-env'flagsattributeclass attributeinstance attribute#
flags = ['--get-user-env']helpattributeclass attributeinstance attribute#
help = 'used by Moab. See srun man page'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'io_and_directory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Gpu_bindclass#
class Gpu_bind(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —gpu-bind pragma.
Specifies task-to-GPU binding options for optimal placement.
Usage: —gpu-bind
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'gpu_bind'destattributeclass attributeinstance attribute#
dest = '--gpu-bind'flagsattributeclass attributeinstance attribute#
flags = ['--gpu-bind']helpattributeclass attributeinstance attribute#
help = 'task to gpu binding options'metavarattributeclass attributeinstance attribute#
metavar = '...'pragma_idattributeclass attributeinstance attribute#
pragma_id = 6pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Gpu_freqclass#
class Gpu_freq(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —gpu-freq pragma.
Sets the frequency and voltage of GPUs for the job.
Usage: —gpu-freq
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'gpu_freq'destattributeclass attributeinstance attribute#
dest = '--gpu-freq'flagsattributeclass attributeinstance attribute#
flags = ['--gpu-freq']helpattributeclass attributeinstance attribute#
help = 'frequency and voltage of GPUs'metavarattributeclass attributeinstance attribute#
metavar = '...'pragma_idattributeclass attributeinstance attribute#
pragma_id = 7pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Gpusclass#
class Gpus(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —gpus pragma.
Specifies the number of GPUs required for the job.
Usage: —gpus
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'gpus'destattributeclass attributeinstance attribute#
dest = '--gpus'exampleattributeclass attributeinstance attribute#
example = '32'flagsattributeclass attributeinstance attribute#
flags = ['-G', '--gpus']helpattributeclass attributeinstance attribute#
help = 'count of GPUs required for the job'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Gpus_per_nodeclass#
class Gpus_per_node(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —gpus-per-node pragma.
Sets the number of GPUs required per allocated node.
Usage: —gpus-per-node
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'gpus_per_node'destattributeclass attributeinstance attribute#
dest = '--gpus-per-node'flagsattributeclass attributeinstance attribute#
flags = ['--gpus-per-node']helpattributeclass attributeinstance attribute#
help = 'number of GPUs required per allocated node'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Gpus_per_socketclass#
class Gpus_per_socket(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —gpus-per-socket pragma.
Sets the number of GPUs required per allocated socket.
Usage: —gpus-per-socket
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'gpus_per_socket'destattributeclass attributeinstance attribute#
dest = '--gpus-per-socket'flagsattributeclass attributeinstance attribute#
flags = ['--gpus-per-socket']helpattributeclass attributeinstance attribute#
help = 'number of GPUs required per allocated socket'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Gpus_per_taskclass#
class Gpus_per_task(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —gpus-per-task pragma.
Specifies the number of GPUs required per spawned task.
Usage: —gpus-per-task
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'gpus_per_task'destattributeclass attributeinstance attribute#
dest = '--gpus-per-task'flagsattributeclass attributeinstance attribute#
flags = ['--gpus-per-task']helpattributeclass attributeinstance attribute#
help = 'number of GPUs required per spawned task'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Gresclass#
class Gres(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —gres pragma.
Specifies required generic resources (e.g., GPUs, licenses).
Usage: —gres
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'gres'destattributeclass attributeinstance attribute#
dest = '--gres'flagsattributeclass attributeinstance attribute#
flags = ['--gres']helpattributeclass attributeinstance attribute#
help = 'required generic resources'metavarattributeclass attributeinstance attribute#
metavar = 'LIST'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'generic_resources_and_licenses'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Gres_flagsclass#
class Gres_flags(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —gres-flags pragma.
Sets flags related to GRES (Generic Resource) management.
Usage: —gres-flags
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'gres_flags'destattributeclass attributeinstance attribute#
dest = '--gres-flags'flagsattributeclass attributeinstance attribute#
flags = ['--gres-flags']helpattributeclass attributeinstance attribute#
help = 'flags related to GRES management'metavarattributeclass attributeinstance attribute#
metavar = 'OPTS'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'generic_resources_and_licenses'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Hintclass#
class Hint(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —hint pragma.
Provides application binding hints to optimize task placement.
Usage: —hint
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'hint'destattributeclass attributeinstance attribute#
dest = '--hint'flagsattributeclass attributeinstance attribute#
flags = ['--hint']helpattributeclass attributeinstance attribute#
help = 'Bind tasks according to application hints'metavarattributeclass attributeinstance attribute#
metavar = 'HINT'pragma_idattributeclass attributeinstance attribute#
pragma_id = 6pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'cpu_topology_and_binding'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Holdclass#
class Hold(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —hold pragma. Submits the job in a held state, preventing immediate execution. Usage: —hold
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'hold'destattributeclass attributeinstance attribute#
dest = '--hold'flagsattributeclass attributeinstance attribute#
flags = ['-H', '--hold']helpattributeclass attributeinstance attribute#
help = 'submit job in held state'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'execution_behavior_and_signals'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Immediateclass#
class Immediate(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —immediate pragma. Exits if resources are not available within the specified seconds. Usage: —immediate [SECS]
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'immediate'constattributeclass attributeinstance attribute#
const = '0'destattributeclass attributeinstance attribute#
dest = '--immediate'flagsattributeclass attributeinstance attribute#
flags = ['-I', '--immediate']helpattributeclass attributeinstance attribute#
help = 'exit if resources not available in "secs"'metavarattributeclass attributeinstance attribute#
metavar = 'SECS'nargsattributeclass attributeinstance attribute#
nargs = '?'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'execution_behavior_and_signals'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Job_nameclass#
class Job_name(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —job-name pragma.
Sets a custom name for the submitted job, which appears in job listings and output files.
Usage: —job-name
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'job_name'destattributeclass attributeinstance attribute#
dest = '--job-name'exampleattributeclass attributeinstance attribute#
example = 'my_job'flagsattributeclass attributeinstance attribute#
flags = ['-J', '--job-name']helpattributeclass attributeinstance attribute#
help = 'name of job'metavarattributeclass attributeinstance attribute#
metavar = 'NAME'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Kill_commandclass#
class Kill_command(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —kill-command pragma. Specifies the signal to send when terminating the job. Usage: —kill-command [SIGNAL]
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'kill_command'constattributeclass attributeinstance attribute#
const = 'TERM'destattributeclass attributeinstance attribute#
dest = '--kill-command'flagsattributeclass attributeinstance attribute#
flags = ['-K', '--kill-command']helpattributeclass attributeinstance attribute#
help = 'signal to send terminating job'metavarattributeclass attributeinstance attribute#
metavar = 'SIGNAL'nargsattributeclass attributeinstance attribute#
nargs = '?'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'execution_behavior_and_signals'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Licensesclass#
class Licenses(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —licenses pragma.
Specifies required licenses for the job, comma separated.
Usage: —licenses
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'licenses'destattributeclass attributeinstance attribute#
dest = '--licenses'flagsattributeclass attributeinstance attribute#
flags = ['-L', '--licenses']helpattributeclass attributeinstance attribute#
help = 'required license, comma separated'metavarattributeclass attributeinstance attribute#
metavar = 'NAMES'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'generic_resources_and_licenses'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Mail_typeclass#
class Mail_type(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —mail-type pragma.
Sets which job state changes trigger email notifications (e.g., BEGIN, END, FAIL).
Usage: —mail-type
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'mail_type'choicesattributeclass attributeinstance attribute#
choices = ['NONE', 'BEGIN', 'END', 'FAIL', 'REQUEUE', 'ALL']destattributeclass attributeinstance attribute#
dest = '--mail-type'exampleattributeclass attributeinstance attribute#
example = 'ALL'flagsattributeclass attributeinstance attribute#
flags = ['--mail-type']helpattributeclass attributeinstance attribute#
help = 'notify on state change'metavarattributeclass attributeinstance attribute#
metavar = 'TYPE'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'notifications'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Mail_userclass#
class Mail_user(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —mail-user pragma.
Specifies the email address to receive job state notifications.
Usage: —mail-user
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'mail_user'destattributeclass attributeinstance attribute#
dest = '--mail-user'exampleattributeclass attributeinstance attribute#
example = 'example@email.com'flagsattributeclass attributeinstance attribute#
flags = ['--mail-user']helpattributeclass attributeinstance attribute#
help = 'who to send email notification for job state changes'metavarattributeclass attributeinstance attribute#
metavar = 'USER'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'notifications'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Mcs_labelclass#
class Mcs_label(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —mcs-label pragma. Sets an MCS label if the mcs plugin is enabled, for group-based resource allocation. Usage: —mcs-label
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'mcs_label'destattributeclass attributeinstance attribute#
dest = '--mcs-label'flagsattributeclass attributeinstance attribute#
flags = ['--mcs-label']helpattributeclass attributeinstance attribute#
help = 'mcs label if mcs plugin mcs/group is used'metavarattributeclass attributeinstance attribute#
metavar = 'MCS'pragma_idattributeclass attributeinstance attribute#
pragma_id = 7pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Memclass#
class Mem(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —mem pragma.
Sets the minimum amount of real memory required for the job.
Usage: —mem
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'mem'destattributeclass attributeinstance attribute#
dest = '--mem'exampleattributeclass attributeinstance attribute#
example = '25GB'flagsattributeclass attributeinstance attribute#
flags = ['--mem']helpattributeclass attributeinstance attribute#
help = 'minimum amount of real memory'metavarattributeclass attributeinstance attribute#
metavar = 'MB'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'memory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Mem_bindclass#
class Mem_bind(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —mem-bind pragma.
Binds memory to locality domains for performance optimization.
Usage: —mem-bind
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'mem_bind'destattributeclass attributeinstance attribute#
dest = '--mem-bind'flagsattributeclass attributeinstance attribute#
flags = ['--mem-bind']helpattributeclass attributeinstance attribute#
help = 'Bind memory to locality domains'metavarattributeclass attributeinstance attribute#
metavar = 'BIND'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'memory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Mem_per_cpuclass#
class Mem_per_cpu(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —mem-per-cpu pragma.
Specifies the maximum amount of real memory per allocated CPU.
Usage: —mem-per-cpu
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'mem_per_cpu'destattributeclass attributeinstance attribute#
dest = '--mem-per-cpu'flagsattributeclass attributeinstance attribute#
flags = ['--mem-per-cpu']helpattributeclass attributeinstance attribute#
help = 'maximum amount of real memory per allocated cpu'metavarattributeclass attributeinstance attribute#
metavar = 'MB'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'memory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Mem_per_gpuclass#
class Mem_per_gpu(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —mem-per-gpu pragma.
Sets the real memory required per allocated GPU.
Usage: —mem-per-gpu
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'mem_per_gpu'destattributeclass attributeinstance attribute#
dest = '--mem-per-gpu'exampleattributeclass attributeinstance attribute#
example = '8GB'flagsattributeclass attributeinstance attribute#
flags = ['--mem-per-gpu']helpattributeclass attributeinstance attribute#
help = 'real memory required per allocated GPU'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Mincpusclass#
class Mincpus(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —mincpus pragma.
Specifies the minimum number of logical processors per node.
Usage: —mincpus
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'mincpus'destattributeclass attributeinstance attribute#
dest = '--mincpus'flagsattributeclass attributeinstance attribute#
flags = ['--mincpus']helpattributeclass attributeinstance attribute#
help = 'minimum number of logical processors per node'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'core_node_and_task_allocation'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Niceclass#
class Nice(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —nice pragma.
Decreases the job’s scheduling priority by the specified value.
Usage: —nice
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'nice'destattributeclass attributeinstance attribute#
dest = '--nice'exampleattributeclass attributeinstance attribute#
example = '1'flagsattributeclass attributeinstance attribute#
flags = ['--nice']helpattributeclass attributeinstance attribute#
help = 'decrease scheduling priority by value'metavarattributeclass attributeinstance attribute#
metavar = 'VALUE'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'time_and_priority'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]No_killclass#
class No_kill(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —no-kill pragma. Prevents job termination on node failure. Usage: —no-kill
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'no_kill'destattributeclass attributeinstance attribute#
dest = '--no-kill'flagsattributeclass attributeinstance attribute#
flags = ['-k', '--no-kill']helpattributeclass attributeinstance attribute#
help = 'do not kill job on node failure'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'execution_behavior_and_signals'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Nodefileclass#
class Nodefile(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —nodefile pragma.
Requests a specific list of hosts from a file for job execution.
Usage: —nodefile
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'nodefile'destattributeclass attributeinstance attribute#
dest = '--nodefile'flagsattributeclass attributeinstance attribute#
flags = ['-F', '--nodefile']helpattributeclass attributeinstance attribute#
help = 'request a specific list of hosts'metavarattributeclass attributeinstance attribute#
metavar = 'FILENAME'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'node_constraints_and_selection'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Nodelistclass#
class Nodelist(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —nodelist pragma.
Requests a specific list of hosts for job execution.
Usage: —nodelist
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'nodelist'destattributeclass attributeinstance attribute#
dest = '--nodelist'flagsattributeclass attributeinstance attribute#
flags = ['-w', '--nodelist']helpattributeclass attributeinstance attribute#
help = 'request a specific list of hosts'metavarattributeclass attributeinstance attribute#
metavar = 'HOST'nargsattributeclass attributeinstance attribute#
nargs = '+'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'node_constraints_and_selection'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Nodesclass#
class Nodes(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —nodes pragma.
Specifies the number of nodes to allocate for the job.
Usage: —nodes
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'nodes'destattributeclass attributeinstance attribute#
dest = '--nodes'exampleattributeclass attributeinstance attribute#
example = '2'flagsattributeclass attributeinstance attribute#
flags = ['-N', '--nodes']helpattributeclass attributeinstance attribute#
help = 'number of nodes on which to run'metavarattributeclass attributeinstance attribute#
metavar = 'NODES'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'core_node_and_task_allocation'typeattributeclass attributeinstance attribute#
type = intInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Ntasksclass#
class Ntasks(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —ntasks pragma.
Sets the total number of tasks (processes) to run for the job.
Usage: —ntasks
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'ntasks'destattributeclass attributeinstance attribute#
dest = '--ntasks'exampleattributeclass attributeinstance attribute#
example = '16'flagsattributeclass attributeinstance attribute#
flags = ['-n', '--ntasks']helpattributeclass attributeinstance attribute#
help = 'number of processors required'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'core_node_and_task_allocation'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Ntasks_per_coreclass#
class Ntasks_per_core(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —ntasks-per-core pragma.
Sets the number of tasks to invoke on each core.
Usage: —ntasks-per-core
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'ntasks_per_core'destattributeclass attributeinstance attribute#
dest = '--ntasks-per-core'exampleattributeclass attributeinstance attribute#
example = '16'flagsattributeclass attributeinstance attribute#
flags = ['--ntasks-per-core']helpattributeclass attributeinstance attribute#
help = 'number of tasks to invoke on each core'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'cpu_topology_and_binding'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Ntasks_per_nodeclass#
class Ntasks_per_node(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —ntasks-per-node pragma.
Specifies the number of tasks to invoke on each node.
Usage: —ntasks-per-node
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'ntasks_per_node'destattributeclass attributeinstance attribute#
dest = '--ntasks-per-node'exampleattributeclass attributeinstance attribute#
example = '16'flagsattributeclass attributeinstance attribute#
flags = ['--ntasks-per-node']helpattributeclass attributeinstance attribute#
help = 'number of tasks to invoke on each node'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'core_node_and_task_allocation'typeattributeclass attributeinstance attribute#
type = intInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Ntasks_per_socketclass#
class Ntasks_per_socket(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —ntasks-per-socket pragma.
Specifies the number of tasks to invoke on each socket.
Usage: —ntasks-per-socket
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'ntasks_per_socket'destattributeclass attributeinstance attribute#
dest = '--ntasks-per-socket'exampleattributeclass attributeinstance attribute#
example = '8'flagsattributeclass attributeinstance attribute#
flags = ['--ntasks-per-socket']helpattributeclass attributeinstance attribute#
help = 'number of tasks to invoke on each socket'metavarattributeclass attributeinstance attribute#
metavar = 'N'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'cpu_topology_and_binding'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Nvmpsclass#
class Nvmps(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —nvmps pragma. Launches NVIDIA MPS (Multi-Process Service) for the job. Usage: —nvmps
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'nvmps'destattributeclass attributeinstance attribute#
dest = '--nvmps'flagsattributeclass attributeinstance attribute#
flags = ['--nvmps']helpattributeclass attributeinstance attribute#
help = 'launching NVIDIA MPS for job'pragma_idattributeclass attributeinstance attribute#
pragma_id = 8pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'gpus'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Oom_kill_stepclass#
class Oom_kill_step(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —oom-kill-step pragma. Sets the OOMKillStep behavior for jobs that exceed memory limits. Usage: —oom-kill-step <0|1>
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'oom_kill_step'constattributeclass attributeinstance attribute#
const = '1'destattributeclass attributeinstance attribute#
dest = '--oom-kill-step'flagsattributeclass attributeinstance attribute#
flags = ['--oom-kill-step']helpattributeclass attributeinstance attribute#
help = 'set the OOMKillStep behaviour'metavarattributeclass attributeinstance attribute#
metavar = '0|1'nargsattributeclass attributeinstance attribute#
nargs = '?'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'memory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Outputclass#
class Output(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —output pragma.
Redirects job output to a specified file, supporting job and jobname variables.
Usage: —output
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'output'destattributeclass attributeinstance attribute#
dest = '--output'exampleattributeclass attributeinstance attribute#
example = '--output ./%x.%j.out'flagsattributeclass attributeinstance attribute#
flags = ['--output', '-o']helpattributeclass attributeinstance attribute#
help = 'File to redirect output (%%x=jobname, %%j=jobid)'metavarattributeclass attributeinstance attribute#
metavar = 'OUTPUT'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'io_and_directory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Overcommitclass#
class Overcommit(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —overcommit pragma. Allows resources to be overcommitted for the job. Usage: —overcommit
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'overcommit'destattributeclass attributeinstance attribute#
dest = '--overcommit'flagsattributeclass attributeinstance attribute#
flags = ['-O', '--overcommit']helpattributeclass attributeinstance attribute#
help = 'overcommit resources'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'exclusivity_and_sharing'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Oversubscribeclass#
class Oversubscribe(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —oversubscribe pragma. Allows resources to be oversubscribed with other jobs. Usage: —oversubscribe
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'oversubscribe'destattributeclass attributeinstance attribute#
dest = '--oversubscribe'flagsattributeclass attributeinstance attribute#
flags = ['-s', '--oversubscribe']helpattributeclass attributeinstance attribute#
help = 'oversubscribe resources with other jobs'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'exclusivity_and_sharing'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Partitionclass#
class Partition(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —partition pragma.
Requests a specific partition (queue) for job scheduling.
Usage: —partition
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'partition'destattributeclass attributeinstance attribute#
dest = '--partition'flagsattributeclass attributeinstance attribute#
flags = ['-p', '--partition']helpattributeclass attributeinstance attribute#
help = 'partition requested'metavarattributeclass attributeinstance attribute#
metavar = 'PARTITION'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Powerclass#
class Power(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —power pragma.
Sets power management options for the job.
Usage: —power
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'power'destattributeclass attributeinstance attribute#
dest = '--power'flagsattributeclass attributeinstance attribute#
flags = ['--power']helpattributeclass attributeinstance attribute#
help = 'power management options'metavarattributeclass attributeinstance attribute#
metavar = 'FLAGS'pragma_idattributeclass attributeinstance attribute#
pragma_id = 6pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'advanced_hardware_misc'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Pragmaclass#
class Pragma(value: str)Base class representing a SLURM #SBATCH pragma.
actionattributeclass attributeinstance attribute#
action: str | None = Nonearg_varnameattributeinstance attribute#
arg_varname: strchoicesattributeclass attributeinstance attribute#
choices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
const: int | None = Nonedefaultattributeclass attributeinstance attribute#
default: str | None = Nonedestattributeclass attributeinstance attribute#
dest: str = ''exampleattributeclass attributeinstance attribute#
example: str | None = Noneflagsattributeclass attributeinstance attribute#
flags: List[str] = []helpattributeclass attributeinstance attribute#
help: str = ''metavarattributeclass attributeinstance attribute#
metavar: str | None = Nonenargsattributeclass attributeinstance attribute#
nargs: str | None = Nonepragma_idattributeinstance attribute#
pragma_id: intpragma_typeattributeinstance attribute#
pragma_type: PragmaTypestypeattributeclass attributeinstance attribute#
type: Callable[[str], Any] = strvalueattributeinstance attribute#
value = to_bool(value) if self.is_flag else valuePragmaFactoryclass#
class PragmaFactoryFactory class for creating and managing SLURM pragma classes. Provides methods to validate pragma keys, create pragma instances, and retrieve pragma classes.
Parameters
Returns
pragmasattributeclass attributeinstance attribute#
pragmas = {pragma_cls.arg_varname: pragma_cls for pragma_cls in pragmas_ordered}create_pragmamethodstaticmethod#
def create_pragma(key: str, value: str) -> PragmaCreate a Pragma instance for the given key and value.
Parameters
key : str The pragma key. key : str: value : str: key: str :
value: str :
Returns
Raises
ValueError If the key is not valid.
flag_to_clsmethodstaticmethod#
def flag_to_cls(flag: str) -> Type[Pragma] | NoneLook up the Pragma class carrying a given flag.
Parameters
| Name | Type | Description |
|---|---|---|
flag | str | The flag to look up (e.g. "--job-name" or "-J"). |
flag_to_pragmamethodstaticmethod#
def flag_to_pragma(flag: str, value: str) -> Pragma | NoneCreate a Pragma instance based on a flag and value.
Parameters
flag : str The flag associated with the pragma (e.g., ‘—job-name’). flag : str: value : str: flag: str :
value: str :
Returns
Raises
ValueError If the flag is not recognized.
get_pragma_clsmethodstaticmethod#
def get_pragma_cls(key: str) -> Type[Pragma]Retrieve the Pragma class for a given key.
Parameters
key : str: key: str :
Returns
Raises
ValueError If the key is not valid.
is_valid_pragma_keymethodstaticmethod#
def is_valid_pragma_key(key: str) -> boolCheck if a given key is a valid pragma key.
Parameters
key : str: key: str :
Returns
bool True if the key is valid, False otherwise.
Priorityclass#
class Priority(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —priority pragma.
Sets the priority value for the job, influencing scheduling order.
Usage: —priority
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'priority'destattributeclass attributeinstance attribute#
dest = '--priority'flagsattributeclass attributeinstance attribute#
flags = ['--priority']helpattributeclass attributeinstance attribute#
help = 'set the priority of the job'metavarattributeclass attributeinstance attribute#
metavar = 'VALUE'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'time_and_priority'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Profileclass#
class Profile(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —profile pragma.
Enables acct_gather_profile for detailed job data collection.
Usage: —profile
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'profile'destattributeclass attributeinstance attribute#
dest = '--profile'flagsattributeclass attributeinstance attribute#
flags = ['--profile']helpattributeclass attributeinstance attribute#
help = 'enable acct_gather_profile for detailed data'metavarattributeclass attributeinstance attribute#
metavar = 'VALUE'pragma_idattributeclass attributeinstance attribute#
pragma_id = 7pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'advanced_hardware_misc'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Qosclass#
class Qos(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —qos pragma.
Sets the quality of service for the job, affecting priority and limits.
Usage: —qos
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'qos'destattributeclass attributeinstance attribute#
dest = '--qos'flagsattributeclass attributeinstance attribute#
flags = ['-q', '--qos']helpattributeclass attributeinstance attribute#
help = 'quality of service'metavarattributeclass attributeinstance attribute#
metavar = 'QOS'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Quietclass#
class Quiet(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —quiet pragma. Suppresses informational messages during job submission. Usage: —quiet
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'quiet'destattributeclass attributeinstance attribute#
dest = '--quiet'flagsattributeclass attributeinstance attribute#
flags = ['-Q', '--quiet']helpattributeclass attributeinstance attribute#
help = 'quiet mode (suppress informational messages)'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'io_and_directory'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Rebootclass#
class Reboot(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —reboot pragma. Reboots compute nodes before starting the job. Usage: —reboot
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'reboot'destattributeclass attributeinstance attribute#
dest = '--reboot'flagsattributeclass attributeinstance attribute#
flags = ['--reboot']helpattributeclass attributeinstance attribute#
help = 'reboot compute nodes before starting job'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'execution_behavior_and_signals'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Reservationclass#
class Reservation(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —reservation pragma. Allocates resources from a named reservation, useful for reserved compute time or special projects. Usage: —reservation <RESERVATION_NAME>
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'reservation'destattributeclass attributeinstance attribute#
dest = '--reservation'flagsattributeclass attributeinstance attribute#
flags = ['--reservation']helpattributeclass attributeinstance attribute#
help = 'allocate resources from named reservation'metavarattributeclass attributeinstance attribute#
metavar = 'NAME'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Resv_portsclass#
class Resv_ports(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —resv-ports pragma. Reserves communication ports for the job. Usage: —resv-ports
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'resv_ports'destattributeclass attributeinstance attribute#
dest = '--resv-ports'flagsattributeclass attributeinstance attribute#
flags = ['--resv-ports']helpattributeclass attributeinstance attribute#
help = 'reserve communication ports'pragma_idattributeclass attributeinstance attribute#
pragma_id = 4pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'advanced_hardware_misc'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Signalclass#
class Signal(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —signal pragma. Sends a signal when the time limit is within the specified seconds. Usage: —signal [R:]NUM[@TIME]
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'signal'destattributeclass attributeinstance attribute#
dest = '--signal'flagsattributeclass attributeinstance attribute#
flags = ['--signal']helpattributeclass attributeinstance attribute#
help = 'send signal when time limit within time seconds'metavarattributeclass attributeinstance attribute#
metavar = '[R:]NUM[@TIME]'pragma_idattributeclass attributeinstance attribute#
pragma_id = 6pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'execution_behavior_and_signals'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Sockets_per_nodeclass#
class Sockets_per_node(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —sockets-per-node pragma.
Specifies the number of sockets per node to allocate.
Usage: —sockets-per-node
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'sockets_per_node'destattributeclass attributeinstance attribute#
dest = '--sockets-per-node'flagsattributeclass attributeinstance attribute#
flags = ['--sockets-per-node']helpattributeclass attributeinstance attribute#
help = 'number of sockets per node to allocate'metavarattributeclass attributeinstance attribute#
metavar = 'S'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'cpu_topology_and_binding'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Spread_jobclass#
class Spread_job(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —spread-job pragma. Spreads the job across as many nodes as possible. Usage: —spread-job
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'spread_job'destattributeclass attributeinstance attribute#
dest = '--spread-job'flagsattributeclass attributeinstance attribute#
flags = ['--spread-job']helpattributeclass attributeinstance attribute#
help = 'spread job across as many nodes as possible'pragma_idattributeclass attributeinstance attribute#
pragma_id = 6pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'core_node_and_task_allocation'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Switchesclass#
class Switches(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —switches pragma. Sets optimum switches and maximum wait time for optimum. Usage: —switches <MAX_SWITCHES[@MAX_TIME]>
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'switches'destattributeclass attributeinstance attribute#
dest = '--switches'flagsattributeclass attributeinstance attribute#
flags = ['--switches']helpattributeclass attributeinstance attribute#
help = 'optimum switches and max time to wait for optimum'metavarattributeclass attributeinstance attribute#
metavar = 'MAX_SWITCHES[@MAX_TIME]'pragma_idattributeclass attributeinstance attribute#
pragma_id = 5pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'advanced_hardware_misc'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Thread_specclass#
class Thread_spec(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —thread-spec pragma.
Sets the count of reserved threads for the job.
Usage: —thread-spec
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'thread_spec'destattributeclass attributeinstance attribute#
dest = '--thread-spec'flagsattributeclass attributeinstance attribute#
flags = ['--thread-spec']helpattributeclass attributeinstance attribute#
help = 'count of reserved threads'metavarattributeclass attributeinstance attribute#
metavar = 'THREADS'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'advanced_hardware_misc'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Threads_per_coreclass#
class Threads_per_core(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —threads-per-core pragma.
Specifies the number of threads per core to allocate.
Usage: —threads-per-core
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'threads_per_core'destattributeclass attributeinstance attribute#
dest = '--threads-per-core'exampleattributeclass attributeinstance attribute#
example = '4'flagsattributeclass attributeinstance attribute#
flags = ['--threads-per-core']helpattributeclass attributeinstance attribute#
help = 'number of threads per core to allocate'metavarattributeclass attributeinstance attribute#
metavar = 'T'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'cpu_topology_and_binding'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Timeclass#
class Time(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —time pragma.
Sets the maximum walltime for the job in minutes or HH:MM:SS format.
Usage: —time
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'time'destattributeclass attributeinstance attribute#
dest = '--time'exampleattributeclass attributeinstance attribute#
example = '00:45:00'flagsattributeclass attributeinstance attribute#
flags = ['-t', '--time']helpattributeclass attributeinstance attribute#
help = 'time limit'metavarattributeclass attributeinstance attribute#
metavar = 'MINUTES'pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'time_and_priority'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Time_minclass#
class Time_min(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —time-min pragma.
Specifies the minimum walltime for the job, if distinct from the maximum.
Usage: —time-min
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'time_min'destattributeclass attributeinstance attribute#
dest = '--time-min'flagsattributeclass attributeinstance attribute#
flags = ['--time-min']helpattributeclass attributeinstance attribute#
help = 'minimum time limit (if distinct)'metavarattributeclass attributeinstance attribute#
metavar = 'MINUTES'pragma_idattributeclass attributeinstance attribute#
pragma_id = 1pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'time_and_priority'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Tmpclass#
class Tmp(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —tmp pragma.
Sets the minimum amount of temporary disk required for the job.
Usage: —tmp
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'tmp'destattributeclass attributeinstance attribute#
dest = '--tmp'flagsattributeclass attributeinstance attribute#
flags = ['--tmp']helpattributeclass attributeinstance attribute#
help = 'minimum amount of temporary disk'metavarattributeclass attributeinstance attribute#
metavar = 'MB'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'advanced_hardware_misc'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Tres_bindclass#
class Tres_bind(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —tres-bind pragma.
Specifies task-to-TRES binding options for resource allocation.
Usage: —tres-bind
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'tres_bind'destattributeclass attributeinstance attribute#
dest = '--tres-bind'flagsattributeclass attributeinstance attribute#
flags = ['--tres-bind']helpattributeclass attributeinstance attribute#
help = 'task to tres binding options'metavarattributeclass attributeinstance attribute#
metavar = '...'pragma_idattributeclass attributeinstance attribute#
pragma_id = 2pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'generic_resources_and_licenses'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Tres_per_taskclass#
class Tres_per_task(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —tres-per-task pragma.
Sets the list of TRES (Trackable Resources) required per task.
Usage: —tres-per-task
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'tres_per_task'destattributeclass attributeinstance attribute#
dest = '--tres-per-task'flagsattributeclass attributeinstance attribute#
flags = ['--tres-per-task']helpattributeclass attributeinstance attribute#
help = 'list of tres required per task'metavarattributeclass attributeinstance attribute#
metavar = 'LIST'pragma_idattributeclass attributeinstance attribute#
pragma_id = 3pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'generic_resources_and_licenses'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]UnknownPragmaclass#
class UnknownPragma(flag: str, value: Any = True)Bases: Pragma
An #SBATCH option this library has no class for.
Scripts written by hand (or by a newer SLURM release) may contain options
that are not modelled here. Rather than dropping or rejecting them,
:meth:SlurmScript.from_script keeps them in this pragma so that reading a
script and writing it back out preserves them verbatim.
arg_varnameattributeinstance attribute#
arg_varname = flagdestattributeinstance attribute#
dest = flagflagattributeinstance attribute#
flag = flagflagsattributeinstance attribute#
flags = [flag]pragma_idattributeclass attributeinstance attribute#
pragma_id = 0pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'other_options'valueattributeinstance attribute#
value = valueInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonehelpattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcehelp: str = ''metavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonetypeattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcetype: Callable[[str], Any] = stris_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Use_min_nodesclass#
class Use_min_nodes(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —use-min-nodes pragma. If a range of node counts is given, prefers the smaller count for allocation. Usage: —use-min-nodes
Parameters
Returns
actionattributeclass attributeinstance attribute#
action = 'store_true'arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'use_min_nodes'destattributeclass attributeinstance attribute#
dest = '--use-min-nodes'flagsattributeclass attributeinstance attribute#
flags = ['--use-min-nodes']helpattributeclass attributeinstance attribute#
help = 'if a range of node counts is given, prefer the smaller count'pragma_idattributeclass attributeinstance attribute#
pragma_id = 7pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'core_node_and_task_allocation'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
choicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonemetavarattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcemetavar: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]Wckeyclass#
class Wckey(Pragma)Bases: Pragma
Represents the SLURM #SBATCH —wckey pragma.
Runs the job under a specified workload key (wckey) for accounting or tracking purposes.
Usage: —wckey
Parameters
Returns
arg_varnameattributeclass attributeinstance attribute#
arg_varname = 'wckey'destattributeclass attributeinstance attribute#
dest = '--wckey'flagsattributeclass attributeinstance attribute#
flags = ['--wckey']helpattributeclass attributeinstance attribute#
help = 'wckey to run job under'metavarattributeclass attributeinstance attribute#
metavar = 'WCKEY'pragma_idattributeclass attributeinstance attribute#
pragma_id = 6pragma_typeattributeclass attributeinstance attribute#
pragma_type = 'job_config'typeattributeclass attributeinstance attribute#
type = strInherited from slurm_script_generator.pragmas.Pragma
actionattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceaction: str | None = Nonechoicesattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcechoices: List[str] | None = Noneconstattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceconst: int | None = Nonedefaultattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcedefault: str | None = Noneexampleattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourceexample: str | None = Nonenargsattributeclass attributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcenargs: str | None = Nonevalueattributeinstance attribute#
slurm_script_generator.pragmas.PragmaView sourcevalue = to_bool(value) if self.is_flag else valueis_flagproperty#
slurm_script_generator.pragmas.PragmaView sourceis_flag: boolWhether this pragma is a valueless switch such as --hold.
to_dictmethod#
slurm_script_generator.pragmas.PragmaView sourcedef to_dict() -> dict[str, Any]to_boolfunction#
def to_bool(value: Any) -> boolInterpret value as the boolean of a valueless pragma such as --hold.
None means the flag was present without a value and is therefore True.
Parameters
| Name | Type | Description |
|---|---|---|
value | Any | The value to interpret. |
Returns
bool- The boolean the value stands for.
Raises
ValueError- If a string value is not recognized as a boolean.