Results 1 to 3 of 3

Thread: clCreateProgramWithSource deletes context?

  1. #1
    Junior Member
    Join Date
    Dec 2012

    clCreateProgramWithSource deletes context?


    My application has multiple kernels that I compile from different source files using clCreateProgramWithSource. However, after my second call to clCreateProgramWithSource, gDebugger is reporting my CL context as being deleted.
    I have note made any call to clReleaseContext, and tried putting a breakpoint on it in gDebugger to check if it was called somewhere.
    So I am wondering what can trigger a context deletion?

    Thanks in advance!

  2. #2
    Senior Member
    Join Date
    Oct 2012

    Re: clCreateProgramWithSource deletes context?

    have you checked all errorcodes. Most of the time the context is lost because of an error. If you try to compile the sources in multiple instances you also have to check CL_DEVICE_AVAILABLE. It could be a problem also.

  3. #3
    Junior Member
    Join Date
    Dec 2012

    Re: clCreateProgramWithSource deletes context?

    Thanks for your reply clint3112.

    I found out that I was releasing the program after creating it which apparently caused the lost of context. However, OpenCL didn't return any errors upon using the context for creating other kernels and my application could still run even after the context deletion... I guess OpenCL still has a lot to do in terms of error reporting, but anyway problem solved, thanks!

Similar Threads

  1. clCreateProgramWithSource - could be a file?
    By valhalla in forum OpenCL - parallel programming of heterogeneous systems
    Replies: 3
    Last Post: 04-13-2013, 08:51 AM
  2. Creating context using multiple devices from openGL context
    By ducese in forum OpenCL - parallel programming of heterogeneous systems
    Replies: 2
    Last Post: 04-26-2010, 08:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean