Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
934 Views

opencl runtime not executing clEventCallback

Hello everyone,

I am developing a program using openCL 1.2 on linux on a i5-7600 on linux-4.14

The program is built using event-based programming:

this part executes it callback:

err = clEnqueueNDRangeKernel(in_devs[i].command_queue, in_devs[i].kernels[in_devs[i].hosting_iterator->current_char % 4], 3, NULL, globalworkids, localworkids, 0, NULL, in_devs[i].event);

if(err != CL_SUCCESS) {

printf("clEnqueueNDRangeKernel for device %d failed. skipping item %d \r\n", i, err);

pass->mapping[i] = -1;

}

err = clSetEventCallback(*(in_devs[i].event), CL_COMPLETE, nextevent, pass);

if(err != CL_SUCCESS) {

printf("clSetEventCallback for device %d failed. skipping item %d \r\n", i, err);

pass->mapping[i] = -1;

continue;

}

clFlush(in_devs[i].command_queue);

This part does not:

void CL_CALLBACK nextevent(cl_event event, cl_int event_command_exec_status, void* user_data) {

jp_event_passthrough* process = (jp_event_passthrough*) user_data;

cl_uint err;

printf("launching next event on %d \r\n", process->deviceid);

err = clEnqueueReadBuffer(process->devlist[process->deviceid].command_queue, process->devlist[process->deviceid].args[3], CL_FALSE, 0, process->devlist[process->deviceid].hosting_iterator->current_char + 4, process->resp, 1, process->devlist[process->deviceid].event, &(process->multiple_use));

err |= clSetEventCallback(process->multiple_use, CL_COMPLETE, nextReadevent, process);

if(err != CL_SUCCESS) {

printf("Problem while read result from device %d %d \r\n", process->deviceid, err);

process->mapping[process->deviceid] = -1;

return;

}

clFlush(process->devlist[process->deviceid].command_queue);

// clReleaseEvent(event);

}

the problem does not occur on the nvidia opencl runtime (installed on the same pc), and does not occur on windows on a Xeon E5-2643 cpu.

What am I doing wrong?

any suggestions are welcome

0 Kudos
1 Reply
Highlighted
Community Manager
6 Views

Hello jpsollie

 

 

Thank you for joining the community.

 

 

I see that you are looking for information/assistance on app development, to better assist on your inquiry please refer to our Intel® Developer Zone, please refer to the following link:

 

 

https://software.intel.com/registration/ https://software.intel.com/registration/

 

 

Regards,

 

Leonardo C.

 

0 Kudos