O2Portal - Visual Studio Code App

This app will start Visual Studio Code (VSCode) on one of the O2 cluster compute nodes.

VSCode is a source-code editor made by Microsoft and includes support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.

After clicking on the HMS RC VSCode application you should see the page:

where you can select several parameters for your VS Code job:

Slurm Account:

This is the Slurm Account associated with your Slurm User. You can find your Slurm account by running the command sshare -U -u $USER from a shell within the O2 cluster.

Partition:

This is the partition you want to use to submit the job. 

Wall Time requested in hours:

This is the desired time, in hours, you want to allocate for the OOD job. The maximum value admissible depends on the partition you select. 

Number of cores:

This is the number of CPU cores you want to allocate for this job.

Number of GPU cards:

This is the number of GPU cards you want to allocate for this job. If you want to allocate one or more GPU card make sure to select a partition which supports GPU jobs. Leave this field blank if you do not need a GPU card

GPU card type:

Here you can select a particular type of GPU card. If you request a specific type of GPU card make sure to select a partition which includes the GPU type you are requesting.

Total Memory in GB:

This is the amount of memory (RAM) in GB you want to allocate for your job. 

Slurm Custom Arguments

This is an optional text field that can be used to pass additional flags to the Slurm scheduler when submitting the job.

 

After setting the above fields click on the Launch button which will submit the job.

While your job is pending on the queue you should  see a page like:

The Session ID highlighted link can be used to see the log files created for the current jobs on a new OOD browser tab.

When the job is dispatched and ready to run you should see a screen like:

You can control the compression and quality of the graphics with the two control bars.

You can see error and log information by clicking the output.log link.

To open the Visual Studio Code GUI click on the Launch VSCode button.

A new tab should open with the VSCode GUI like:

When done you need to close the VSCode browser tab and click the Delete button from the OpenOnDemand Interactive session. 

Note: Closing OpenOnDemand browser will not terminate active applications. Your Visual Studio Code OOD job will keep running until it reaches the requested Wall Time limit or the "Delete" button is used.

How to debug problems

If something does not work properly please make sure to record the actual O2 jobid  printed at the top of the interactive app window

 

( 65050238 in the example) and click on the Session ID highlighted link which should open the OOD file editor on the folder where the job’s logs files are written.

To debug your problem you can start by checking the output log in the file output.log which can be opened by clicking the output.log link next to Progress & Error log

If you need additional help you can reach out to rchelp@hms.harvard.edu, make sure to include the full path listed on the OOD file page along with any content printed in the output.log file.

What to do if you accidentally minimize the VSCode windows

If you accidentally minimize the Visual Studio Code GUI you can bring it back using the VNC Alt option and the tab  key on your keyboard. 

For example, if within an active VSCode OOD session you click the minimize button:

 

 

you might end up with an empty gray screen. However your session is still active and can be brought back by first clicking on the VNC menu bar

then selecting the "A" option and the "Alt" button. 

 

Finally using the "Tab" on your local keyboard you can bring back all active windows in the sessions:

and by clicking with the mouse the desired GUI can be brought back to the screen.

After resuming your VSCode GUI, remember to unselect the Alt button before resuming your work, leaving the VNC Alt button selected will be equivalent to adding Alt to anything you type.