diff --git a/Common/OpenCLHandler.cpp b/Common/OpenCLHandler.cpp index 398ddba..4260f2a 100644 --- a/Common/OpenCLHandler.cpp +++ b/Common/OpenCLHandler.cpp @@ -69,7 +69,19 @@ OpenCLHandler::OpenCLHandler(std::string kernelcode) //std::string programSource = FileToString("../kernels/programs.cl"); std::string programSource = FileToString(kernelcode); program = cl::Program(context, programSource); - program.build(devices); + err = program.build(devices); + if (!CheckCLError(err)) + { + for (size_t devID = 0; devID < devices.size(); ++devID) + { + std::cout << "Device: " << devID << std::endl; + std::cout << "Build Status: " << program.getBuildInfo(devices[devID]) << std::endl; + std::cout << "Build Options:\t" << program.getBuildInfo(devices[devID]) << std::endl; + std::cout << "Build Log:\t " << program.getBuildInfo(devices[devID]) << std::endl; + std::cout << "--------------------------------------------------" << std::endl; + } + exit(-1); + } } bool OpenCLHandler::run_test(TestCase* test)