Results 1 to 3 of 3

Thread: Accessing devices freeze the program on Linux

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    4

    Accessing devices freeze the program on Linux

    I've written a short OpenCL code that using NVIDIA CUDA platform to run a vector addition. However, the program runs once on the system fine and won't start on the second run. And once, I run the program gnome gets super laggy.

    It freeze on

    clCreateContext(NULL, device, NULL, NULL, &err);

    But I figured even on

    clGetDeviceInfo(device[0], CL_DEVICE_NAME,100, String, NULL);

    It stops forever. I guess when it gets run first time it's not releasing the device? am not sure.

    I'm also releasing memory, kernel, command queue, program, and context.

    I'm using GTX 660 with cudatoolkit5.0.35 on Linux 11.10 Ubuntu(which is recommended from NVIDIA). Is there anyway I can "reset" the device without rebooting it? I've tried different drivers and still the same. I'm not sure if it's a problem with the driver or sdk.

    Thanks in advance

  2. #2

    Re: Accessing devices freeze the program on Linux

    You need to release every OpenCL object that you create. I have found in long running loops that not freeing clEvent objects frequently would eventually cause my code to freeze when enqueueing kernels. Not exactly the same problem as you are having, but yeah Nvidia's driver could start freezing if you don't release every single object.

  3. #3
    Junior Member
    Join Date
    Nov 2012
    Posts
    4

    Re: Accessing devices freeze the program on Linux

    Good point!

    However, I've figured it was freezing I was trying to access wrong part of the memory.

Similar Threads

  1. System freeze on kernel execution
    By joshuafolken in forum OpenCL
    Replies: 3
    Last Post: 02-04-2013, 08:25 AM
  2. freeze upon exit
    By sky123 in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 09-27-2005, 09:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •