A simple VSCode extension to offer some assistance with SLURM jobs.
Enable the extensions functionality by running the command (using
When right-clicking on a
.sh file, the extension allows you to run the script with
sbatch. After a script has been executed this way,
SlurmAssist will start tracking the job using information from the
sacct command. A status bar item will show the number of jobs running.
The context menu of
.sh files also shows the option to open the output and error logs of that jobscript (if that script has spawned jobs that have been tracked). You can also cancel a running job from the same menu.
By default, the extension will update its information from the
sacct output every 10 minutes, on activation and whenever a job is started, but you can force an immediate update by clicking on the status bar item. You can change the 10 minute interval in the extensions' settings.
This extension contributes the following settings:
slurmassist.updateInterval: The interval between
This extension exposes the following commands:
slurmassist.enable: does nothing, except activating the extension
slurmassist.update: forces an update from
slurmassist.toggle_auto_updating: Toggles the auto-updating feature. Note that auto-updates will only happen if there are running jobs.
slurmassist.debug: opens a new editor window with a list of currently tracked jobs
slurmassist.reset: clears the list of tracked jobs. Note that you also won't be able to open logs from cleared jobs anymore (of course, you can still open them via a file explorer)
Since I've only got access to the HPC cluster of RWTH Aachen, I have not been able to test this extension on other SLURM installations. Moreover, I am not an expert in SLURM, so probably several SLURM features are not supported. Let me know if you find any.