Follow these steps to try Intel oneAPI Base Toolkit Samples in the DevCloud

1

Connect to DevCloud

Connect to the DevCloud using SSH Clients.

Select Preferred OS/Client Interface:

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.

The following instruction 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. As an alternative, we’ve also provided instructions for the manual installation.

Automated Installation

Download this simple Windows batch script install_cygwin.bat. 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.

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

Manual install

Summary

  1. Download the 64-bit installer (setup-x86_64.exe) from https://www.cygwin.com/
  2. Install the Cygwin base packages
  3. Install openssh and nc

Notes

  • Run the setup with the --no-admin option
  • Complete list of mirrors you can use for the download: https://www.cygwin.com/mirrors.html
  • Openssh and nc need to be specifically selected, otherwise they will not be downloaded/installed

Configure SSH Connection

There are two options for configuring your SSH connection.

Automated Configuration (Recommended)

The easiest method to set up an SSH connection to is by downloading and running an automated installer. The installer will add SSH configuration entries to ~/.ssh/config and create a private SSH key file inside ~/.ssh.

  1. Download and save the automatic installer script customized for your account u61975
    Download setup-devcloud-access-61975.txt
  2. Execute this script in a terminal window (you may need to adjust the command according to your download location and the downloaded file name):
    bash ~/Downloads/setup-devcloud-access-61975.txt
    Bash
  3. Clean up for security:
    rm ~/Downloads/setup-devcloud-access-61975.txt
    Bash

Manual Configuration

  1. Download and save the SSH access key for Linux/macOS to the folder ~/Downloads/ on your computer
    SSH key for Linux/macOS/Cygwin
  2. Create the directory ~/.ssh, unless it already exists and move the private SSH key into permanent storage in ~/.ssh:
    mkdir -p ~/.ssh
    mv ~/Downloads/devcloud-access-key-61975.txt ~/.ssh/
    Bash
    If you saved your key in a location other than ~/Downloads/, insert the correct path.
  3. Add the following lines to file ~/.ssh/config (if you do not have this file, simply create one):
    Host devcloud
    User u61975
    IdentityFile ~/.ssh/devcloud-access-key-61975.txt
    ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-61975.txt guest@devcloud.intel.com
    Markup
    Note: if you have multiple accounts on the Intel DevCloud, you can change the hostname devcloud to any other identifier to differentiate between your accounts. This is the hostname that you will use in the ssh and scp commands.
  4. Set the correct restrictive permissions on it and on the SSH client config file. To do this, run the following commands in a terminal:
    chmod 600 ~/.ssh/devcloud-access-key-61975.txt
    chmod 600 ~/.ssh/config
    Bash
Note : If you Are Behind an SSH Proxy

In the interest of security, some business networks require that all outgoing connections are established via a corporate proxy. If you followed the instructions above but are getting the error "Connection timed out", you are likely on such a business network. To comply with the security rules of your company, modify ~/.ssh/config as below:

Host devcloud
User u61975
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
ProxyCommand ssh -T devcloud-via-proxy

Host devcloud-via-proxy
User guest
Hostname devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
LocalForward 4022 c009:22
ProxyCommand nc -x <proxy_name>:<port> %h %p
Markup

Here, <proxy_name> and <port> are, respectively, the hostname and port of the corporate proxy. It is usually provided to you by your IT department.

Connect

Log into the Intel DevCloud

ssh devcloud
Bash

The first time you log in you will be asked to add the hostdevcloud to the list of know hosts. Answer “yes” to the prompts

The authenticity of host 'devcloud' (<no hostip for proxy command>)' can't be established.
ECDSA key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'devcloud' (ECDSA) to the list of known hosts.
# We are in!
logout
Connection to login-1 closed.
Bash

If you are running Linux or a macOS operating system you can access the cluster using the native Secure Shell (SSH) client, you will need to set up SSH tunneling as described below.

Option 1: Automated Configuration

The easiest method to set up SSH connection to is by downloading and running an automated installer. The installer will add SSH configuration entries to ~/.ssh/config and create a private SSH key file inside ~/.ssh. This method works best if you have only one account.

  1. Download and save the automatic installer script customized for your account u61975:
    Download setup-devcloud-access-61975.txt
  2. Execute this script in a terminal (you may need to adjust the command according to your download location and the downloaded file name):
    bash ~/Downloads/setup-devcloud-access-61975.txt
    Bash
  3. Clean up for security:
    rm ~/Downloads/setup-devcloud-access-61975.txt
    Bash

Option 2: Manual Configuration

Alternatively, if you do not want a script to modify your SSH configuration, you can proceed with manual installation instructions below.

Direct SSH Connection

  1. Download and save the SSH access key for Linux/macOS to the folder ~/Downloads/ on your computer
    SSH key for Linux/macOS/Cygwin
  2. Create the directory ~/.ssh, unless it already exists and move the private SSH key into permanent storage in ~/.ssh:
    mkdir -p ~/.ssh
    mv ~/Downloads/devcloud-access-key-61975.txt ~/.ssh/
    Bash
    If you saved your key in a location other than ~/Downloads/, insert the correct path.
  3. Add the following lines to file ~/.ssh/config (if you do not have this file, simply create one):
    Host devcloud
    User u61975
    IdentityFile ~/.ssh/devcloud-access-key-61975.txt
    ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-61975.txt guest@devcloud.intel.com
    Markup
    Note: if you have multiple accounts on the Intel DevCloud, you can change the hostname devcloud to any other identifier to differentiate between your accounts. This is the hostname that you will use in the ssh and scp commands.
  4. Set the correct restrictive permissions on it and on the SSH client config file. To do this, run the following commands in a terminal:
    chmod 600 ~/.ssh/devcloud-access-key-61975.txt
    chmod 600 ~/.ssh/config
    Bash

Direct SSH Connection

The following SSH settings are required for Visual Studio Code* remote access.

# DevCloud VSCode config
Host devcloud-vscode
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Hostname localhost
User u61975
Port 5022
IdentityFile ~/.ssh/devcloud-access-key-61975.txt

# SSH Tunnel config
Host *.aidevcloud
User u61975
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
ProxyCommand ssh -T devcloud nc %h %p
LocalForward 5022 localhost:22
LocalForward 5901 localhost:5901
Markup

If you Are Behind an SSH Proxy

In the interest of security, some business networks require that all outgoing connections are established via a corporate proxy. If you followed the instructions above but are getting the error "Connection timed out", you are likely on such a business network. To comply with the security rules of your company, modify ~/.ssh/config as below:

Host devcloud
User u61975
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
ProxyCommand ssh -T devcloud-via-proxy

Host devcloud-via-proxy
User guest
Hostname devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
LocalForward 4022 c009:22
ProxyCommand nc -x <proxy_name>:<port> %h %p
Markup

Here, <proxy_name> and <port> are, respectively, the hostname and port of the corporate proxy. It is usually provided to you by your IT department.

Connection

After the preparation steps above, you should be able to log in to your login node in the Intel® DevCloud without a password.

ssh devcloud
Bash

Upon the first login, you will be asked to add the hostdevcloud to the list of known hosts. Answer "yes":

The authenticity of host 'devcloud' (<no hostip for proxy command>)' can't be established.
ECDSA key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'devcloud' (ECDSA) to the list of known hosts.
# We are in!
logout
Connection to login-1 closed.
Bash

Next time you log in, you will only need to type ssh devcloud to log in:

ssh devcloud
Last login: Tue Jan  3 11:54:11 2017 from 10.5.0.7
Bash

Transferring Files

Once your connection is set up, you can copy local files to your login node like this:

scp /path/to/local/file devcloud:/path/to/remote/directory/
Bash

And you can copy files from your login node back to your home computer like this:

scp devcloud:/path/to/remote/file /path/to/local/directory/
Bash

Using Visual Studio Code* with DevCloud

To get started with Microsoft Visual Studio Code* and establishing a connection to Intel® DevCloud follow the instructions below.

Connect to DevCloud with Visual Studio Code

  1. Setup your SSH Config

    Option 1: Automated Configuration (Recommended)

    The easiest method to set up an SSH connection to is by downloading and running an automated installer. The installer will add SSH configuration entries to ~/.ssh/config and create a private SSH key file inside ~/.ssh.

    1. Download and save the automatic installer script customized for your account u61975
      Download setup-devcloud-access-61975.txt
    2. Execute this script in a terminal window (you may need to adjust the command according to your download location and the downloaded file name):
      bash ~/Downloads/setup-devcloud-access-61975.txt
      Bash
    3. Clean up for security:
      rm ~/Downloads/setup-devcloud-access-61975.txt
      Bash

    Option 2: Manual Configuration

    1. Download and save the SSH access key for Linux/macOS to the folder ~/Downloads/ on your computer
      SSH key for Linux/macOS/Cygwin
    2. Create the directory ~/.ssh, unless it already exists and move the private SSH key into permanent storage in ~/.ssh:
      mkdir -p ~/.ssh
      mv ~/Downloads/devcloud-access-key-61975.txt ~/.ssh/
      Bash
      If you saved your key in a location other than ~/Downloads/, insert the correct path.
    3. Add the following lines to file ~/.ssh/config (if you do not have this file, simply create one):
      Host devcloud
      User u61975
      IdentityFile ~/.ssh/devcloud-access-key-61975.txt
      ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-61975.txt guest@devcloud.intel.com
      Markup
      Note: if you have multiple accounts on the Intel DevCloud, you can change the hostname devcloud to any other identifier to differentiate between your accounts. This is the hostname that you will use in the ssh and scp commands.
    4. Set the correct restrictive permissions on it and on the SSH client config file. To do this, run the following commands in a terminal:
      chmod 600 ~/.ssh/devcloud-access-key-61975.txt
      chmod 600 ~/.ssh/config
      Bash
    Note : If you Are Behind an SSH Proxy

    In the interest of security, some business networks require that all outgoing connections are established via a corporate proxy. If you followed the instructions above but are getting the error "Connection timed out", you are likely on such a business network. To comply with the security rules of your company, modify ~/.ssh/config as below:

    Host devcloud
    User u61975
    Port 4022
    IdentityFile ~/.ssh/devcloud-access-key-61975.txt
    ProxyCommand ssh -T devcloud-via-proxy
    
    Host devcloud-via-proxy
    User guest
    Hostname devcloud.intel.com
    IdentityFile ~/.ssh/devcloud-access-key-61975.txt
    LocalForward 4022 c009:22
    ProxyCommand nc -x <proxy_name>:<port> %h %p
    
    Markup

    Here, <proxy_name> and <port> are, respectively, the hostname and port of the corporate proxy. It is usually provided to you by your IT department.

  2. Download, install, and launch Visual Studio Code* (VS Code*). If you already have installed you can skip this step.
  3. Install Remote – SSH Extensions from the Visual Studio Marketplace*
    • Click the left menu icon for Extensions
    • Search for Remote — SSH
    • Install the Remote — SSH Extension SSH extension installation
  4. Set Remote Connection Panel to SSH Targets
    1. Go to icon on the left side bar for Remote Connections
    2. Remote Explorer should be set to SSH Targets SSH targets setting
  5. Configure SSH Connection for VS Code* for your OS:
    • Windows — Cygwin*
      • Set SSH Config Path
        • Hover over SSH Targets and click the gear icon
        • Click Settings to select SSH Config
        • Find your SSH Config in open menu. The Cygwin default location is located at: C:\cygwin64\home\<user>\.ssh\config
        • Click Refresh icon on SSH Targets Bar
      • Set SSH Executable
        • Go to VS Code* File -> Preferences -> Settings
        • Search Settings for ssh.path and locate Remote.SSH: Path
        • Set this value to your Cygwin executable. Default value will be C:\cygwin64\bin\ssh.exe
    • Linux and macOS
      • Set SSH Config Path
        • By default, it should already be pointing to ~/.ssh/config. If not, follow the below instructions.
        • Hover over SSH Targets and click the gear icon
        • Select your SSH Config location from default locations
        • If you have a custom location, click Settings, and find your configuration, then click the refresh icon
  6. Request a compute node
    • Open a new terminal and SSH to devcloud
    • Enter the following command qsub -I to acquire a compute node as shown below. Tip: If you need a specific hardware type look at our other documentation for specifying a hardware type using qsub
    • Copy your compute node name indicated on the command line prompt, shown below, as this will be used in the next step for port forwarding requesting a compute node
  7. Port Forwarding
    • Open a new terminal
    • Execute the following command:
      ssh <compute-node-name>.aidevcloud
      Bash
      Example: If your compute node hostname is s001-n059, you would execute the following command:
      ssh s001-n059.aidevcloud
      Bash
      Port Forwarding
  8. Connect VS Code* to Intel DevCloud
    • Hover over the devcloud-vscode server entry (as shown below) and on the far right of the highlighted entry there should be an icon that will allow you to connect to the server clicking the connect icon
    • Click the icon to connect. By Default, a new VS Code* Instance should open and connect you to the server
  9. Connected to Intel DevCloud
    • You are now connected to the login node of the DevCloud. You can verify this by checking for the SSH Config name, SSH:devcloud-vscode, in the lower-left corner.

Sample Browser for Intel® OneAPI Toolkit Extension on DevCloud

The 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
Disconnect Visual Studio Code* from DevCloud

Once completed working on DevCloud you can 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

This tutorial will walk you through the steps of running a sample with Intel® Open Volume Kernel Library, one of the libraries included in the Intel® oneAPI Rendering Toolkit (Render Kit) for Linux* (Beta). Since the Render Kit is a collection of powerful libraries for high-fidelity visualization applications we’re enabling VNC remote access on a limited number of compute nodes which will be labeled renderkit.

Note: This guide depends on SSH settings that have been introduced recently. Please review the Linux or macOS* (SSH client) page in order to make the necessary SSH configuration changes.

Establish a VNC connection

In order to establish a VNC remote connection you will need to follow these steps:

  • Download and install the TurboVNC* client.
  • Start the VNC server on a renderkit compute node.
  • Establish an SSH tunnel for VNC traffic.
  • Start TurboVNC client.
  • Run the sample and/or other Intel® Oneapi Render Kit related work.
  • Stop the TurboVNC server.

Download and install the TurboVNC client

For more information about how to install the TurboVNC client please visit:

https://www.turbovnc.org/

Start the TurboVNC server

  1. Connect to the Intel® DevCloud:
    ssh devcloud
    Bash
  2. Request access in interactive mode to a renderkit compute node:
    qsub -I -l nodes=1:renderkit:ppn=2
    Bash
  3. Start the TurboVNC server using the following command:
    /opt/TurboVNC/bin/vncserver -otp
    Bash
    rendering-toolkit-for-Linux The TurboVNC server will generate a one time password (OTP) that is required later when starting the TurboVNC client.

Establish an SSH tunnel for VNC traffic

Note: Please review the Linux or macOS* (SSH client) page in order to make the necessary SSH configuration changes required for this step.

Use the name of the compute node you acquired at the previous step:

ssh sXXX-nXXX.aidevcloud
Bash

Start the TurboVNC client

rendering-toolkit-for-Linux

Enter the OTP as indicated.

rendering-toolkit-for-Linux rendering-toolkit-for-Linux5

You can adjust the quality of the connection as well as the resolution to fit your needs using the Options menu.

rendering-toolkit-for-Linux

Run the sample

Locate and execute the vklExamples demo:

/opt/intel/inteloneapi/openvkl/<version>/bin/vklExamples
Bash
rendering-toolkit-for-Linux

Stop the TurboVNC server

Before releasing the compute node back to the resource pool please shutdown the TurboVNC server using the following command:

/opt/TurboVNC/bin/vncserver -kill :1
Bash

Install Cygwin

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

The following instruction 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. As an alternative, we’ve also provided instructions for the manual installation.

Automated Installation

Download this simple Windows batch script install_cygwin.bat. 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.

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

Manual Installation

Summary

  1. Download the 64-bit installer (setup-x86_64.exe) from https://www.cygwin.com/
  2. Install the Cygwin base packages
  3. Install openssh and nc

Notes

  • Run the setup with the --no-admin option
  • Complete list of mirrors you can use for the download: https://www.cygwin.com/mirrors.html
  • Openssh and nc need to be specifically selected, otherwise they will not be downloaded/installed

Configure SSH Connection

There are two options for configuring your SSH connection.

Automated Configuration (Recommended)

The easiest method to set up an SSH connection to is by downloading and running an automated installer. The installer will add SSH configuration entries to ~/.ssh/config and create a private SSH key file inside ~/.ssh.

  1. Download and save the automatic installer script customized for your account u61975
    Download setup-devcloud-access-61975.txt
  2. Execute this script in a terminal window (you may need to adjust the command according to your download location and the downloaded file name):
    bash ~/Downloads/setup-devcloud-access-61975.txt
    Bash
  3. Clean up for security:
    rm ~/Downloads/setup-devcloud-access-61975.txt
    Bash

Manual Configuration

  1. Download and save the SSH access key for Linux/macOS to the folder ~/Downloads/ on your computer
    SSH key for Linux/macOS/Cygwin
  2. Create the directory ~/.ssh, unless it already exists and move the private SSH key into permanent storage in ~/.ssh:
    mkdir -p ~/.ssh
    mv ~/Downloads/devcloud-access-key-61975.txt ~/.ssh/
    Bash
    If you saved your key in a location other than ~/Downloads/, insert the correct path.
  3. Add the following lines to file ~/.ssh/config (if you do not have this file, simply create one):
    Host devcloud
    User u61975
    IdentityFile ~/.ssh/devcloud-access-key-61975.txt
    ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-61975.txt guest@devcloud.intel.com
    Markup
    Note: if you have multiple accounts on the Intel DevCloud, you can change the hostname devcloud to any other identifier to differentiate between your accounts. This is the hostname that you will use in the ssh and scp commands.
  4. Set the correct restrictive permissions on it and on the SSH client config file. To do this, run the following commands in a terminal:
    chmod 600 ~/.ssh/devcloud-access-key-61975.txt
    chmod 600 ~/.ssh/config
    Bash
Note : If you Are Behind an SSH Proxy

In the interest of security, some business networks require that all outgoing connections are established via a corporate proxy. If you followed the instructions above but are getting the error "Connection timed out", you are likely on such a business network. To comply with the security rules of your company, modify ~/.ssh/config as below:

Host devcloud
User u61975
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
ProxyCommand ssh -T devcloud-via-proxy

Host devcloud-via-proxy
User guest
Hostname devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
LocalForward 4022 c009:22
ProxyCommand nc -x <proxy_name>:<port> %h %p
Markup

Here, <proxy_name> and <port> are, respectively, the hostname and port of the corporate proxy. It is usually provided to you by your IT department.

Connect

  1. Log into the Intel DevCloud
    ssh devcloud
    Bash
    The first time you log in you will be asked to add the hostdevcloud to the list of know hosts. Answer “yes” to the prompts
    The authenticity of host 'devcloud' (<no hostip for proxy command>)' can't be established.
    ECDSA key fingerprint is SHA256:...
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'devcloud' (ECDSA) to the list of known hosts.
    # We are in!
    logout
    Connection to login-1 closed.
    Bash
  2. Request access in interactive mode to a renderkit compute note:
    qsub -I -l nodes=1:renderkit:ppn=2
    Bash

Setup Remote Desktop

  1. Download and install the TurboVNC client from https://www.turbovnc.org/
  2. Start the TurboVNC server using the following command:
    /opt/TurboVNC/bin/vncserver -otp
    Bash
    The TurboVNC server will generate a one time password (OTP) that is required later when starting the TurboVNC client. rendering-toolkit-for-Linux
  3. Open a second terminal window and establish an SSH Tunnel for VNC traffic and use the name of the compute node you acquired at the previous step to connect:
    ssh sXXX-nXXX.aidevcloud
    Bash
    rendering-toolkit-for-Linux5
  4. Start the TurboVNC client rendering-toolkit-for-Linux
  5. Enter the OTP as indicated. rendering-toolkit-for-Linux
  6. Once connected, you will see the desktop rendering-toolkit-for-Linux5

Configure SSH Connection

There are two options for configuring your SSH connection.

Automated Configuration (Recommended)

The easiest method to set up an SSH connection to is by downloading and running an automated installer. The installer will add SSH configuration entries to ~/.ssh/config and create a private SSH key file inside ~/.ssh.

  1. Download and save the automatic installer script customized for your account u61975
    Download setup-devcloud-access-61975.txt
  2. Execute this script in a terminal window (you may need to adjust the command according to your download location and the downloaded file name):
    bash ~/Downloads/setup-devcloud-access-61975.txt
    Bash
  3. Clean up for security:
    rm ~/Downloads/setup-devcloud-access-61975.txt
    Bash

Manual Configuration

Alternatively, if you do not want a script to modify your SSH configuration, you can proceed with manual installation instructions below.

  1. Download and save the SSH access key for Linux/macOS to the folder ~/Downloads/ on your computer
    SSH key for Linux/macOS/Cygwin
  2. Create the directory ~/.ssh, unless it already exists and move the private SSH key into permanent storage in ~/.ssh:
    mkdir -p ~/.ssh
    mv ~/Downloads/devcloud-access-key-61975.txt ~/.ssh/
    Bash
    If you saved your key in a location other than ~/Downloads/, insert the correct path.
  3. Add the following lines to file ~/.ssh/config (if you do not have this file, simply create one):
    Host devcloud
    User u61975
    IdentityFile ~/.ssh/devcloud-access-key-61975.txt
    ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-61975.txt guest@devcloud.intel.com
    Markup
    Note: if you have multiple accounts on the Intel DevCloud, you can change the hostname devcloud to any other identifier to differentiate between your accounts. This is the hostname that you will use in the ssh and scp commands.
  4. Set the correct restrictive permissions on it and on the SSH client config file. To do this, run the following commands in a terminal:
    chmod 600 ~/.ssh/devcloud-access-key-61975.txt
    chmod 600 ~/.ssh/config
    Bash
Note : If you Are Behind an SSH Proxy

In the interest of security, some business networks require that all outgoing connections are established via a corporate proxy. If you followed the instructions above but are getting the error "Connection timed out", you are likely on such a business network. To comply with the security rules of your company, modify ~/.ssh/config as below:

Host devcloud
User u61975
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
ProxyCommand ssh -T devcloud-via-proxy

Host devcloud-via-proxy
User guest
Hostname devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-61975.txt
LocalForward 4022 c009:22
ProxyCommand nc -x <proxy_name>:<port> %h %p
Markup

Here, <proxy_name> and <port> are, respectively, the hostname and port of the corporate proxy. It is usually provided to you by your IT department.

Connect

  1. Log into the Intel DevCloud
    ssh devcloud
    Bash
    The first time you log in you will be asked to add the hostdevcloud to the list of know hosts. Answer “yes” to the prompts
    The authenticity of host 'devcloud' (<no hostip for proxy command>)' can't be established.
    ECDSA key fingerprint is SHA256:...
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'devcloud' (ECDSA) to the list of known hosts.
    # We are in!
    logout
    Connection to login-1 closed.
    Bash
  2. Request access in interactive mode to a renderkit compute note:
    qsub -I -l nodes=1:renderkit:ppn=2
    Bash

Setup Remote Desktop

  1. Download and install the TurboVNC client from https://www.turbovnc.org/
  2. Start the TurboVNC server using the following command:
    /opt/TurboVNC/bin/vncserver -otp
    Bash
    The TurboVNC server will generate a one time password (OTP) that is required later when starting the TurboVNC client. rendering-toolkit-for-Linux
  3. Open a second terminal window and establish an SSH Tunnel for VNC traffic and use the name of the compute node you acquired at the previous step to connect:
    ssh sXXX-nXXX.aidevcloud
    Bash
    rendering-toolkit-for-Linux5
  4. Start the TurboVNC client rendering-toolkit-for-Linux
  5. Enter the OTP as indicated. rendering-toolkit-for-Linux
  6. Once connected, you will see the desktop rendering-toolkit-for-Linux5
2

Hello World! Get Started by running a simple sample on DevCloud.

Use this simple sample to confirm that you are connected to oneAPI DevCloud

CPU/GPU Vector-Add sample walkthrough

  1. Connect to the DevCloud.
    ssh devcloud
    Bash
  2. Download the samples.
    git clone https://github.com/oneapi-src/oneAPI-samples.git
    Bash
  3. Go to the vector-add sample.
    cd oneAPI-samples/DirectProgramming/DPC++/DenseLinearAlgebra/vector-add/
    Bash

Build and run the sample in batch mode

The following describes the process of submitting build and run jobs to PBS.

A job is a script that is submitted to PBS through the qsub utility. By default, the qsub utility does not inherit the current environment variables or your current working directory. For this reason, it is necessary to submit jobs as scripts that handle the setup of the environment variables. In order to address the working directory issue, you can either use absolute paths or pass the -d <dir> option to qsub to set the working directory.

Create the job scripts

  1. Create a build.sh script with the following contents.
    #!/bin/bash
    source /opt/intel/inteloneapi/setvars.sh
    make clean
    make all
    Bash
  2. Create a run.sh script with the following contents for executing the sample.
    #!/bin/bash
    source /opt/intel/inteloneapi/setvars.sh
    make run
    Bash

Build and run

Jobs submitted in batch mode are placed in a queue waiting for the necessary resources (compute nodes) to become available. The jobs will be executed on a first come basis on the first available node(s) having the requested property or label.

  1. Build the sample on a gpu node.
    qsub -l nodes=1:gpu:ppn=2 -d . build.sh
    Bash
    Note: -l nodes=1:gpu:ppn=2 (lower case L) is used to assign one full GPU node to the job.
    Note: The -d . is used to configure the current folder as the working directory for the task.
  2. In batch mode, the commands return immediately; however, the job itself may take longer to complete. In order to inspect the job progress, use the qstat utility.
    watch -n 1 qstat -n -1
    Bash
    Note: The watch -n 1 command is used to run qstat -n -1 and display its results every second.
  3. Run the sample on a gpu node after the build job completes successfully.
    qsub -l nodes=1:gpu:ppn=2 -d . run.sh
    Bash
  4. The best way to determine whether a job completed or not is by using the qstat utility. When a job terminates, a couple of files are written to the disk:
    • <script_name>.sh.eXXXX, which is the job stderr
    • <script_name>.sh.oXXXX, which is the job stdout
    Here XXXX is the job ID, which gets printed to the screen after each qsub command.
  5. Inspect the output of the sample.
    cat run.sh.oXXXX
    Bash
  6. Remove the stdout and stderr files and clean-up the project files.
    rm build.sh.*; rm run.sh.*; make clean
    Bash
  7. Disconnect from the Intel DevCloud.
    exit
    Bash

Build and run the sample in interactive mode

The interactive mode offers the most familiar way to work with the DevCloud. In this mode you will be able to work with a compute node just like you would normally do on a local system.

There are some caveats. First, a request for an interactive session will be placed in a queue. A compute node will be allocated as soon as possible, and no guarantees can be made regarding the wait time. Secondly, any tasks started on a compute node in interactive mode will be terminated when the connection is interrupted.

Our recommendation is to use the interactive mode sparingly and only for scenarios not feasible in batch mode like stepping through code when debugging applications.

  1. Request an interactive session on a DevCloud GPU node using qsub.
    qsub -I -l nodes=1:gpu:ppn=2 -d .
    Bash
    Note: -I (upper case i) is the argument used to request an interactive session.
  2. Within the interactive session on the GPU node, build and run the sample.
    make all && make run
    Bash
  3. Clean the sample and terminate the interactive session.
    make clean
    Bash
  4. Terminate the interactive session.
    exit
    Bash

FPGA Vector-Add sample walkthrough

You can compile or run oneAPI designs on the FPGA platform using the Intel DevCloud, which is set up with an Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA and the necessary software stack. For more information, refer to FPGA Design Development and Workloads for Hardware Acceleration.

The same vector-add sample from above can be compiled to target the FPGA Emulator or the FPGA Hardware.

FPGA Emulator

  1. Create the build_fpga_emu.sh and run_fpga_emu.sh scripts for targeting the emulator.
    1. build_fpga_emu.sh
      #!/bin/bash
      source /opt/intel/inteloneapi/setvars.sh
      make fpga_emu -f Makefile.fpga
      Bash
    2. run_fpga_emu.sh
      #!/bin/bash
      source /opt/intel/inteloneapi/setvars.sh
      make run_emu -f Makefile.fpga
      Bash
  2. Submit the compilation job.
    Note: Compile jobs should be submitted to compute nodes labeled fpga_compile, which are dedicated to FPGA compile jobs.
    qsub -l nodes=1:fpga_compile:ppn=2 -d . build_fpga_emu.sh
    Bash
  3. Submit the execution job.
    Note: Execution should be performed on nodes labeled fpga_compile which have more compute resources available for intensive workloads.
    qsub -l nodes=1:fpga_compile:ppn=2 -d . run_fpga_emu.sh
    Bash

FPGA Hardware

  1. Create the build_fpga_hw.sh and run_fpga_hw.sh scripts for targeting the FPGA hardware.
    1. build_fpga_hw.sh
      #!/bin/bash
      source /opt/intel/inteloneapi/setvars.sh
      make hw -f Makefile.fpga
      Bash
    2. run_fpga_hw.sh
      #!/bin/bash
      source /opt/intel/inteloneapi/setvars.sh
      make run_hw -f Makefile.fpga
      Bash
  2. Submit the compilation job.
    Note: A hardware compile job can take a long time. You can increase the timeout of a batch job by using the -l walltime=hh:mm:ss option. The maximum timeout available for FPGA compile jobs is 24h.
    qsub -l nodes=1:fpga_compile:ppn=2 -d . build_fpga_hw.sh
    Bash
  3. Submit the execution job.
    Note: Execution should be performed on compute nodes labeled fpga_runtime, or simply fpga, which host FPGA cards.
    qsub -l nodes=1:fpga_runtime:ppn=2 -d . run_fpga_hw.sh
    Bash
    As mentioned before, you can use qstat to monitor the progress of the enqueued jobs. Once a job terminates, its stderr and stdout will be saved to the disk. You can terminate jobs using the qdel utility.
3

Run Base Toolkit Samples on DevCloud

Explore the samples already installed in Step 2.