SARscape 5.4 OpenCL Installation Notes

Last update: A. Peternier, 23/01/2017

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 from version 5.1 onwards, a working OpenCL 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 → 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, as of today, two 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.

Depending on the brand and model of your CPU, one or both the following options can be applied. 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.

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 to speed up the execution of OpenCL kernels. Intel CPU-only runtime installers can be found at this link.
Please be aware that the Intel CPU-only runtime only works on modern Intel processors (and unofficially on some recent AMD processors, too), which means on CPUs that are not older than 5 years.

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 normal: 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 end-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

AMD also provides a CPU-only implementation of OpenCL that runs on almost any CPU supporting SSE2 at least. While the AMD implementation is less optimized than Intel’s one, it can be used on almost any processor, including Intel and older AMD models. For legal reasons, we cannot redistribute the AMD CPU-only runtime within SARscape: if needed, it is up to the end-user to download and install it.

If you are experiencing problems with the Intel CPU-only runtime (e.g., you don’t have an Intel CPU or your CPU is not supported by the Intel runtime), you can download and install the AMD CPU-only runtime as fallback.

The AMD CPU-only runtime is included in the AMD APP SDK that is available here.
Although more recent releases are available, we recommend to download and use the 2.9.1 version. If you install version 2.9.1, go for the custom installation and, unless you need them, unselect all the proposed optional packages as in this picture:

If you have a properly installed AMD GPU driver on your computer, you probably already have a recent version of the AMD CPU-only OpenCL runtime, since it is automatically installed with the GPU graphics driver.

2.2 GPU support

OpenCL runtimes for a specific GPU are usually transparently 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 Windows 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 → 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 end-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 → 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. The application is started from the command-line. Type sarxtest -h for a list of options to explicitly specify 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

    • Graphics cards connected to a display and used at the same for processing might become unresponsive under intensive workload. 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