Using Intel® VTune™ Profiler Server with Visual Studio Code and Intel® DevCloud for oneAPI (NEW)

This recipe demonstrates how you use Intel® VTune™ Profiler as a web server when you develop and tune performance on a remote development machine. For a remote machine, the recipe uses a compute node at Intel® DevCloud for oneAPI.

Content expert: Jennifer DiMatteo

Ingredients

Note

  • Starting with the 2020 release, Intel® VTune™ Amplifier has been renamed to Intel® VTune™ Profiler.

  • Most recipes in the Intel® VTune™ Profiler Performance Analysis Cookbook are flexible. You can apply them to different versions of Intel® VTune™ Profiler. In some cases, minor adjustments may be required.

  • Get the latest version of Intel® VTune™ Profiler:

Setup Overview

With v2021.1.1 and newer versions, you can run Intel® VTune™ Profiler as a server and access it remotely using a web browser. This setup is useful when you develop applications on a remote system.

The following figure illustrates this setup:

Setup for VTune Profiler Server for Remote Development

Option 1: Use Intel® VTune™ Profiler Server for Remote Development with Visual Studio Code

  1. Log into Intel® DevCloud for oneAPI.

  2. Set up the VS Code connection. When you complete this procedure, you should get local VS Code connected to a compute node in the DevCloud.

  3. Run Intel® VTune™ Profiler server on the compute node from the VS Code terminal:

    vtune-backend --enable-server-profiling
  4. Open the URL displayed by Intel® VTune™ Profiler server in the VS Code terminal. This starts the Intel® VTune™ Profiler GUI in your web browser.

  5. Finish the setup.

Option 2. Use Intel® VTune™ Profiler Server on a Remote System via SSH Terminal

In this case, you must manually set up SSH tunneling. To simplify this procedure, run Intel® VTune™ Profiler on a specific port (55001 in this example). You can select a different port if 55001 is busy.

  1. Log into Intel® DevCloud for oneAPI.

  2. Follow the instructions for Windows or Linux / MacOS systems and set up an SSH connection into the DevCloud.

  3. Log into the DevCloud login node:

    ssh devcloud
  4. Reserve a DevCloud compute node:

    qsub -I

    Note

    Do not close the terminal after this step, as the action will release your compute node.
  5. Open a new terminal.

  6. Log into the DevCloud node again, this time with SSH Port forwarding enabled:

    ssh -L 127.0.0.1:55001:127.0.0.1:55001 devcloud
  7. Establish an SSH connection from the login node to the compute node with one more SSH tunnel:

    ssh -L 127.0.0.1:55001:127.0.0.1:55001 s000-n000

    Replace s000-n000 with your compute node name.

  8. Start Intel® VTune™ Profiler server on the compute node:

    vtune-backend --web-port=55001 --enable-server-profiling
  9. Open the Intel® VTune™ Profiler GUI. Use your web browser to open the URL displayed by the Intel® VTune™ Profiler server.

  10. Finish the setup.

Finish Setup

To complete the setup:

  1. Accept the Intel® VTune™ Profiler server certificate.

    Note

    When you open the Intel® VTune™ Profiler GUI, your web browser may prompt you about the Intel® VTune™ Profiler server self-signed certificate. You can proceed safely without installing the certificate because the SSH tunnel provides protection from Man-in-the-Middle (MitM) attacks. For more information on transport security, see Set Up Transport Security.

  2. Set the passphrase.

    When you run Intel® VTune™ Profiler server for the first time, the URL that it displays should contain a one-time-token. When you open this URL on a browser, Intel® VTune™ Profiler server prompts you to set a passphrase. Other users cannot access your Intel® VTune™ Profiler server without the passphrase. The hash of the passphrase is persisted on the server. Also, your browser stores a secure HTTP cookie so that you do not need to enter the passphrase each time you open the VTune GUI. Once you set the passphrase, the Intel® VTune™ Profiler welcome screen opens.

  3. Create a project.

  4. Configure an analysis. Your remote machine (running the Intel® VTune™ Profiler server) is selected as the target system by default since you ran the server with --enable-server-profiling option.

  5. Set the target application path and any command-line arguments. For more information, see Set Up Analysis Target.

  6. Run the analysis.

Usage Considerations

See Also