opencl - clGetPlatformIDs return -1001OpenCL -


i know has been posted many times, i'm reposting same question because none of suggestions in internet works me. i've been stuck here weeks trying simple opencl program running.

here's did:

i got new video card cuda , installed fresh copy of ubuntu 14.04:

 # lspci | grep vga  02:00.0 vga compatible controller: nvidia corporation gf119 [geforce gt 610] (rev a1) 

and installed cuda in it:

sudo apt-get install nvidia-cuda-toolkit 

this installed necessary files opencl compilation far see. got following files in computer now:

/usr/lib/x86_64-linux-gnu/libopencl.so /etc/opencl/vendors/nvidia.icd 

then tried following program:

#include <stdio.h> #include <cl/cl.h>  int main(void) {     cl_int err;     cl_uint numplatforms = 0;     err = clgetplatformids(0, null, &numplatforms);     if (cl_success == err)         printf("\ndetected opencl platforms: %d", numplatforms);     else         printf("\nerror calling clgetplatformids. error code: %d", err);     getchar();     return 0; } 

compiled follows:

 gcc -o test2 test.c -lopencl 

and when run it, following message:

 error calling clgetplatformids. error code: -1001 

i've tried numourous suggestions in internet work no avail. i'd appreciate offer.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -