Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Visual Studio 2010 has BuildError

Help
2011-06-14
2012-12-21
  • Daniel Whiddon
    Daniel Whiddon
    2011-06-14

    Hello,

    I have created a project in VS2008 and it runs just fine. After creating the kernel and everything, the program executes on the GPU. I then create another project in VS2010, link to the same library file in References, and then the program has a runtime error on program.build. Even when I debug, the only output I get is:

    Cloo.BuildProgramFailureComputeException: OpenCL error code detected: BuildProgramFailure.
       at Cloo.ComputeException.ThrowOnError(ComputeErrorCode errorCode)
       at Cloo.ComputeProgram.Build(ICollection`1 devices, String options, ComputeProgramBuildNotifier notify, IntPtr notify
    DataPtr)
       at ConsoleApplication2.Program.Main(String args) in c:\users\dna\documents\visual studio 2010\Projects\ConsoleAppli
    cation2\ConsoleApplication2\Program.cs:line 60
    Press any key to continue . . .

    Anyone have any idea what may be causing this?

     
  • nythrix
    nythrix
    2011-06-14

    1) Do Clootils work? Can you build and run them/it?
    2) What OpenCL implementation are you using (AMD, Intel, Nvidia)?
    3) What windows (XP, Vista, 7, 32x64 bits)?

     
  • Walid
    Walid
    2011-06-17

    Hi everybody, i'm just new to OpenCL and i have a question: How can i display an image from a specific directory into a bitmap using OpenCL Cloo???

     
  • nythrix
    nythrix
    2011-06-18

    You can use this code:

    Bitmap bmp = new Bitmap("filename");
    BitmapData bmpData = bmp.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadWrite, 
        PixelFormat.Format32bppArgb);
    ComputeImage img = new ComputeImage2D(clContext, ComputeMemoryFlags.CopyHostPointer, 
        new ComputeImageFormat(ComputeImageChannelOrder.Bgra, ComputeImageChannelType.UnsignedInt8), 
        width, height, 0, bmpData.Scan0);
    bmpData.UnlockBits();
    

    Modify the parameters to fit your image file.

    Please, next time:
    1) Do not hijack other threads that don't fit your question, but start a new one, and
    2) do not post the same question in several places. It makes a mess of the forums.
    Much appreciated.

     
  • Walid
    Walid
    2011-06-18

    Thanx alot, it works well,i appreciate your help, and i'm so sorry for that inconvenience :)