diff --git a/lib/gpu/geryon/ocl_kernel.h b/lib/gpu/geryon/ocl_kernel.h index 8b8807f153..d78bf8e2fa 100644 --- a/lib/gpu/geryon/ocl_kernel.h +++ b/lib/gpu/geryon/ocl_kernel.h @@ -85,6 +85,8 @@ class UCL_Program { _program=clCreateProgramWithSource(_context,1,&prog,NULL,&error_flag); CL_CHECK_ERR(error_flag); error_flag = clBuildProgram(_program,1,&_device,flags,NULL,NULL); + if (error_flag!=-11) + CL_CHECK_ERR(error_flag); cl_build_status build_status; CL_SAFE_CALL(clGetProgramBuildInfo(_program,_device, CL_PROGRAM_BUILD_STATUS, @@ -106,7 +108,8 @@ class UCL_Program { #ifndef UCL_NO_EXIT std::cerr << std::endl << "----------------------------------------------------------\n" - << " UCL Error: Error compiling OpenCL Program...\n" + << " UCL Error: Error compiling OpenCL Program (" + << build_status << ") ...\n" << "----------------------------------------------------------\n"; std::cerr << build_log << std::endl; #endif diff --git a/lib/gpu/pppm.cpp b/lib/gpu/pppm.cpp index bedef67403..c618df848e 100644 --- a/lib/gpu/pppm.cpp +++ b/lib/gpu/pppm.cpp @@ -378,7 +378,7 @@ void PPPMT::compile_kernels(UCL_Device &dev) { std::string flags="-cl-fast-relaxed-math -cl-mad-enable "+ std::string(OCL_PRECISION_COMPILE); #ifdef USE_OPENCL - flags+=std::string(" -D grdtyp=")+ucl_template_name()+" -D grdtyp4="+ + flags+=std::string(" -Dgrdtyp=")+ucl_template_name()+" -Dgrdtyp4="+ ucl_template_name()+"4"; #endif