{"action":"created","issue":{"url":"https://api.github.com/repos/hughperkins/cltorch/issues/28","labels_url":"https://api.github.com/repos/hughperkins/cltorch/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/hughperkins/cltorch/issues/28/comments","events_url":"https://api.github.com/repos/hughperkins/cltorch/issues/28/events","html_url":"https://github.com/hughperkins/cltorch/issues/28","id":113581317,"number":28,"title":"cltorch test failed: OpenCL library not found error","user":{"login":"hitalex","id":1267462,"avatar_url":"https://avatars.githubusercontent.com/u/1267462?v=3","gravatar_id":"","url":"https://api.github.com/users/hitalex","html_url":"https://github.com/hitalex","followers_url":"https://api.github.com/users/hitalex/followers","following_url":"https://api.github.com/users/hitalex/following{/other_user}","gists_url":"https://api.github.com/users/hitalex/gists{/gist_id}","starred_url":"https://api.github.com/users/hitalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hitalex/subscriptions","organizations_url":"https://api.github.com/users/hitalex/orgs","repos_url":"https://api.github.com/users/hitalex/repos","events_url":"https://api.github.com/users/hitalex/events{/privacy}","received_events_url":"https://api.github.com/users/hitalex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-27T13:18:02Z","updated_at":"2015-10-27T14:39:55Z","closed_at":null,"body":"I have installed the OpenCL library (version AMD official, v3) and run `luarocks install cltorch` without errors, but when I do test `luajit -l cltorch -e 'cltorch.test()'`, following errors occur:\r\n\r\nluajit: Something went wrong: OpenCL library not found at /tmp/luarocks_cltorch-scm-1-7340/cltorch/cltorch/src/init.cpp:225\r\nstack traceback:\r\n\t[C]: at 0x7f6e794ed930\r\n\t[C]: in function 'require'\r\n\t/home/kqc/torch/install/share/lua/5.1/cltorch/init.lua:19: in main chunk\r\n\t[C]: at 0x00463eb0\r\n\t[C]: at 0x00406240\r\n\r\nOS: Ubuntu 12.04 LTS\r\nAMD card: Advanced Micro Devices, Inc. [AMD/ATI] Whistler [Radeon HD 6630M/6650M/6750M/7670M/7690M]\r\nOpenCL version: v3 (newest)\r\nAMD-Catalyst driver version: 15.9 (newest)\r\n\r\nI have run the `clinfo` command:\r\nNumber of platforms:\t\t\t\t 1\r\n  Platform Profile:\t\t\t\t FULL_PROFILE\r\n  Platform Version:\t\t\t\t OpenCL 2.0 AMD-APP (1800.11)\r\n  Platform Name:\t\t\t\t AMD Accelerated Parallel Processing\r\n  Platform Vendor:\t\t\t\t Advanced Micro Devices, Inc.\r\n  Platform Extensions:\t\t\t\t cl_khr_icd cl_amd_event_callback cl_amd_offline_devices \r\n\r\n\r\n  Platform Name:\t\t\t\t AMD Accelerated Parallel Processing\r\nNumber of devices:\t\t\t\t 2\r\n  Device Type:\t\t\t\t\t CL_DEVICE_TYPE_GPU\r\n  Vendor ID:\t\t\t\t\t 1002h\r\n  Board name:\t\t\t\t\t AMD Radeon 6600M and 6700M Series\r\n  Device Topology:\t\t\t\t PCI[ B#1, D#0, F#0 ]\r\n  Max compute units:\t\t\t\t 6\r\n  Max work items dimensions:\t\t\t 3\r\n    Max work items[0]:\t\t\t\t 256\r\n    Max work items[1]:\t\t\t\t 256\r\n    Max work items[2]:\t\t\t\t 256\r\n  Max work group size:\t\t\t\t 256\r\n  Preferred vector width char:\t\t\t 16\r\n  Preferred vector width short:\t\t\t 8\r\n  Preferred vector width int:\t\t\t 4\r\n  Preferred vector width long:\t\t\t 2\r\n  Preferred vector width float:\t\t\t 4\r\n  Preferred vector width double:\t\t 0\r\n  Native vector width char:\t\t\t 16\r\n  Native vector width short:\t\t\t 8\r\n  Native vector width int:\t\t\t 4\r\n  Native vector width long:\t\t\t 2\r\n  Native vector width float:\t\t\t 4\r\n  Native vector width double:\t\t\t 0\r\n  Max clock frequency:\t\t\t\t 485Mhz\r\n  Address bits:\t\t\t\t\t 32\r\n  Max memory allocation:\t\t\t 268435456\r\n  Image support:\t\t\t\t Yes\r\n  Max number of images read arguments:\t\t 128\r\n  Max number of images write arguments:\t\t 8\r\n  Max image 2D width:\t\t\t\t 16384\r\n  Max image 2D height:\t\t\t\t 16384\r\n  Max image 3D width:\t\t\t\t 2048\r\n  Max image 3D height:\t\t\t\t 2048\r\n  Max image 3D depth:\t\t\t\t 2048\r\n  Max samplers within kernel:\t\t\t 16\r\n  Max size of kernel argument:\t\t\t 1024\r\n  Alignment (bits) of base address:\t\t 2048\r\n  Minimum alignment (bytes) for any datatype:\t 128\r\n  Single precision floating point capability\r\n    Denorms:\t\t\t\t\t No\r\n    Quiet NaNs:\t\t\t\t\t Yes\r\n    Round to nearest even:\t\t\t Yes\r\n    Round to zero:\t\t\t\t Yes\r\n    Round to +ve and infinity:\t\t\t Yes\r\n    IEEE754-2008 fused multiply-add:\t\t Yes\r\n  Cache type:\t\t\t\t\t None\r\n  Cache line size:\t\t\t\t 0\r\n  Cache size:\t\t\t\t\t 0\r\n  Global memory size:\t\t\t\t 1073741824\r\n  Constant buffer size:\t\t\t\t 65536\r\n  Max number of constant args:\t\t\t 8\r\n  Local memory type:\t\t\t\t Scratchpad\r\n  Local memory size:\t\t\t\t 32768\r\n  Max pipe arguments:\t\t\t\t 0\r\n  Max pipe active reservations:\t\t\t 0\r\n  Max pipe packet size:\t\t\t\t 0\r\n  Max global variable size:\t\t\t 0\r\n  Max global variable preferred total size:\t 0\r\n  Max read/write image args:\t\t\t 0\r\n  Max on device events:\t\t\t\t 0\r\n  Queue on device max size:\t\t\t 0\r\n  Max on device queues:\t\t\t\t 0\r\n  Queue on device preferred size:\t\t 0\r\n  SVM capabilities:\t\t\t\t \r\n    Coarse grain buffer:\t\t\t No\r\n    Fine grain buffer:\t\t\t\t No\r\n    Fine grain system:\t\t\t\t No\r\n    Atomics:\t\t\t\t\t No\r\n  Preferred platform atomic alignment:\t\t 0\r\n  Preferred global atomic alignment:\t\t 0\r\n  Preferred local atomic alignment:\t\t 0\r\n  Kernel Preferred work group size multiple:\t 64\r\n  Error correction support:\t\t\t 0\r\n  Unified memory for Host and Device:\t\t 0\r\n  Profiling timer resolution:\t\t\t 1\r\n  Device endianess:\t\t\t\t Little\r\n  Available:\t\t\t\t\t Yes\r\n  Compiler available:\t\t\t\t Yes\r\n  Execution capabilities:\t\t\t\t \r\n    Execute OpenCL kernels:\t\t\t Yes\r\n    Execute native function:\t\t\t No\r\n  Queue on Host properties:\t\t\t\t \r\n    Out-of-Order:\t\t\t\t No\r\n    Profiling :\t\t\t\t\t Yes\r\n  Queue on Device properties:\t\t\t\t \r\n    Out-of-Order:\t\t\t\t No\r\n    Profiling :\t\t\t\t\t No\r\n  Platform ID:\t\t\t\t\t 0x7f2bb1463430\r\n  Name:\t\t\t\t\t\t Turks\r\n  Vendor:\t\t\t\t\t Advanced Micro Devices, Inc.\r\n  Device OpenCL C version:\t\t\t OpenCL C 1.2 \r\n  Driver version:\t\t\t\t 1800.11\r\n  Profile:\t\t\t\t\t FULL_PROFILE\r\n  Version:\t\t\t\t\t OpenCL 1.2 AMD-APP (1800.11)\r\n  Extensions:\t\t\t\t\t cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_amd_image2d_from_buffer_read_only cl_khr_spir cl_khr_gl_event \r\n\r\n\r\n  Device Type:\t\t\t\t\t CL_DEVICE_TYPE_CPU\r\n  Vendor ID:\t\t\t\t\t 1002h\r\n  Board name:\t\t\t\t\t \r\n  Max compute units:\t\t\t\t 4\r\n  Max work items dimensions:\t\t\t 3\r\n    Max work items[0]:\t\t\t\t 1024\r\n    Max work items[1]:\t\t\t\t 1024\r\n    Max work items[2]:\t\t\t\t 1024\r\n  Max work group size:\t\t\t\t 1024\r\n  Preferred vector width char:\t\t\t 16\r\n  Preferred vector width short:\t\t\t 8\r\n  Preferred vector width int:\t\t\t 4\r\n  Preferred vector width long:\t\t\t 2\r\n  Preferred vector width float:\t\t\t 8\r\n  Preferred vector width double:\t\t 4\r\n  Native vector width char:\t\t\t 16\r\n  Native vector width short:\t\t\t 8\r\n  Native vector width int:\t\t\t 4\r\n  Native vector width long:\t\t\t 2\r\n  Native vector width float:\t\t\t 8\r\n  Native vector width double:\t\t\t 4\r\n  Max clock frequency:\t\t\t\t 800Mhz\r\n  Address bits:\t\t\t\t\t 64\r\n  Max memory allocation:\t\t\t 2147483648\r\n  Image support:\t\t\t\t Yes\r\n  Max number of images read arguments:\t\t 128\r\n  Max number of images write arguments:\t\t 64\r\n  Max image 2D width:\t\t\t\t 8192\r\n  Max image 2D height:\t\t\t\t 8192\r\n  Max image 3D width:\t\t\t\t 2048\r\n  Max image 3D height:\t\t\t\t 2048\r\n  Max image 3D depth:\t\t\t\t 2048\r\n  Max samplers within kernel:\t\t\t 16\r\n  Max size of kernel argument:\t\t\t 4096\r\n  Alignment (bits) of base address:\t\t 1024\r\n  Minimum alignment (bytes) for any datatype:\t 128\r\n  Single precision floating point capability\r\n    Denorms:\t\t\t\t\t Yes\r\n    Quiet NaNs:\t\t\t\t\t Yes\r\n    Round to nearest even:\t\t\t Yes\r\n    Round to zero:\t\t\t\t Yes\r\n    Round to +ve and infinity:\t\t\t Yes\r\n    IEEE754-2008 fused multiply-add:\t\t Yes\r\n  Cache type:\t\t\t\t\t Read/Write\r\n  Cache line size:\t\t\t\t 64\r\n  Cache size:\t\t\t\t\t 32768\r\n  Global memory size:\t\t\t\t 6165118976\r\n  Constant buffer size:\t\t\t\t 65536\r\n  Max number of constant args:\t\t\t 8\r\n  Local memory type:\t\t\t\t Global\r\n  Local memory size:\t\t\t\t 32768\r\n  Max pipe arguments:\t\t\t\t 16\r\n  Max pipe active reservations:\t\t\t 16\r\n  Max pipe packet size:\t\t\t\t 2147483648\r\n  Max global variable size:\t\t\t 1879048192\r\n  Max global variable preferred total size:\t 1879048192\r\n  Max read/write image args:\t\t\t 64\r\n  Max on device events:\t\t\t\t 0\r\n  Queue on device max size:\t\t\t 0\r\n  Max on device queues:\t\t\t\t 0\r\n  Queue on device preferred size:\t\t 0\r\n  SVM capabilities:\t\t\t\t \r\n    Coarse grain buffer:\t\t\t No\r\n    Fine grain buffer:\t\t\t\t No\r\n    Fine grain system:\t\t\t\t No\r\n    Atomics:\t\t\t\t\t No\r\n  Preferred platform atomic alignment:\t\t 0\r\n  Preferred global atomic alignment:\t\t 0\r\n  Preferred local atomic alignment:\t\t 0\r\n  Kernel Preferred work group size multiple:\t 1\r\n  Error correction support:\t\t\t 0\r\n  Unified memory for Host and Device:\t\t 1\r\n  Profiling timer resolution:\t\t\t 1\r\n  Device endianess:\t\t\t\t Little\r\n  Available:\t\t\t\t\t Yes\r\n  Compiler available:\t\t\t\t Yes\r\n  Execution capabilities:\t\t\t\t \r\n    Execute OpenCL kernels:\t\t\t Yes\r\n    Execute native function:\t\t\t Yes\r\n  Queue on Host properties:\t\t\t\t \r\n    Out-of-Order:\t\t\t\t No\r\n    Profiling :\t\t\t\t\t Yes\r\n  Queue on Device properties:\t\t\t\t \r\n    Out-of-Order:\t\t\t\t No\r\n    Profiling :\t\t\t\t\t No\r\n  Platform ID:\t\t\t\t\t 0x7f2bb1463430\r\n  Name:\t\t\t\t\t\t Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz\r\n  Vendor:\t\t\t\t\t GenuineIntel\r\n  Device OpenCL C version:\t\t\t OpenCL C 1.2 \r\n  Driver version:\t\t\t\t 1800.11 (sse2,avx)\r\n  Profile:\t\t\t\t\t FULL_PROFILE\r\n  Version:\t\t\t\t\t OpenCL 1.2 AMD-APP (1800.11)\r\n  Extensions:\t\t\t\t\t cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_spir cl_khr_gl_event\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hughperkins/cltorch/issues/comments/151522116","html_url":"https://github.com/hughperkins/cltorch/issues/28#issuecomment-151522116","issue_url":"https://api.github.com/repos/hughperkins/cltorch/issues/28","id":151522116,"user":{"login":"hitalex","id":1267462,"avatar_url":"https://avatars.githubusercontent.com/u/1267462?v=3","gravatar_id":"","url":"https://api.github.com/users/hitalex","html_url":"https://github.com/hitalex","followers_url":"https://api.github.com/users/hitalex/followers","following_url":"https://api.github.com/users/hitalex/following{/other_user}","gists_url":"https://api.github.com/users/hitalex/gists{/gist_id}","starred_url":"https://api.github.com/users/hitalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hitalex/subscriptions","organizations_url":"https://api.github.com/users/hitalex/orgs","repos_url":"https://api.github.com/users/hitalex/repos","events_url":"https://api.github.com/users/hitalex/events{/privacy}","received_events_url":"https://api.github.com/users/hitalex/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T14:39:55Z","updated_at":"2015-10-27T14:39:55Z","body":"@hughperkins : 你竟然还会说汉语！\r\n\r\nI will switch to English...\r\n\r\nBad news:\r\nWhen `USE_CLEW` is set ON, `./gpuinfo` will output `opencl library not found.`\r\nWhen `USE_CLEW` is set OFF, errors occur:\r\n\r\nCMake Error: The following variables are used in this project, but they are set to NOTFOUND.\r\n Please set them or make sure they are set and tested correctly in the CMake files:\r\n OPENCL_LIBRARIES\r\n     linked by target \"EasyCL\" in directory /home/kqc/github/EasyCL\r\n     linked by target \"gpuinfo\" in directory /home/kqc/github/EasyCL\r\n\r\nIs this something to do with my OpenCl installation? It seems works well without problems, perhaps its installation directory?"}}