3 Replies Latest reply on Dec 21, 2009 11:13 AM by tumanovalex

    Error in my example and examples SDK ATI

    tumanovalex

      Visual Studio Express 2008, video card GeForce 9500GT ? Athlon X2, ATI Stream SDK v2.0 Beta . Simple program:
      #include <conio.h>
      #include <stdio.h>
      #include <stdlib.h>
      #include <CL/cl.hpp>
      #include <windows.h>
      int main(int argc, char argv[]) {
      cl_uint num_platforms;
      cl_int npl;
      SetConsoleOutputCP(1251);
      npl = clGetPlatformIDs(0, NULL, &num_platforms);
      if(npl != CL_SUCCESS) {
      printf("\nNumber error clGetPlatformIDs = %i\n", npl);
      _getch();
      exit(1);
      }
      _getch();
      return 0;
      }
      get error on clGetPlatformIDs: " Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention." Same the errors appears for any examples from SDK ATI (HelloCL, BinarySearch...). In what 
      there can be an error? My project on http://slil.ru/28334278, there can be somebody will try on the your PC?

        • Error in my example and examples SDK ATI
          genaganna

           

          Originally posted by: tumanovalex Visual Studio Express 2008, video card GeForce 9500GT ? Athlon X2, ATI Stream SDK v2.0 Beta . Simple program: #include #include #include #include #include int main(int argc, char argv[]) { cl_uint num_platforms; cl_int npl; SetConsoleOutputCP(1251); npl = clGetPlatformIDs(0, NULL, &num_platforms); if(npl != CL_SUCCESS) { printf("\nNumber error clGetPlatformIDs = %i\n", npl); _getch(); exit(1); } _getch(); return 0; } get error on clGetPlatformIDs: " Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention." Same the errors appears for any examples from SDK ATI (HelloCL, BinarySearch...). In what  there can be an error? My project on http://slil.ru/28334278, there can be somebody will try on the your PC?

           

           

          Tumanovalex,

                            I am able to run your program without any problem.  It seems you have both Nvidia and ATI OpenCL libraries.  Make sure it picks appropriate library when you are running programs.