diff --git a/triton/apps/vscode.rst b/triton/apps/vscode.rst index e4158a623..5a42779fb 100644 --- a/triton/apps/vscode.rst +++ b/triton/apps/vscode.rst @@ -1,7 +1,7 @@ VSCode on Triton ================ -VSCode is a text editor and integrated development environment. It is +VSCode is a text editor and IDE (Integrated Development Environment). It is very popular these days, partly due to it's good usability. Installation @@ -47,8 +47,9 @@ select whatever resources you want (memory, CPU, etc) and run directly in the Slurm queue. This means you can directly perform calculations in that VSCode session and it runs properly (not on the login node). -This is useful for getting things done quickly, but running in a web -browser can be limited in some cases (interface, lifetime, etc.). +This is useful for getting things done quickly or do simple debugging, +but running in a web browser can be limited in some cases (interface, lifetime, etc.). +Another limitation is OOD VSCode does not support GPU computing. @@ -57,17 +58,17 @@ VSCode remote SSH **"Remote SSH"** is a nice way to work on a remote computer and provides both editing and shell access, but everything will run -directly on the login node on Triton. This is OK for editing, but not -for main computations (see the section above or below). **To repeat: -don't use this for running big computations.** +directly on the login node on Triton. This is OK for wiring code +and editing, but not for main computations (see the section above or below). +**To repeat: don't use this for running any big computations.** .. figure:: vscode--connected.png :alt: Screenshot saying "SSH: triton". If you see this in the lower left corner (or whatever the name of your cluster SSH config is), you are connected to the login node - (and should not do big calculations). It's possible the exact look - may be different for others. + (and again, should not do big calculations). It's possible the + exact look may be different for others. You can see `connection instructions (including screenshots) at the Sigma2 instructions @@ -96,7 +97,7 @@ This section contains original research and may not fully work, and **may only work on Linux/Mac right now (but Windows might work too since it uses OpenSSH)**. -In you ``~/.ssh/config``, add this block to define a server +In your ``~/.ssh/config``, add this block to define a server ``triton-vscode``. For more information ``.ssh/config``, including what these mean and what else you might need in here, see :doc:`/scicomp/ssh`:: @@ -136,8 +137,29 @@ Possible issues which may affect usage: variables set by Slurm. Make sure that they don't interfere with jobs you may run from this vscode session). -* If you request a GPU node or other high resources, this is reserved - the whole time even if you aren't using them. Consider this before - reserving large resources (unless you close the jobs soon), or you - might get an email from us asking if we can help you improve - research usage. +Sometimes you want to debug your code using GPU(s). To connect to a +GPU node, you can follow the above guide, and request a ``gpudev`` partition. +Note that ``gpudev`` partition has a strict time limitation: Every session +is maximum 30 minutes long. For more information, see :ref:`partitions +`. + + Host triton-gpu-debug + ProxyCommand ssh triton /share/apps/ssh-node-proxycommand --partition=gpudev --time=0:30:00 + StrictHostKeyChecking no + UserKnownHostsFile /dev/null + User USERNAME + + # You also need a triton alias here: + + Host triton + HostName triton.aalto.fi + # ... any other thing you need for connecting to triton. + User USERNAME + + + +VSCode debugging +-------------------------------------------------- + +Following this guide, you can attach a debugger to a running job. +