I am launching my kernel and checking for possible errors as follows:
kernel<<<grid,block>>>(d_Basis, d_repul_aux,nao);
cout<<"done with the ERIs...."<<endl;
std::string error = cudaGetErrorString(cudaPeekAtLastError());
cout<<error<<endl;
HANDLE_ERROR(cudaMemcpy(eris_gpu_cpu_aux.data(),d_repulsion_aux,eris_size*sizeof(double),cudaMemcpyDeviceToHost));
where cudaGetErrorString(cudaPeekAtLastError()) is used in order to do error checking for the kernel and I have defined:
static void HandleError( cudaError_t err,
const char *file,
int line ) {
if (err != cudaSuccess) {
printf( "%s in %s at line %d\n", cudaGetErrorString( err ),
file, line );
exit( EXIT_FAILURE );
}
}
#define HANDLE_ERROR( err ) (HandleError( err, __FILE__, __LINE__ ))
When the X server is off, the computation runs as spected; but if I turn on the X server, the kernel hangs out and I get the following output:
done with the ERIs....
no error
the launch timed out and was terminated in main.cu at line 1038
The line 1038 in the source code corresponds to:
HANDLE_ERROR(cudaMemcpy(eris_gpu_cpu_aux.data(),d_repulsion_aux,eris_size*sizeof(double),cudaMemcpyDeviceToHost));
What means that the computation crashes when we are copying the results from the device to the host. I am using a graphic card GEforce GTx-480, and CUDA 7.5 .
Attempting to solve the problem, I tried to turn off the "Interactive" option in the /etc/X11/xorg.conf file but the X server does not recognize this option. What can I do in order to share the GPU resources between the X Server and my GPGPU application? I insist on this because is unconfortable for me to write and/or debug my code using text mode enviroment.