a3fe.run._virtual_queue
Utilities for the Ensemble, Window, and Simulation Classes
Classes
|
Class to hold information about a job |
|
A virtual slurm queue which has no limit on the number of queued jobs, which submits slurm jobs to the real queue when there are few enough jobs queued. |
- class a3fe.run._virtual_queue.Job(virtual_job_id: int, command_list: List[str], slurm_job_id: int | None = None, status: JobStatus = JobStatus.NONE, slurm_file_base: str | None = None)[source]
Class to hold information about a job
- Attributes:
- slurm_file_base
- slurm_job_id
- slurm_outfile
Methods
Check whether the job has failed
- class a3fe.run._virtual_queue.VirtualQueue(queue_len_lim: int = 2000, log_dir: str = './output', stream_log_level: int = 10)[source]
A virtual slurm queue which has no limit on the number of queued jobs, which submits slurm jobs to the real queue when there are few enough jobs queued. This gets round slurm queue limits.
- Attributes:
queueThe queue of jobs, both real and virtual.
stream_log_levelThe log level for the stream handler.
Methods
kill(job)Kill and remove a job from the real and virtual queues.
submit(command_list, slurm_file_base)Submit a job to the virtual queue.
update()Remove jobs from the queue if they have finished, then move jobs from the pre-queue to the real queue if there is space.
wait()Wait for all jobs to finish.
- property stream_log_level: int
The log level for the stream handler.
- submit(command_list: List[str], slurm_file_base: str) Job[source]
Submit a job to the virtual queue.
- Parameters:
command_list (_List[str]) – The command to be run.
slurm_file_base (str) – The base name of the slurm file to be written. This allows the slurm file to be checked for errors.
- Returns:
job – The Job submitted to the virtual queue.
- Return type: