VScode workflow
Many users prefer to use VS Code. However, if you connect VS Code directly to the login node, your session may be terminated if your process consumes high CPU or memory. Always use a compute node for heavier workloads.
The following is the VScode workflow to remotely connect to a compute node from your laptop:
Open a terminal on your laptop (not VS Code), and run:
ssh user_id@XXXX-login.ornl.gov
Submit a job and launch an interactive session on a compute node:
srun -A XXXX -p XXXX -N 1 -n 1 -c 1 --mem=8G -t 1:00:00 --pty /bin/bash
Run the following command to find the compute node hostname:
hostname
Example output:
mod-condo-c74
Remember this hostname and add the following to your SSH config file on your local laptop: macOS/Linux: ~/.ssh/config Windows: C:\Users\YourName.ssh\config
Host cades-login
HostName XXXX-login.ornl.gov
User your_uid
Host cades-compute
HostName mod-condo-XXX.ornl.gov
User your_uid
ProxyJump cades-login
Replace mod-condo-XXX with your actual compute node (e.g., mod-condo-c74).
Open VS Code on your laptop and connect to:
cades-compute