cc_staff
782
edits
(How to get SLURM_TMPDIR) |
(Clarified external terminal vs VS Code terminal) |
||
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. | ||
# | # In an external <b>[[SSH|SSH client]]</b> connected to the cluster, 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 allocated compute node name. | ||
## | ## If you will need to work with <code>SLURM_*</code> environment variables in VS Code, save them all in a ''source'' file: {{Command|env {{!}} grep SLURM_ {{!}} sed -e 's/^\(.*\){{=}}\(.*\)$/export \1{{=}}"\2"/g' > slurm_var.sh}} | ||
# 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>></code> in the Command Palette. | ## Press <code>F1</code> or <code>Ctrl+Shift+P</code> to start the command prompt <code>></code> in the Command Palette. | ||
Line 109: | 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 | # If you need to work with <code>SLURM_*</code> environment variables, navigate to the working directory in a VS Code terminal and ''source'' the <code>slurm_var.sh</code> file: {{Command|source slurm_var.sh}} | ||
{{Command| | |||
=Troubleshooting= <!--T:21--> | =Troubleshooting= <!--T:21--> |