vetter / shoc

The SHOC Benchmark Suite
Other
243 stars 104 forks source link

OpenCL FFT on OS X 10.9 fails with CL_INVALID_PROGRAM_EXECUTABLE #35

Closed rothpc closed 10 years ago

rothpc commented 10 years ago

There were two problems.

  1. The FFT program built compiler option strings that contained two spaces between options. On OS X 10.9.4, with Xcode 5.1.1, the OpenCL compiler fails with this type of compiler argument string, returning CL_INVALID_BUILD_OPTIONS.
  2. When clBuildProgram in the FFT program indicated a failure (any failure), the program attempted to obtain the compile log. In doing so, it overwrote the error code from clBuildProgram. It overwrote it with CL_SUCCESS, and when the program finally checked the error code it thought the program had been built. When the program tried to create a kernel from the program, clCreateKernel failed with the CL_INVALID_PROGRAM_EXECUTABLE error.

Fixed with commit 75bf62d8fc2f24f8b4a188a9c8ef55cc8687b21d