Coding Resources
Here we provide a brief summary of useful coding resources across multiple languages.
Visual Studio Code
Visual Studio Code is a powerful code editing suite that is maintained by Microsoft, but is available on Windows, Mac, and Linux.
Here we will provide the basic setup for VS Code and then provide a list of modules that are useful for scientific computing.
To install Visual Studio Code, go to https://code.visualstudio.com and follow the getting started page.
Once you have the basic program installed we reccomend installing the following extensions.
Visual Studio Code Extensions
Many of the coding languages and features of those languages are not by default provided in VS Code. Instead you need to add extensions that fit your needs. Many of these extensions will imediately be reccomended to you upon opening a file that may be aided by that extension, but the list below are some reccomended extensions to start with.
To add extensions either:
In VS Code find the extension menue (in the activity bar, usually on the left of the screen), four blocks with the top right removed, and search for the desired extension there. We reccomend this method.
Follow https://marketplace.visualstudio.com/VSCode and log in to your Microsoft account. Then search for the extension you want. Once you have added your extensions you will need to log into your Microsoft account in VS Code and let the extensions download. You may need to restart VS Code after the installations.
Many of these extensions will be downloaded together, but we include all of the information for completness. As an example, adding the Python Extension (ms-python.python) will automatically add Pylance and the Python Debugger.
C/C++
If you will be working with C/C++, these extensions provide language support, IntelliSense, and debugging capabilities.
H5Web
If you will be using data that is stored as a HDF5 format, we reccomend the H5Web extension for basic data visualization. This extension will allow you to look at the structure of the data as well as visualize the data in a limited manner.
Jupyter
If you will be using Jupyter for accessing remote computers or basic python notebooking we reccomned the following extensions.
Modern Fortran
If you will be working with Fortran, this extensions provide language support, IntelliSense, and debugging capabilities.
Python
If you will be working with Python, these extensions provide language support, IntelliSense, and debugging capabilities.
Remote SSH
If you want to access remote computers via VS Code you will need the following extensions.
Remote Access in VS Code with SSH
By usig VS Code to access a remote site you maintain all of the usual command line functions of SSH, but with an added directory explorer and all of the features of a code editor suite.
Once you have installed Remote - SSH, a new icon will appear in the activity bar (usually to the left of the screen), a monitor with a small circle in the bottom right corner, called Remote Explorer.
Opening this menue will present a(n) (empty) menue with two drop down menues, REMOTES (TUNNELS/SSH) and HELP AND FEEDBACK.
Open the REMOTES menue and you will be presented with >SSH.
To the right of this there is a gear and a +.
Clicking the + and you should be presented with an empty grey bar at the top of the screen that says
Connect to cassowary as described here.
and hit enter. This will produce a new option under SSH called ‘cassowary2.device.utk.edu’ with an arrow and a new window icon to the right.
Open a new window with the new window option or just open the connection with the arrow. You will be pnow have a (new) instance of VS Code running that is connected to cassowary. From here VS Code runs exactly the same.
Once you open a folder under the Explorer menue in the activity bar, this folder will automatically become a target for the Remote Explorer and it will add a folder under the relaveant SSH Host drop down menue.
If you are connecting to a host that is password protected, you will have an additional input at the top center of the screen asking for this password.
This is of primary use when connecting to hosts at the Oak Ridge National Laboratory’s Leadership Computing Facility (OLCF) or the National Energy Research Scientific Computing Center (NERSC).
Name |
Site |
---|---|
Home |
|
Data Transfer Node |
|
Summit |
|
Andes |
|
Frontier |