Visual Studio Code: Difference between revisions

How to get SLURM_TMPDIR
(Beluga now at Rocky 8)
(How to get SLURM_TMPDIR)
Line 100: Line 100:
Connection procedure:
Connection procedure:
# Make sure VS Code Server is installed as described in the previous section.
# Make sure VS Code Server is installed as described in the previous section.
# Start a new <b>[[Running_jobs#Interactive_jobs|interactive job]]</b> (with <code>salloc</code>) and take note of the allocated compute node name.
# Start a new <b>[[Running_jobs#Interactive_jobs|interactive job]]</b> (with <code>salloc</code>).
## <b>Important:</b> make sure to request enough memory (at least <code>2000M</code>).
## <b>Important:</b> make sure to request enough memory (at least <code>2000M</code>).
## Take note of the allocated compute node name.
## Take note of the job identifier (usually a number in the millions).
# In VS Code, start a new remote session with the name of the allocated compute node:
# In VS Code, start a new remote session with the name of the allocated compute node:
## Press <code>F1</code> or <code>Ctrl+Shift+P</code> to start the command prompt <code>&gt;</code> in the Command Palette.
## Press <code>F1</code> or <code>Ctrl+Shift+P</code> to start the command prompt <code>&gt;</code> in the Command Palette.
Line 107: Line 109:
## Enter the noted compute node name.
## Enter the noted compute node name.
### If you get prompted for the type of operating system, select <b>Linux</b>
### If you get prompted for the type of operating system, select <b>Linux</b>
# If you need to work with <code>SLURM_*</code> environment variables in the VS Code terminal, you need to recreate them manually from values in the interactive session started with <code>salloc</code>:
## For the <code>SLURM_TMPDIR</code> variable, use the noted job identifier. For example, with 12345678, in the VS Code terminal:
{{Command|export SLURM_TMPDIR{{=}}/localscratch/$USER.12345678.0}}


=Troubleshooting= <!--T:21-->
=Troubleshooting= <!--T:21-->
cc_staff
782

edits