SARscape 5.* OpenCL Installation Notes

Last update: 05/12/2019 AP

1. Introduction

In SARscape 5.1 we started the progressive adoption of GPGPU-based technologies to increase the processing performance through improved parallelism. We based our solution on the Open Computing Language (OpenCL), which is an open standard widely supported by most of the hardware manufacturers and software developers.

In order to use SARscape, a working OpenCL version 1.2 (or higher) runtime must be first installed on the target machine.

An OpenCL runtime is a kind of third-party software driver that allows applications running on the target operating system to execute OpenCL-related operations through the selected OpenCL platform/device. There are several different OpenCL runtime versions that are designed to work with specific devices such as CPUs, GPUs and accelerators.
You can have multiple OpenCL runtime versions installed on the same computer: at any moment, you can select which version to use for SARscape under SARscape → Preferences Common → General Parameters.
According to the hardware characteristics of the machine that you plan to use for SARscape, the following sections might help you in finding out how to properly install and configure OpenCL.

2. OpenCL runtimes

2.1 CPU-only

Unlike CUDA, you don't need a specific brand of GPUs to start using OpenCL. Actually, you don't need a GPU at all to use OpenCL since CPU-only runtime versions exist. These CPU-only implementations are capable to put the computational power provided by your CPU at the service of OpenCL.

Although not strictly required, we recommend to always have a CPU-only OpenCL runtime installed even on machines equipped with a GPU. In this way, most OpenCL-related problems due to a corrupted installation or a driver issue can be easily detected by switching from an OpenCL runtime to another.
If no OpenCL CPU-only runtime is detected by SARscape, an informative warning message is reported, but the software can be fully used with the GPU implementation.

2.1.1 Intel CPU-only runtime

Intel provides a highly-optimized CPU-only implementation of OpenCL that is taking advantage of the most recent CPU instruction sets (such as SSE4.2 and AVX) and code vectorization techniques to speed up the execution of OpenCL kernels.

Intel CPU-only runtime installers can be found at this link.

Please be aware that the latest versions of the Intel CPU-only runtime require a relatively recent processor to work. If your processor is older than (roughly) five years, you can still install an older version of the Intel runtime, which is also provided on the aforementioned web page. On the other hand, the Intel runtime also runs on AMD processors.

Under Windows, the installation procedure of SARscape proposes the installation of the latest version of the Intel CPU-only runtime. Please keep in mind that a similar runtime is automatically installed with the Intel graphics driver on most laptops with an integrated graphics card. In this case, the stand-alone Intel CPU-only runtime installation will stop with a message saying that a newer runtime is already present. This is a normal behavior: by keeping your Intel graphics card's driver up to date, you automatically get the newest Intel CPU-only OpenCL runtime updated for free.

Under Linux, it is up to the SARscape user to download and install the proper OpenCL CPU-only runtime package compatible with his/her Linux distribution before starting the SARscape installation procedure.

2.1.2 AMD CPU-only runtime

Since some point in 2018, AMD dropped support for CPU devices (see this post).

Simply use the Intel CPU-only runtime also on AMD processors, or an older version of the Intel CPU-only runtime if the latest release is not compatible with your CPU.

2.2 GPU support

OpenCL runtimes for a specific GPU are usually automatically installed with the GPU drivers provided by each hardware vendor. Please be aware that OpenCL support is often only included in the official full-version of the drivers that can be downloaded from each hardware manufacturer: default/generic drivers installed by the operating system might only provide a minimal set of the features supported by a specific model.

Specific drivers can be directly downloaded from Nvidia, AMD, and Intel.
Any OpenCL 1.2 compliant GPU with at least 1 GB of VRAM and FP64 support can be used for SARscape: GPUs not matching these requirements are not reported under the SARscape → Preferences Common → General Parameters section.

If your computer has one single GPU and if you plan to use this GPU for OpenCL, pay attention to the fact that the same hardware resources will be shared among SARscape and the operating system. This includes most of the standard desktop rendering operations and the ENVI OpenGL-accelerated GUI, potentially leading to a degraded performance. In such a case, you might consider using a GPU with more video memory than the minimal 1 GB, or using two GPUs (one for graphics, one for computing), or switching to a CPU-only OpenCL runtime.

We recommend to keep your GPU drivers updated to the latest available version.

2.3 Accelerator support

Accelerators are another category of devices suitable for OpenCL acceleration. Intel Xeon Phi coprocessors belong to this category and their drivers are provided by Intel. The Intel Xeon Phi can be used as OpenCL device in SARscape.

In 2016, Intel deprecated OpenCL support for Xeon Phi.

2.4 Linux support

OpenCL runs smoothly under Linux. As of today, most GPU vendors include OpenCL support in their Linux driver packages, covering most of the main Linux distributions.

It is up to the SARscape user to make sure that a working and compatible OpenCL 1.2 runtime is already available on the target system before installing SARscape. OpenCL CPU-only/GPU runtime installers for Linux are usually provided at the same links mentioned in the previous sections and are expected to work out-of-the-box.

In case of partial support or some installation problem, a good summary and additional information is provided at this link.

3. Support and troubleshooting

3.1 SarX tools

There are a few command-line utilities that are installed with SARscape and that can help in the identification of OpenCL-related issues: sarxinfo and sarxtest.

They are available under the bin directory. The output of sarxinfo is also accessible through the ENVI GUI under SARscape → Administration → View Files → OpenCL Info, while sarxtest can be directly executed under SARscape → Administration → Diagnostics → Check OpenCL config. The test will automatically pick the OpenCL platform/device currently specified under the SARscape → Preferences Common → General Parameters.

They are also available as a license-free, stand-alone download here, e.g., to check a computer's compatibility before installing the whole SARscape software:
3.1.1 sarxinfo

The sarxinfo application is executed from the terminal and reports a summary of selected hardware and software characteristics of the underlying machine, including available OpenCL plaforms and devices. The report can be used to verify that OpenCL has been properly installed and configured. The sarxinfo report can also be included as attachment when you contact our support service to provide a better understanding of your system configuration.

If you want to save the report to a file, simply run it as sarxinfo filename, where filename is the name of the text file that will be generated and that can be included as attachment when you contact our technical support.

3.1.2 sarxtest

The sarxtest performs a series of tests and benchmarks on a specific OpenCL platform and device to make sure that it is fully operational and compatible with SARscape. This application can be started from the command-line: type sarxtest -h for a list of options to explicitly select a specific OpenCL platform and device. Platform and device ID numbers are the ones returned by the sarxinfo application.

3.2 FAQ

A list of frequently asked questions is available here.

3.3 Known issues and limitations

  • There are several known issues related to the upgrade from the Intel CPU-only runtime version 16.1.2 to the more recent version 18.1. Please directly follow the guidelines provided by Intel for a possible solution.

  • There are also some problems related to the Intel OpenCL runtimes not being detected on Windows OS. Please directly follow the guidelines provided by Intel to possibly fix this issue.

  • Graphics cards connected to a display and used at the same for processing might become unresponsive under intensive workload. Under Windows, this is known as the Timeout Detection and Recovery (TDR) problem. Please visit this page for more information.

  • Laptops with Intel HD graphics integrated GPUs might get a corrupted OpenCL runtime due to a conflict in the installation of stand-alone CPU runtime and a GPU driver update. Please visit this page for more information.

  • Even if not explicitly required, it is often necessary to reboot the machine before a freshly installed OpenCL platform or device is correctly recognized by the system.

  • We faced some compilation problems with OpenCL and the Nvidia Geforce GT 6x0M series: updating the GPU drivers to the latest version fixed the issue.

  • GPU-accelerated OpenCL is not always available when SARscape is used over a Remote Desktop session under Windows. Only a few GPU products are compatible with the RDP protocol, like Nvidia GPUs in TCC mode (or with recent drivers) and some AMD GPUs.
    As a workaround, users can opt for one of the following options:
    1. rely on CPU-only OpenCL when SARscape is used remotely
    2. use a different remote desktop service, such as VNC or TeamViewer
    3. install SARscape on a Linux machine and connect through ssh -X

  • Nvidia GPUs with a driver version in the range 370 to about 392 have a compatibility problem with the fast Fourier transform routine used in SARscape. You can easily detect this problem by running sarxtest (see above), which will fail in the FFT testing. In such a case, either roll-back your driver to a pre-370 edition or update to a more recent (post-392) version.