Profiler Server with Visual Studio Code and Intel® DevCloud for oneAPI (NEW)
- Starting with the 2020 release, Intel® VTune™ Amplifier has been renamed toIntel® VTune™.Profiler
- Most recipes in theIntel® VTune™Performance Analysis Cookbook are flexible. You can apply them to different versions ofProfilerIntel® VTune™. In some cases, minor adjustments may be required.Profiler
- You can runIntel® VTune™on the system where you do development, so it has direct access to the binaries, debug info, and source files.Profiler
- Intel® VTune™also stores the collected traces and processed data on the same system so you do not have to transfer this heavy data to your client system for analysis.Profiler
- You do not need to install anything on your client system. You only need a web browser to access theIntel® VTune™GUI.Profiler
Option 1: Use
Profiler Server for Remote Development with Visual Studio Code
- RunIntel® VTune™server on the compute node from the VS Code terminal:Profilervtune-backend --enable-server-profiling
- Run theIntel® VTune™GUI. Control+click the URL displayed byProfilerIntel® VTune™server in the VS Code terminal to open theProfilerIntel® VTune™GUI in your web browser.Profiler
Option 2. Use
Profiler Server on a Remote System via SSH Terminal
- Log into the DevCloud login node:ssh devcloud
- Reserve a DevCloud compute node:qsub -IDo not close the terminal after this step, as the action will release your compute node.
- Open a new terminal.
- 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
- 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-n000Replaces000-n000with your compute node name.
- Start VTune server on the compute node:vtune-backend --web-port=55001 --enable-server-profiling
- Open the VTune GUI. Use your web browser to open the URL displayed by the VTune server.
- Accept the VTune server certificate.When you open the VTune GUI, your web browser may prompt you about the VTune 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.
- Set the passphrase.When you run VTune 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™server prompts you to set a passphrase. Other users cannot access yourProfilerIntel® VTune™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, theProfilerIntel® VTune™welcome screen opens.Profiler
- Create a project.
- Configure an analysis. Your remote machine (running theIntel® VTune™server) is selected as the target system by default since you ran the server withProfiler--enable-server-profilingoption.
- Run the analysis.
- The setup described in Option 1 relies on the functionality of the VS Code Remote - SSH extension to watch port numbers used by processes that are started through the VS Code terminal. The Remote - SSH extension automatically forwards these ports through the SSH tunnel. This action is controlled by theremote.autoForwardPortssetting, which is enabled by default.
- You can use the--enable-remote-profilingcommand-line option to enable the system that hosts VTune server as the performance profiling target. This option is disabled by default for security because running a VTune analysis involves launching a target application, which is an arbitrary command line. If multiple users have access to a single instance of VTune server, they would get access to execute arbitrary code on behalf of the user account that runs theIntel® VTune™server. EnableProfiler--enable-remote-profilingonly when VTune server is intended for a single user and you do not share the passphrase used to access the server.
- Use the--web-port=PORTcommand-line option to run VTune server on a specific port. Otherwise,Intel® VTune™will run on any arbitrary port available on the system.Profiler
- VTune server displays this warning in the output:
Because this procedure uses SSH port forwarding, you do not need to enablewarn: Server access is limited to localhost only. To enable remote access restart with --allow-remote-ui.--allow-remote-ui. Incoming connections to the VTune server come from the SSH server and they are localhost connections. If you enable--allow-remote-ui, VTune server builds a URL with the real network card IP address or FQDN name, which may not be accessible from your client machine.
- By default, VTune server stores profiling results in your home directory. Use the--data-directorycommand-line argument to specify a different data directory. You can also use this argument to open pre-collectedIntel® VTune™results inProfilerIntel® VTune™server.ProfilerIntel® VTune™can locate its results in any child folders.Profiler