Results 1 to 6 of 6

Thread: Program Build Error

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    13

    Program Build Error

    hey guys,

    I am having a problem building my code. The kernel is simple, and it runs on my smaller machine with an integrated graphics card. My big machine has 2 NVIDIA GTX 485M cards in it, not running SLI. I get an error code of -11 when I build the program, but it runs just fine on my other system. Any ideas what would cause this?

    relevant code
    Code :
    //setup and get the platforms
    	vector<cl::Platform> platforms;
    	err = cl::Platform::get(&platforms);
     
    	//setup and get the context
    	cl_context_properties properties[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)platforms[0](), 0 };
    	cl::Context context = cl::Context(CL_DEVICE_TYPE_ALL, properties, 0, 0, &err);
     
    	//get a handle to the GPU
    	vector<cl::Device> deviceList = context.getInfo<CL_CONTEXT_DEVICES>(&err);
     
    	//create the queue
    	cl::CommandQueue queue = cl::CommandQueue(context, deviceList[0]);
     
    	//get the kernel
    	readCLFile(fileName);
     
    	//setup the program
    	cl::Program::Sources kernelSource(1, std::make_pair(kernelSourceCode, kernelSize));
    	cl::Program program = cl::Program(context, kernelSource, &err);
     
    	err = program.build(deviceList);
    	std::string str = program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(deviceList[0], &err);
    the last line is where it fails, due to a null reference exception in getInfoFunctor1. its not due to an invalid kernel, because it runs on my other system, and the library is linked properly, with the most recent drivers installed. I dont know if it applies, but when I trace the program.build function, it returns 193 for the error, just before converting it to -11, and it doesnt have a null reference exception if I get rid of the buildInfo line, but it still returns err code -11 and the GPU code fails.

  2. #2
    Junior Member
    Join Date
    Jun 2011
    Posts
    13

    Re: Program Build Error

    I changed the code a little, it now reads
    Code :
    err = program.build(deviceList, 0, 0, 0);
    err = program.getBuildInfo(deviceList[0], (cl_program_build_info)CL_PROGRAM_BUILD_INFO, &err);
    it still fails inside the getInfoFunctor1 method, with an "access violation reading location 0x00000000" which usually means null pointer, though all the params that I pass in are good

  3. #3
    Junior Member
    Join Date
    Jun 2011
    Posts
    13

    Re: Program Build Error

    EDIT:
    Code :
    cl::STRING_CLASS buildLog;
    program.getBuildInfo(deviceList[0], CL_PROGRAM_BUILD_LOG, &buildLog);

    the error is specifically in the cl.hpp file, located in the GetInfoFunctor1 struct, called from the GetInfoHelper struct in static cl_int get on line 744

  4. #4
    Junior Member
    Join Date
    Jun 2011
    Posts
    13

    Re: Program Build Error

    could it be that I am running a 64bit system? If so, how would I work around this with the same code. I am running it 32bit through vs2010, but I dont know if this would affect it

  5. #5
    Member
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    55

    Re: Program Build Error

    what is your "other system" that the code works on?

  6. #6
    Junior Member
    Join Date
    Jun 2011
    Posts
    13

    Re: Program Build Error

    it is a dell something or other laptop. It has an integrated Quadro NVS 135M.

    Turns out my problem was that I had to update my Display driver to the new 275.33 module. It fixed most of my problem. Now I have to slow my code down so the GPU is done before I read the data back in.

    Thanks anyway

Similar Threads

  1. error to build program executable
    By zovasili in forum OpenCL
    Replies: 6
    Last Post: 01-15-2013, 08:59 AM
  2. Asynchronous build program
    By matrem in forum OpenCL
    Replies: 1
    Last Post: 04-13-2010, 04:01 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
  •