What happens?

You run into OpenCL-related problems. Typically, you experience Java Virtual Machine crashes when you run LuciadLightspeed or LuciadFusion applications for the first time.

When the application crashes, it generates a log file that contains a stack trace with OpenCL-related calls:

OpenCL error log
SEVERE: Error while loading raster data for layer [DTEDLayer1 [com.luciad.internal.lightspeed.view.layer.terrain.l@b700cd]]
java.lang.RuntimeException: java.lang.RuntimeException: Could not build OpenCL kernel from:
	  0 : // These defines are set when running java with "-Dcom.luciad.opencl.debug=true"
	  1 : #if defined(INTEL_PRINTF)
	  2 : #pragma OPENCL EXTENSION cl_intel_printf :enable
	  3 : #elif defined(ARM_PRINTF)
	  4 : #pragma OPENCL EXTENSION cl_arm_printf :enable
	  5 : #elif defined(AMD_PRINTF)
	  6 : #pragma OPENCL EXTENSION cl_amd_printf :enable
	  7 : #elif defined(CL_PRINTF)
	  8 : // Use OpenCL 1.2 built-in printf
	  9 : #else
	 10 : #define LCD_PRINTF_NOT_AVAILABLE
	 11 : #endif
     ...

You may also see error messages similar to OpenCL acceleration is not available.

Why does this happen?

You can run into this type of problem because:

  • OpenCL is not available because the driver has not been installed.

  • The OpenCL driver is outdated.

How can I fix it?

If you see a Java Runtime exception similar to the one in OpenCL error log, and the error seems related to an OpenCL call:

  • Make sure that OpenCL is installed. One way to do that is to run the lightspeed.debug.report sample, a LuciadLightspeed tool that generates a report on the hardware-related capabilities of your system. You can check if there is any OpenCL information in the generated report file.

  • If OpenCL is available, make sure that you have installed the latest version of your GPU driver. You can find the most recent driver versions for your GPU at the following download locations:

    It is particularly advisable to download the latest GPU drivers from these sites if you are using a laptop. The drivers provided by laptop manufacturers (Dell, HP, and so on) typically lag far behind the latest versions made available by the GPU manufacturer.

  • If the problem persists after installing the latest GPU driver, you can disable OpenCL for imaging as a last resort by running your application with the JVM option:

    -Dcom.luciad.imaging.disableOpenCLImagingEngine=true

    This option de-activates OpenCL for imaging tasks. The effect on performance will be negligible, unless you are intensively using imaging operators for image processing.

If you get errors related to OpenGL rather than to OpenCL, disabling OpenCL will have no effect. See How to handle graphical glitches, inexplicable exceptions or VM crashes related to an OpenGL call for more information.

Reporting problems to the support desk

If updating the driver does not solve the issue, you can contact the Luciad Support Desk. If you do so, it is important that you provide us with the following information:

  • The LuciadLightspeed version, for example version 2015.1.02

  • The system report generated from the lightspeed.debug.report sample. If it is not possible to send such a report, try sending us the information provided by one of the following reporting tools:

  • The log file that was generated or any error messages in the console

That information will help us diagnose the problem faster.