The PJSub Plugin provides an efficient way to submit, monitor, and manage supercomputing tasks directly from VS Code. This plugin is designed for teams and individuals using supercomputing resources, enabling task submission and status checks without leaving the editor.
- Obtain the
.vsixfile for the PJSub plugin. - Open VS Code and go to the Extensions panel.
- Click the ellipsis
⋮in the top right corner and select Install from VSIX.... - Select the
.vsixfile to complete the installation.
The plugin will activate automatically when a workspace is opened in VS Code. Once activated, you can use the commands provided by the plugin through the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
The plugin includes several configuration options that can be adjusted in VS Code Settings (Ctrl+, or Cmd+,) or directly in the settings.json file.
- pjsub.resourceGroup: Resource group (default:
"short-a") - pjsub.nodeCount: Number of nodes (default:
1) - pjsub.elapsedTime: Maximum elapsed time (default:
"2:00:00") - pjsub.projectGroup: Project group (default:
"gg53") - pjsub.joinOutput: Merge output files (default:
true)
{
"pjsub.resourceGroup": "short-a",
"pjsub.nodeCount": 2,
"pjsub.elapsedTime": "1:30:00",
"pjsub.projectGroup": "gg53",
"pjsub.joinOutput": true
}Command: [PJ] Submit Task
Description: Submits the currently opened .sh file as a supercomputing task. After submission, the plugin will automatically run pjstat after 3 seconds to check the task's status.
How to Use:
- Open a
.shfile in VS Code that contains valid task submission commands. - Run the
[PJ] Submit Taskcommand. - Upon successful submission,
pjstatoutput will display the task's real-time status in the terminal.
Command: [PJ>Gen & Submit!]
Description: Generates an .sh script based on the current Python file and configuration settings, then submits it as a task.
How to Use:
- Open a
.pyfile you wish to run on the supercomputer. - Run the
[PJ>Gen & Submit!]command. - The plugin will generate the
.shscript and automatically submit it as a task.
Command: [PJ>Gen!]
Description: Generates an .sh script based on the current Python file and configuration settings without submitting it as a task.
How to Use:
- Open a
.pyfile. - Run the
[PJ>Gen!]command. - The plugin will generate the
.shscript in thepjsub_scriptsfolder within your project directory.
Command: [PJ] Check Usage
Description: Checks the current machine's resource usage.
How to Use:
- Run the
[PJ] Check Usagecommand. - The plugin will display the machine's node and GPU usage in the terminal.
Command: [PJ] Start Resource Monitoring
Description: Starts monitoring the resource usage.
How to Use:
- Run the
[PJ] Start Resource Monitoringcommand. - The plugin will start monitoring the resource usage and display it in the status bar.
Command: [PJ] Stop Resource Monitoring
Description: Stops monitoring the resource usage.
How to Use:
- Run the
[PJ] Stop Resource Monitoringcommand. - The plugin will stop monitoring the resource usage.
- Plugin does not activate: Ensure you’ve opened a workspace and the
.vsixfile is correctly installed. - Task submission errors: Confirm that the
.shfile has the correct syntax and valid PJ Sub settings. - Status check not updating: Ensure you have access to the
pjstatcommand and it’s correctly configured in your environment.
For further assistance, please contact your team administrator or refer to the plugin’s support documentation.
Enjoy seamless task management with the PJSub Plugin for VS Code!