OpenCL not working with the latest version 3.2

Hey,

I installed a new GeForce GTX 480 in my computer and tried out the new Compute SDK by Nvidia (version 3.2). After installing the driver, toolkit and finally the sdk, I tried to run the samples coming with the sdk. The CUDA samples worked fine but the OpenCL samples didn’t (they crashed immediately after starting). I also debugged my own OpenCL code that was running without errors on a GeForce GTX 280 before and noticed that the program crashed while calling the ocl function clGetPlatformIDs(). Did anyone make similar experiences using the new CUDA version? I very much appreciate any help.

Thanks in advance.

Hey,

I installed a new GeForce GTX 480 in my computer and tried out the new Compute SDK by Nvidia (version 3.2). After installing the driver, toolkit and finally the sdk, I tried to run the samples coming with the sdk. The CUDA samples worked fine but the OpenCL samples didn’t (they crashed immediately after starting). I also debugged my own OpenCL code that was running without errors on a GeForce GTX 280 before and noticed that the program crashed while calling the ocl function clGetPlatformIDs(). Did anyone make similar experiences using the new CUDA version? I very much appreciate any help.

Thanks in advance.

Hey, I have a similar problem. What platform are you using? I’m using Fedora 64 bit. I was wondering whether this is particular to linux or is it a general driver problem. However, the OpenCL samples worked for me in a weird way. For example if you take the oclMatrixMul program it runs fine unmodified. However if you modify the code slightly, make BLOCK_SIZE equal to 18 or 8 or anything else really in matrixMul.h, and compile, it fails.

I guess however that first we should figure out if it’s only under linux. What platform are you using?

Hey, I have a similar problem. What platform are you using? I’m using Fedora 64 bit. I was wondering whether this is particular to linux or is it a general driver problem. However, the OpenCL samples worked for me in a weird way. For example if you take the oclMatrixMul program it runs fine unmodified. However if you modify the code slightly, make BLOCK_SIZE equal to 18 or 8 or anything else really in matrixMul.h, and compile, it fails.

I guess however that first we should figure out if it’s only under linux. What platform are you using?

Right now I’m using Windows Vista 64 bit. I installed the previous version of the gpu computing sdk (3.1) and then everything worked fine. Seems to be a driver issue in general.

Right now I’m using Windows Vista 64 bit. I installed the previous version of the gpu computing sdk (3.1) and then everything worked fine. Seems to be a driver issue in general.

Hi,

I am having the same problem on Quadro FX 1800. All my previously working Opencl programs are crashing on clGetPlatformIDs() after installing the latest nvidia development driver, CUDA 3.2 and gpu compute SDK 3.2. I am working on Windows 7 64 bit. Any solutions to this till now? Its very frustrating!!!

Nitish

In some old code, I had to fiddle with the args to clGetPlatformIDs(…).

The following works here with 3.2 on 64 bit Win7 (both c2050 and GTX 295)

//---------------------------------------------------------

cl_int oclGetPlatformID(cl_platform_id* clSelectedPlatformID)

//---------------------------------------------------------

{

  char chBuffer[1024];

  cl_uint num_platforms; 

  cl_platform_id* clPlatformIDs;

  cl_int ciErrNum;

  *clSelectedPlatformID = NULL;

// Get OpenCL platform count

  ciErrNum = clGetPlatformIDs (0, NULL, &num_platforms);

  if (num_platforms <= 0) { return CL_INVALID_PLATFORM; }

// alloc space for IDs

  clPlatformIDs = (cl_platform_id*)malloc(num_platforms * sizeof(cl_platform_id));

  if (! clPlatformIDs) { return CL_INVALID_PLATFORM; }

// search for NVIDIA platform

  ciErrNum = clGetPlatformIDs (num_platforms, clPlatformIDs, NULL);

  for(cl_uint i = 0; i < num_platforms; ++i) {

    ciErrNum = clGetPlatformInfo (clPlatformIDs[i], CL_PLATFORM_NAME, 1024, &chBuffer, NULL);

    if (ciErrNum == CL_SUCCESS) {

      if (strstr(chBuffer, "NVIDIA") != NULL) {

        *clSelectedPlatformID = clPlatformIDs[i];

        break;

      }

    }

  }

  free(clPlatformIDs);

if (NULL == *clSelectedPlatformID) { return CL_INVALID_PLATFORM; }

return CL_SUCCESS;

}

Does the above work for you? Does it fail after the first or second call to clGetPlatformIDs()?

Nigel