cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

drstrip
Journeyman III

access violation error when running OpenCL sample examples

Under SDK2.0 and Catalyst 9.9, the following code worked:

cl_uint getNumPlatforms(bool fail_on_zero)
{
  cl_uint num_platforms;
  cl_int status = clGetPlatformIDs(0, NULL, &num_platforms);
  if(status != CL_SUCCESS)
          .... some error handling

 

This gives the unhandled exception error in SDK2.2 and Catalyst 10.7

 

I then tried

cl_uint getNumPlatforms(bool fail_on_zero)
{

  cl_uint num_platforms;
  cl_platform_id platforms [255];
  cl_int status = clGetPlatformIDs(255, platforms, &num_platforms);
  if(status != CL_SUCCESS)

 

I also tried

 

cl_uint getNumPlatforms(bool fail_on_zero)
{

  cl_uint num_platforms;
  cl_platform_id * platforms = new cl_platform_id [255]
  cl_int status = clGetPlatformIDs(255, platforms, &num_platforms);
  if(status != CL_SUCCESS)

This still gives the unhandled exception.

 

I think there was a middle stage where I had SDK2.2 but still was running Catalyst 9.9 , if I remember correctly. In that case, the original code still ran, but I was no longer able to find either my Firestream card or my graphics card as GPUs.

0 Likes
genaganna
Journeyman III

access violation error when running OpenCL sample examples

Originally posted by: drstrip Under SDK2.0 and Catalyst 9.9, the following code worked:

 

cl_uint getNumPlatforms(bool fail_on_zero) {   cl_uint num_platforms;   cl_int status = clGetPlatformIDs(0, NULL, &num_platforms);   if(status != CL_SUCCESS)           .... some error handling

 

 This gives the unhandled exception error in SDK2.2 and Catalyst 10.7

 

 I then tried

 

cl_uint getNumPlatforms(bool fail_on_zero) {

 

  cl_uint num_platforms;   cl_platform_id platforms [255];   cl_int status = clGetPlatformIDs(255, platforms, &num_platforms);   if(status != CL_SUCCESS)

 

 I also tried

 

 cl_uint getNumPlatforms(bool fail_on_zero) {

 

  cl_uint num_platforms;   cl_platform_id * platforms = new cl_platform_id [255]   cl_int status = clGetPlatformIDs(255, platforms, &num_platforms);   if(status != CL_SUCCESS)

 

This still gives the unhandled exception.

 

 I think there was a middle stage where I had SDK2.2 but still was running Catalyst 9.9 , if I remember correctly. In that case, the original code still ran, but I was no longer able to find either my Firestream card or my graphics card as GPUs.

 

It looks like you are using linux and did not set ICD. Please see Installation_notes doc to know how to set ICD.

0 Likes
drstrip
Journeyman III

access violation error when running OpenCL sample examples

Originally posted by: genagannaIt looks like you are using linux and did not set ICD. Please see Installation_notes doc to know how to set ICD.

 

 

Actually I'm on Windows (Vista SP2), but I'll go back and check if I missed something in the installation notes.

Checked the installation notes, nothing relevant I could find for Windows Vista to explain this. Even in the Linux case the error is a "not found" error, not an unhandled exception.

 

About all I can come up with at this point is to uninstall/install. Hopefully someone will have a more useful suggestion before I go that route.

0 Likes
drstrip
Journeyman III

access violation error when running OpenCL sample examples

I've uninstalled and reinstalled the SDK (but not the driver) and am still getting the unhandled exception.

Perhaps I need to change something in the project settings?

0 Likes
genaganna
Journeyman III

access violation error when running OpenCL sample examples

Originally posted by: drstrip I've uninstalled and reinstalled the SDK (but not the driver) and am still getting the unhandled exception.

 

Perhaps I need to change something in the project settings?

 

Could you please give more details about error? From which API you are getting this exception?

Are you able to run on CPU? 

Have you installed Nvidia SDK on your system?

0 Likes
drstrip
Journeyman III

access violation error when running OpenCL sample examples

I'm not sure what you mean "which API"? I'm using the OpenCL calls in the SDK as shown in the code I posted above in this thread.

Can I run on the CPU? No, because the error is occurring in the clGetPlatformIDs(..) call, so I can't even begin to execute a program.

 

Do I have the Nvidia SDK on my machine? No.

0 Likes
genaganna
Journeyman III

access violation error when running OpenCL sample examples

Originally posted by: drstrip I'm not sure what you mean "which API"? I'm using the OpenCL calls in the SDK as shown in the code I posted above in this thread.

 

Can I run on the CPU? No, because the error is occurring in the clGetPlatformIDs(..) call, so I can't even begin to execute a program.

 

 

Do I have the Nvidia SDK on my machine? No.

 

I mean which opencl call.  What error are you getting from clGetPlatformIDs()?

Please check whether samples picking correct OpenCL.dll or not.

0 Likes
drstrip
Journeyman III

access violation error when running OpenCL sample examples

I'm not getting an OpenCL error, I'm getting an OS unhandled exception error, as noted above.

I get the same unhandled exception error on the MatrixMultiplication example from the samples.

I also get an error linking the example straight from box - the usual libcmt/libcmtd conflicts. I checked the runtime lib settings and they both are Multi-threaded Debug, but for some reason the sdk lib builds with the non-debug runtime. If I set the MatrixMultiplication project to Multithreaded (not debug), and leave the SDK lib on debug, it compiles and links fine.

 

Summary -

Windows Vista SP2, VS2008, SDK 2.2, Catalyst 10.7
Program (mine or sample) throws unhandled exception error at clGetPlatformIDs(). No OpenCL error is returned, just an unhandled exception at the runtime level.

Have uninstalled and reinstalled SDK2.2, but not Catalyst.

 

 

0 Likes
n0thing
Journeyman III

access violation error when running OpenCL sample examples

Are you able to run CAL samples? If not then you might need to reinstall the driver -

1. Uninstall the driver, restart.

2. Use Driver Sweeper to clean files.  http://www.guru3d.com/category/driversweeper/

3. Install the driver again.

When you get the runtime error can you see the fault module name (dll name) under the program details section?

0 Likes
drstrip
Journeyman III

access violation error when running OpenCL sample examples

CAL examples also create an unhandled exception.

Module is aticfx32.dll

About to uninstall everything (including driver) and start over.

0 Likes