Intel® DevCloud for oneAPI

Overview Get Started Documentation Forum external link

Connect to DevCloud with Visual Studio Code

NOTE: Windows users must first download and install Cygwin before proceeding. If the DevCloud Connector extension does not detect the presence of Cygwin you will be prompted to install it. Once it has been installed, return to this page to configure your connection.

Requirements:

To watch a video presentation of how to install the Sample Browser extension and create a project with Visual Studio Code, see Exploring oneAPI Samples with the Sample Browser in Visual Studio Code.

Cygwin Installation

The Cygwin* environment offers a convenient way of connecting to the Intel® DevCloud from a local machine running Windows*, whether you have a direct connection or find yourself behind a proxy. If you already have Cygwin installed, please skip to the SSH connection instructions.

NOTE: Your Cygwin installation requires the openssh (ssh), nc and nano packages.

The following instructions will help you install a minimal version of Cygwin for accessing Intel DevCloud. For your convenience we’re providing a simple script that automates the installation of Cygwin.

Download install_cygwin.bat from the installation page. It can be run from anywhere on your disk, either by executing it from the terminal or by double clicking on it.

The script uses curl to download the Cygwin setup file. When asked to provide proxy details, you can do so by entering proxy:port when asked, or by simply hitting enter to continue without a proxy.

The default installation path is c:\cygwin64. The script will prompt you to change this if you wish to install elsewhere.

Several Cygwin packages are downloaded during the installation. The script is configured to use mirrors.kernel.org as the default download site. A full list of Cygwin mirror sites can be found on the Cygwin homepage https://www.cygwin.com/.

Using Visual Studio Code with DevCloud

To get started with Microsoft Visual Studio Code and establishing a connection to Intel® DevCloud, log in to your oneAPI DevCloud account to download and save the installer script customized for your account (for example, if your account is ):

Connect VS Code to Intel DevCloud

  1. Go to File>Preferences>Settings.
  2. Search for DevCloud.
  3. Set connection and Visual Studio Code session settings if needed.Set connection and Visual Studio Code session settings if needed
  4. If you are behind an SSH Proxy, add your proxy name and port, and check the proxy box. The proxy is only applied if the checkbox is selected.
  5. Change the SSH connection timeout and Visual Studio Code session timeout if needed.
  6. Request the node using the properties in the "Node_device" section.
Setup Connection
  1. Press Ctrl+Shift+P ( or View -> Command Palette... ) to open the Command Palette. Type DevCloud and select Intel DevCloud: Setup connection. Press Ctrl+Shift+P ( or View -> Command Palette... ) to open the Command Palette.  Type DevCloud and select Intel DevCloud: Setup connection
    • If Cygwin is not present on the Windows system, the extension will prompt you to automatically install it.
    • After installing Cygwin, run the command “Intel DevCloud: Setup connection” again.
    • If an ssh config file is not present, the extension prompt you to create it using downloaded setup-devcloud-access-< user >.txt script.
  2. During the first connection, the extension will ask you to create an SSH fingerprint and open terminal. Type "yes" in the terminal to create the fingerprint. placeholder Set connection and Visual Studio Code session settings if needed
  3. Wait for connection process to finish
  4. Two service terminals will be created with the names: devcloudService1 and devcloudService2. It may take several seconds to create the terminals. Two service terminals will be created with the names: devcloudService1 and devcloudService2. It may take several seconds to create the terminals. NOTE: These are service terminals that are being used to facilite your connection to the oneAPI DevCloud. Do not close them during your DevCloud session; closing them will interrupt your SSH connection to DevCloud.
  5. The second terminal may ask you to add an SSH key fingerprint - type "yes" followed by the “Enter” key. The second terminal may ask you to add an SSH key fingerprint - type yes NOTE: Do not type anything else in the service terminals.
  6. If the connection setup is successful, the Remote-SSH window will open and be connected to a compute node.
  7. To run DevCloud compute node terminal, open new terminal in Remote-SSH window, or type Ctrl+Shift+P int the extension and select “Intel DevCloud: New DevCloud Terminal” The DevCloud terminal can now build and run samples using the command line. For instructions on how to build and run samples, see the DevCloud Get Started or browse samples on GitHub.
  8. For access to documentation, type Ctrl+Shift+P to open the Command Palette, type DevCloud and select Intel Devcloud: Get Help.
End the Connection

To close your connection to the oneAPI DevCloud and kill your interactive session:

Press Ctrl+Shift+P ( or View -> Command Palette... ) to open the Command Palette. Type DevCloud and select Intel DevCloud: Close connection, or close the Visual Studio Code window that is running the DevCloud extension and Remote-SSH window.

Using the Code Sample Browser for Intel® oneAPI Toolkit Extension on DevCloud

The Code Sample Browser for Intel oneAPI Toolkits Extension allows you to view code samples directly in Visual Studio Code. Learn how to install the extension and download your first sample below.

  1. In the Extensions Panel, search for oneAPI and you will find several extensions.
  2. Install the Sample Browser for Intel oneAPI Toolkits extension by clicking the Install button.
  3. This extension requires a reload of VS Code, you can do this by clicking on the Reload Required button that appeared next to the install button.
  4. Click on the oneAPI extension icon on the left sidebar shown below: clicking the oneAPI extension icon
  5. Download your first sample
    Let’s choose Get Started -> Vector Add sample by following the sequence 1 and 2 shown below:
    1. Hover over the sample name and on the far right of the name you will see a plus button appear.
    2. Click on the plus button and you will see a prompt for where you want the sample to be located in.
      Tip: Whichever folder you select, the files will be placed directly in that folder. It is helpful to create a folder with a relevant folder name before selecting a sample so your home directory doesn’t become cluttered. choosing location of sample
    3. Open a new terminal by selecting Terminal>New Terminal.
    4. Open the README.md for instructions on how to run the sample in the VS Code terminal you created.
Disconnect Visual Studio Code from DevCloud

Once you have completed working on DevCloud, close the remote connection by selecting File -> Close Remote Connection from the VS Code menu. Alternatively, click the remote-ssh notification in the lower-left corner of the VS Code window that says SSH:devcloud-vscode and select Close Remote Connection from the list of Remote-SSH commands.