After verification, the macro CL_VERSION_1_1 is defined in CL/cl.h from the Cuda Toolkit I installed, and this file declare the OpenCL 1.1 functions (it's logic in fact, I should have a compilation error otherwise) !
So the Toolkit I installed take in charge OpenCL 1.1, and my current Nvidia driver (that I didn't update) is still on OpenCL 1.0.
I checked on the "public" drivers on the net, the version is still 258.96 (the one I use), so I downloaded and installed the "Developer Drivers for WinVista and Win7 (260.61)" from
http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows%20XP,%20Windows%20Vista%20and%20Windows7 (the page on which I download the CUDA Toolkit).
My OpenCL.dll file now provides the OpenCL 1.1 functions.
I tried to run poclbm.py, as m0mchil said there is a problem with the rotate function, but pyopencl seems to work*, that's a good point
* There are still some errors while running the tests provided with pyopencl, but I don't know if this is crucial.
Errors on rotate :
<program source>:204:2: error: no matching function for call to 'rotate'
sharound(D,E,F,G,H,A,B,C,R(61),0xA4506CEB);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<program source>:4:103: note: instantiated from:
#define sharound(a,b,c,d,e,f,g,h,x,K) {h=(h+(rot(e, 26)^rot(e, 21)^rot(e, 7))+(g^(e&(f^g)))+K+x); t1=(rot(a, 30)^rot(a,
19)^rot(a, 10))+((a&b)|(c&(a|b))); d+=h; h+=t1;}
^
<program source>:2:19: note: instantiated from:
#define rot(x, y) rotate(x, (uint)y)
^~~~~~
<built-in>:3025:26: note: candidate function
ulong16 __OVERLOADABLE__ rotate(ulong16, ulong16);
^
<built-in>:3024:25: note: candidate function
ulong8 __OVERLOADABLE__ rotate(ulong8, ulong8);
^
<built-in>:3023:25: note: candidate function
ulong4 __OVERLOADABLE__ rotate(ulong4, ulong4);
^
<built-in>:3019:25: note: candidate function
ulong2 __OVERLOADABLE__ rotate(ulong2, ulong2);
^
<built-in>:3018:25: note: candidate function
long16 __OVERLOADABLE__ rotate(long16, long16);
^
<built-in>:3017:24: note: candidate function
long8 __OVERLOADABLE__ rotate(long8, long8);
^
<built-in>:3016:24: note: candidate function
long4 __OVERLOADABLE__ rotate(long4, long4);
^
<built-in>:3012:24: note: candidate function
long2 __OVERLOADABLE__ rotate(long2, long2);
^
<built-in>:3011:25: note: candidate function
uint16 __OVERLOADABLE__ rotate(uint16, uint16);
^
<built-in>:3010:24: note: candidate function
uint8 __OVERLOADABLE__ rotate(uint8, uint8);
^
<built-in>:3009:24: note: candidate function
uint4 __OVERLOADABLE__ rotate(uint4, uint4);
^
<built-in>:3005:24: note: candidate function
uint2 __OVERLOADABLE__ rotate(uint2, uint2);
^
<built-in>:3004:24: note: candidate function
int16 __OVERLOADABLE__ rotate(int16, int16);
^
<built-in>:3003:23: note: candidate function
int8 __OVERLOADABLE__ rotate(int8, int8);
^
<built-in>:3002:23: note: candidate function
int4 __OVERLOADABLE__ rotate(int4, int4);
^
<built-in>:2998:23: note: candidate function
int2 __OVERLOADABLE__ rotate(int2, int2);
^
<built-in>:2997:27: note: candidate function
ushort16 __OVERLOADABLE__ rotate(ushort16, ushort16);
^
<built-in>:2996:26: note: candidate function
ushort8 __OVERLOADABLE__ rotate(ushort8, ushort8);
^
<built-in>:2995:26: note: candidate function
ushort4 __OVERLOADABLE__ rotate(ushort4, ushort4);
^
<built-in>:2991:26: note: candidate function
ushort2 __OVERLOADABLE__ rotate(ushort2, ushort2);
^
<built-in>:2990:26: note: candidate function
short16 __OVERLOADABLE__ rotate(short16, short16);
^
<built-in>:2989:25: note: candidate function
short8 __OVERLOADABLE__ rotate(short8, short8);
^
<built-in>:2988:25: note: candidate function
short4 __OVERLOADABLE__ rotate(short4, short4);
^
<built-in>:2984:25: note: candidate function
short2 __OVERLOADABLE__ rotate(short2, short2);
^
<built-in>:2983:26: note: candidate function
uchar16 __OVERLOADABLE__ rotate(uchar16, uchar16);
^
<built-in>:2982:25: note: candidate function
uchar8 __OVERLOADABLE__ rotate(uchar8, uchar8);
^
<built-in>:2981:25: note: candidate function
uchar4 __OVERLOADABLE__ rotate(uchar4, uchar4);
^
<built-in>:2977:25: note: candidate function
uchar2 __OVERLOADABLE__ rotate(uchar2, uchar2);
^
<built-in>:2976:25: note: candidate function
char16 __OVERLOADABLE__ rotate(char16, char16);
^
<built-in>:2975:24: note: candidate function
char8 __OVERLOADABLE__ rotate(char8, char8);
^
<built-in>:2974:24: note: candidate function
char4 __OVERLOADABLE__ rotate(char4, char4);
^
<built-in>:2970:24: note: candidate function
char2 __OVERLOADABLE__ rotate(char2, char2);
^
<built-in>:2967:24: note: candidate function
ulong __OVERLOADABLE__ rotate(ulong, ulong);
^
<built-in>:2966:23: note: candidate function
long __OVERLOADABLE__ rotate(long, long);
^
<built-in>:2965:23: note: candidate function
uint __OVERLOADABLE__ rotate(uint, uint);
^
<built-in>:2964:22: note: candidate function
int __OVERLOADABLE__ rotate(int, int);
^
<built-in>:2963:25: note: candidate function
ushort __OVERLOADABLE__ rotate(ushort, ushort);
^
<built-in>:2962:24: note: candidate function
short __OVERLOADABLE__ rotate(short, short);
^
<built-in>:2961:24: note: candidate function
uchar __OVERLOADABLE__ rotate(uchar, uchar);
^
<built-in>:2960:23: note: candidate function
char __OVERLOADABLE__ rotate(char, char);
^
Edit : I just see the rot function in poclbm.py (the one m0mchil was talking in fact I gess), I will try to see how to change the two rot functions, and perhaps bytereverse in btc_miner. cl ?
Edit2 : pfiuuu, it's hard !
first time I work on python and therefore on pyopencl, and using the nvidia toolkit. I don't even know from where the rotate functions come (the candidates functions), where are they defined (nividia toolkit, boost, standard c++, ... and from which include) ?
Edit3 : ...
I made some tries, and I don't succed for now:
Traceback (most recent call last):
File "poclbm.py", line 57, in <module>
miner = cl.Program(context, kernelFile.read()).build()
File "E:\Python26\lib\site-packages\pyopencl-0.92-py2.6-win32.egg\pyopencl\__init__.py", line 138, in program_build
"Build on %s:\n\n%s" % (dev, log) for dev, log in build_logs))
pyopencl.RuntimeError: clBuildProgram failed: build program failure
Build on <pyopencl.Device 'GeForce 9800 GT' at 0x2312eb8>:
Error: Code selection failed to select: 0x527c7f8: i32 = bswap 0x527cbb0
... I have no idea of what that means
(for this test I just change #define rot(x, y) rotate(x, (uint)y) to #define rot(x, y) rotate(x, (uint2)y) in btc_miner.cl, trying to make it running first before checking the operations made).
Edit 4 :
a "funny" thing, the problem I have come from the end of the function search in btc_miner.cl
If I remove those lines
if((H.x==0) && (bytereverse(G.x)<=target))
{
output[0] = 1;
output[1] = nonce.x;
}
if((H.y==0) && (bytereverse(G.y)<=target))
{
output[0] = 1;
output[1] = nonce.y;
}
the script is built without error and start.
If I leave the tests without output[n] = ... it builds, and if I leave output[n] = ... without the tests, it builds also.
but if I put the test and output[n] = ... I have the following error :
Traceback (most recent call last):
File "poclbm.py", line 57, in <module>
miner = cl.Program(context, kernelFile.read()).build()
File "E:\Python26\lib\site-packages\pyopencl-0.92-py2.6-win32.egg\pyopencl\__init__.py", line 138, in program_build
"Build on %s:\n\n%s" % (dev, log) for dev, log in build_logs))
pyopencl.RuntimeError: clBuildProgram failed: build program failure
Build on <pyopencl.Device 'GeForce 9800 GT' at 0x2952eb8>:
Error: Code selection failed to select: 0x4f5a8d0: i32 = bswap 0x4f94670