Visual Studio Code – connect to IDUN HPC cluster

Use compute nodes to connect from Visual Studio Code.

NOTE: Please avoid connecting directly to login nodes:
– idun-login1.hpc.ntnu.no
– idun-login2.hpc.ntnu.no
Running processing, compilation, …. will create issues for other IDUN users on login nodes.

Allocate compute node for connection

Use command "salloc" to start job on a compute node. Example below will run:

  • on 1 compute node
  • will use 2 CPU cores and 4 GB memory
  • job will jun for 10 hours.
[USERNAME@idun-login2 ~]$ salloc --account=support --nodes=1 --cpus-per-task=2 --mem=4G --partition=CPUQ --time=00:30:00
...
salloc: Nodes idun-02-25 are ready for job

Node idun-02-25 was allocated. This command can be users to connect compute node. You'll need to enter your password twice:

ssh -A -J idun-login2.hpc.ntnu.no idun-02-25

Install "Remote - SSH" extension

Open Extensions > Search for "Remote SSH" > Install

Connect

Click the connect icon in the left bottom corner. Click "Connect to Host... Remote-SSH"

Add host:

Paste "ssh" command. Press Enter:

Select a configuration file to save new connection. Press Enter:

Connect

New windows will be opened. Enter your password two times. Press Enter.

Scroll to Top