4 Replies Latest reply on Aug 29, 2012 2:48 PM by binying Branched to a new discussion.

    Problem in running an OpenCL code

    kalmun

      I have a problem when running  OpenCL code "EigenValue.cpp" downloaded from 

       

       

      http://simulation-opencl.googlecode.com/svn/trunk/samples_atistream/EigenValue/.  The errors received were

      EigenValue.hpp:105:33: error: SDKUtil/SDKCommon.hpp: No such file or directory

      EigenValue.hpp:106:38: error: SDKUtil/SDKApplication.hpp: No such file or directory

      EigenValue.hpp:107:38: error: SDKUtil/SDKCommandArgs.hpp: No such file or directory

      EigenValue.hpp:108:31: error: SDKUtil/SDKFile.hpp: No such file or directory

       

      I would be grateful, if you could let me know how to find the above missing header files.

       

      thanks.

       

      Kalani

       

       

      Hi

      

      

      

      Thanks for your reply. I got the following errors after doing the above modifications.

       

      EigenValue.cpp: In member function ‘virtual int EigenValue::genBinaryImage()’:

      EigenValue.cpp:103: error: ‘bifData’ is not a member of ‘streamsdk’

      EigenValue.cpp:103: error: expected ‘;’ before ‘binaryData’

      EigenValue.cpp:105: error: ‘binaryData’ was not declared in this scope

      EigenValue.cpp:109: error: ‘isComplierFlagsSpecified’ was not declared in this scope

      EigenValue.cpp:111: error: ‘flags’ was not declared in this scope

      EigenValue.cpp:119: error: ‘class streamsdk::SDKCommon’ has no member named ‘generateBinaryImage’

       

       

      I would be grateful if you could let me know a solution for the above.

       

      Thanks.

       

      Kalyani

       

       

       

        • Re: Problem in running an OpenCL code
          binying

          Change them to

           

          #include <SDKCommon.hpp>

          #include <SDKApplication.hpp>

          #include <SDKCommandArgs.hpp>

          #include <SDKFile.hpp>

            • Re: Problem in running an OpenCL code
              binying

              But you still get error when compiling it, it is---

              error C2259: 'EigenValue' : cannot instantiate abstract class

              2>          due to following members:

              2>          'int SDKSample::genBinaryImage(void)' : is abstract

              2>          c:\users\binying\documents\amd app\samples\opencl\sdkutil\include\sdkapplication.hpp(103) : see declaration of 'SDKSample::genBinaryImage'

              2>

              2>Build FAILED.

                • Re: Problem in running an OpenCL code
                  binying

                  The solution is

                  step1. add one line "int genBinaryImage();" in line 196, between   " int setupEigenValue();" and " int setupCL();" in the *.hpp file

                  1 of 1 people found this helpful
                    • Re: Problem in running an OpenCL code
                      binying

                      step 2.

                      . in .cpp file, add:

                      int
                      EigenValue::genBinaryImage()
                      {
                          streamsdk::bifData binaryData;
                          binaryData.kernelName = std::string("EigenValue_Kernels.cl");
                          binaryData.flagsStr = std::string("");
                          if(isComplierFlagsSpecified())
                              binaryData.flagsFileName = std::string(flags.c_str());

                       

                          binaryData.binaryName = std::string(dumpBinary.c_str());
                          int status = sampleCommon->generateBinaryImage(binaryData);

                          CHECK_ERROR(status, SDK_SUCCESS, "OpenCL Generate Binary Image Failed");

                          return SDK_SUCCESS;

                      }

                      , you can do other thins in the function, it's up to you.

                      1 of 1 people found this helpful