Bitcoin Forum
March 28, 2024, 05:02:59 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 »
  Print  
Author Topic: python OpenCL bitcoin miner  (Read 1238773 times)
jef.blanc
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
October 18, 2010, 06:03:34 PM
Last edit: October 18, 2010, 10:58:16 PM by jef.blanc
 #81

Hello again, thanks for the code  Smiley

but it still doesn't work  Sad
Nvidia doesn't like reversing numbers it seems  Angry
however, if I comments anyone of the four affectations, it builds  Grin

After trying by decomposing the reversing in many ways, I abandoned this path to bypass the problem.

I made a first version running with byte reversing and comparaisons made in the python script, and a second version with a function that make the comparison directly between a word and a reversed word in the OpenCl code. For now this version works only on big endian memory mapping (I hope it's what is used in the GPUs).

Note: I added somme print to the screen to show some informations when running the script.
I also let some comments in the code.

The two versions build and run without error, but I'm not sure that operations are correct.
As expected the second version is more effective (about 14800 khashs/sec with the 1st version, and 15200 khashs/sec with the 2nd version).

Version 1 : reversing and comparison in the python script
Code:
--- F:/Desktop/m0mchil-poclbm-cf33815/poclbm.py    Fri Oct 15 08:48:48 2010
+++ F:/Desktop/m0mchil-poclbm-cf33815/poclbm_nv1.py    Mon Oct 18 23:36:46 2010
@@ -21,6 +21,9 @@
     t2=(rot(a, 30)^rot(a, 19)^rot(a, 10))+((a&b)|(c&(a|b)))
     return (uint32(d + t1), uint32(t1+t2))
 
+def bytereverse(x):
+    return (((x & 0x000000ffL) << 24) | ((x & 0x0000ff00L) << 8) | ((x & 0x00ff0000L) >> 8) | ((x & 0xff000000L) >> 24))
+
 def sysWrite(format, args=()):
     sys.stdout.write('\r                                        \r' + format % args)
     sys.stdout.flush()
@@ -50,16 +53,40 @@
     context = cl.Context([devices[options.device]], None, None)
 else:
     print 'No device specified, you may use -d to specify one of the following\n'
+    # create_some_context should ask for the platform and device to use
     context = cl.create_some_context()
+
+device = context.devices[0]
+print "==============================================================="
+print "Platform name:", platform.name
+print "Platform profile:", platform.profile
+print "Platform vendor:", platform.vendor
+print "Platform version:", platform.version
+print "---------------------------------------------------------------"
+print "Device name:", device.name
+print "Device type:", cl.device_type.to_string(device.type)
+print "Device memory: ", device.global_mem_size//1024//1024, 'MB'
+print "Device max clock speed:", device.max_clock_frequency, 'MHz'
+print "Device compute units:", device.max_compute_units
+print "==============================================================="
+
 queue = cl.CommandQueue(context)
 
-kernelFile = open('btc_miner.cl', 'r')
+kernelFile = open('btc_miner_nv1.cl', 'r')
 miner = cl.Program(context, kernelFile.read()).build()
 kernelFile.close()
 
+print "==============================================================="
+print "build OK"
+print "==============================================================="
+
 if (options.worksize == -1):
     options.worksize = miner.search.get_work_group_info(cl.kernel_work_group_info.WORK_GROUP_SIZE, context.devices[0])
 
+print "==============================================================="
+print "worksize = ", options.worksize
+print "==============================================================="
+
 frames = options.frames
 frame = float(1)/frames
 window = frame/30
@@ -75,7 +102,7 @@
 work['extraNonce'] = 0
 work['block'] = ''
 
-output = np.zeros(2, np.uint32)
+output = np.zeros(6, np.uint32)
 
 while True:
     try:
@@ -117,10 +144,12 @@
     output_buf = cl.Buffer(context, mf.WRITE_ONLY | mf.USE_HOST_PTR, hostbuf=output)
 
     rate = start = time()
+    success = 0
+    nonce = 0
     while True:
-        if (output[0]):
-            work['block'] = work['block'][:152] + pack('I', long(output[1])).encode('hex') + work['block'][160:]
-            sysWriteLn('found: %s, %s', (output[1], datetime.now().strftime("%d/%m/%Y %H:%M")))
+        if (success):
+            work['block'] = work['block'][:152] + pack('I', long(nonce)).encode('hex') + work['block'][160:]
+            sysWriteLn('found: %s, %s', (nonce, datetime.now().strftime("%d/%m/%Y %H:%M")))
             break
 
         if (time() - start > options.askrate or base + globalThreads == 0x7FFFFFFF):
@@ -131,8 +160,20 @@
             base = 0x7FFFFFFF - globalThreads
 
         kernelStart = time()
-        miner.search(queue, (globalThreads, ), (options.worksize, ), block2[0], block2[1], block2[2], state[0], state[1], state[2], state[3], state[4], state[5], state[6], state[7], state2[1], state2[2], state2[3], state2[5], state2[6], state2[7], target[6], pack('I', base), output_buf)
+        miner.search(queue, (globalThreads, ), (options.worksize, ), block2[0], block2[1], block2[2], state[0], state[1], state[2], state[3], state[4], state[5], state[6], state[7], state2[1], state2[2], state2[3], state2[5], state2[6], state2[7], pack('I', base), output_buf)
         cl.enqueue_read_buffer(queue, output_buf, output).wait()
+        #target = target[6]
+        #H.x = output[0] ; H.y = output[1]
+        #G.x = output[2] ; G.y = output[3]
+        #nonce.x = output[4] ; nonce.y = output[5]
+        if (output[0] == 0 and bytereverse(output[2])<=target[6]):
+            success = 1
+            nonce = output[4]
+       
+        if (output[1] == 0 and bytereverse(output[3])<=target[6]):
+            success = 1
+            nonce = output[5]
+       
         kernelTime = time() - kernelStart
 
         if (kernelTime < lower):
@@ -142,4 +183,4 @@
 
         if (time() - rate > options.rate):
             rate = time()
-            sysWrite('%s khash/s', int((base / (time() - start)) / 500))
\ No newline at end of file
+            sysWrite('%s : %s khash/s', (datetime.now().strftime("%d/%m/%Y %H:%M:%S"),int((base / (time() - start)) / 500)))
\ No newline at end of file
Code:
--- F:/Desktop/m0mchil-poclbm-cf33815/btc_miner.cl    Fri Oct 15 08:48:48 2010
+++ F:/Desktop/m0mchil-poclbm-cf33815/btc_miner_nv1.cl    Mon Oct 18 22:01:08 2010
@@ -1,5 +1,4 @@
-#define bytereverse(x) ( ((x) << 24) | (((x) << 8) & 0x00ff0000) | (((x) >> 8) & 0x0000ff00) | ((x) >> 24) )
-#define rot(x, y) rotate(x, (uint)y)
+#define rot(x, y) rotate(x, (uint2)y)
 #define R(x) (work[x] = (rot(work[x-2],15)^rot(work[x-2],13)^((work[x-2])>>10)) + work[x-7] + (rot(work[x-15],25)^rot(work[x-15],14)^((work[x-15])>>3)) + work[x-16])
 #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;}
 
@@ -8,7 +7,6 @@
                         const uint state4, const uint state5, const uint state6, const uint state7,
                         const uint B1, const uint C1, const uint D1,
                         const uint F1, const uint G1, const uint H1,
-                        const uint target,
                         const uint base,
                         __global uint * output)
 {
@@ -209,17 +207,12 @@
     G+=0x1f83d9ab;
     H+=0x5be0cd19;
 
-    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;
-    }
+    output[0] = H.x;
+    output[1] = H.y;
+    output[2] = G.x;
+    output[3] = G.y;
+    output[4] = nonce.x;
+    output[5] = nonce.y;
 }
 
 // end
\ No newline at end of file

Version 2 : function that make the comparison between inversed and non inversed word
Code:
--- F:/Desktop/m0mchil-poclbm-cf33815/poclbm.py    Fri Oct 15 08:48:48 2010
+++ F:/Desktop/m0mchil-poclbm-cf33815/poclbm_nv2.py    Mon Oct 18 23:53:18 2010
@@ -50,16 +50,40 @@
     context = cl.Context([devices[options.device]], None, None)
 else:
     print 'No device specified, you may use -d to specify one of the following\n'
+    # create_some_context should ask for the platform and device to use
     context = cl.create_some_context()
+
+device = context.devices[0]
+print "==============================================================="
+print "Platform name:", platform.name
+print "Platform profile:", platform.profile
+print "Platform vendor:", platform.vendor
+print "Platform version:", platform.version
+print "---------------------------------------------------------------"
+print "Device name:", device.name
+print "Device type:", cl.device_type.to_string(device.type)
+print "Device memory: ", device.global_mem_size//1024//1024, 'MB'
+print "Device max clock speed:", device.max_clock_frequency, 'MHz'
+print "Device compute units:", device.max_compute_units
+print "==============================================================="
+
 queue = cl.CommandQueue(context)
 
-kernelFile = open('btc_miner.cl', 'r')
+kernelFile = open('btc_miner_nv2.cl', 'r')
 miner = cl.Program(context, kernelFile.read()).build()
 kernelFile.close()
 
+print "==============================================================="
+print "build OK"
+print "==============================================================="
+
 if (options.worksize == -1):
     options.worksize = miner.search.get_work_group_info(cl.kernel_work_group_info.WORK_GROUP_SIZE, context.devices[0])
 
+print "==============================================================="
+print "worksize = ", options.worksize
+print "==============================================================="
+
 frames = options.frames
 frame = float(1)/frames
 window = frame/30
@@ -142,4 +166,4 @@
 
         if (time() - rate > options.rate):
             rate = time()
-            sysWrite('%s khash/s', int((base / (time() - start)) / 500))
\ No newline at end of file
+            sysWrite('%s : %s khash/s', (datetime.now().strftime("%d/%m/%Y %H:%M:%S"),int((base / (time() - start)) / 500)))
\ No newline at end of file
Code:
--- F:/Desktop/m0mchil-poclbm-cf33815/btc_miner.cl    Fri Oct 15 08:48:48 2010
+++ F:/Desktop/m0mchil-poclbm-cf33815/btc_miner_nv2.cl    Mon Oct 18 23:33:50 2010
@@ -1,8 +1,88 @@
-#define bytereverse(x) ( ((x) << 24) | (((x) << 8) & 0x00ff0000) | (((x) >> 8) & 0x0000ff00) | ((x) >> 24) )
-#define rot(x, y) rotate(x, (uint)y)
+#define rot(x, y) rotate(x, (uint2)y)
 #define R(x) (work[x] = (rot(work[x-2],15)^rot(work[x-2],13)^((work[x-2])>>10)) + work[x-7] + (rot(work[x-15],25)^rot(work[x-15],14)^((work[x-15])>>3)) + work[x-16])
 #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;}
 
+// test 1 : recursive function, build error :
+// Error: Code selection failed to select: 0x504c1d8: i8 = NVPTXISD::MoveParam 0x504c150
+/*
+bool recurseReversedCompare(uchar *reversed, uchar *normal, uchar ir, uchar in)
+{
+    if(reversed[ir] > normal[in])
+    {
+        return false;
+    }
+    else if(reversed[ir] < normal[in])
+    {
+        return true;
+    }
+    else if(in > 0)
+    {
+        return recurseReversedCompare(reversed, normal, ir+1, in-1);
+    }
+    else
+    {
+        return true;
+    }
+}
+
+bool reversedSmallerThan(uint reversed, uint normal)
+{
+    uchar *r = (uchar *)&reversed;
+    uchar *n = (uchar *)&normal;
+
+    return recurseReversedCompare(r, n, 0, 3);
+}
+*/
+
+// test 2 : non recursive
+bool reversedSmallerThan(uint reversed, uint normal)
+{
+    uchar *r = (uchar *)&reversed;
+    uchar *n = (uchar *)&normal;
+
+    if(r[0] > n[3])
+    {
+        return false;
+    }
+    else if(r[0] < n[3])
+    {
+        return true;
+    }
+    else
+    {
+        if(r[1] > n[2])
+        {
+            return false;
+        }
+        else if(r[1] < n[2])
+        {
+            return true;
+        }
+        else
+        {
+            if(r[2] > n[1])
+            {
+                return false;
+            }
+            else if(r[2] < n[1])
+            {
+                return true;
+            }
+            else
+            {
+                if(r[3] > n[0])
+                {
+                    return false;
+                }
+                else
+                {
+                    return true;
+                }
+            }
+        }
+    }
+}
+
 __kernel void search(    const uint block0, const uint block1, const uint block2,
                         const uint state0, const uint state1, const uint state2, const uint state3,
                         const uint state4, const uint state5, const uint state6, const uint state7,
@@ -209,13 +289,13 @@
     G+=0x1f83d9ab;
     H+=0x5be0cd19;
 
-    if((H.x==0) && (bytereverse(G.x)<=target))
+    if((H.x==0) && reversedSmallerThan(G.x, target)) // (bytereverse(G.x)<=target)
     {
         output[0] = 1;
         output[1] = nonce.x;
     }
 
-    if((H.y==0) && (bytereverse(G.y)<=target))
+    if((H.y==0) && reversedSmallerThan(G.y, target)) // (bytereverse(G.y)<=target)
     {
         output[0] = 1;
         output[1] = nonce.y;

There are probably some optimisations to make Smiley
1711645379
Hero Member
*
Offline Offline

Posts: 1711645379

View Profile Personal Message (Offline)

Ignore
1711645379
Reply with quote  #2

1711645379
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711645379
Hero Member
*
Offline Offline

Posts: 1711645379

View Profile Personal Message (Offline)

Ignore
1711645379
Reply with quote  #2

1711645379
Report to moderator
m0mchil (OP)
Full Member
***
Offline Offline

Activity: 171
Merit: 127


View Profile
October 19, 2010, 02:54:54 PM
 #82

Thanks Jef! There is new version that should work on Nvidia now. I also changed default getwork request rate to 5 seconds to reduce the risk of solving stale block. The patch itself has now one more check to not show 'proof of work found' in this case.

Can someone with Nvidia please test this, it should resolve the 'code selection failed to select' issue.

jef.blanc
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
October 19, 2010, 04:27:11 PM
Last edit: October 19, 2010, 08:29:53 PM by jef.blanc
 #83

you’re welcome  Smiley
Thank you for your better code design than mine Grin

The new code you provided runs on my computer.
sandos
Sr. Member
****
Offline Offline

Activity: 440
Merit: 250


#SWGT CERTIK Audited


View Profile
October 19, 2010, 08:29:01 PM
 #84

you’re welcome  Smiley

The new code you provided runs on my computer.


OpenCL-wise it seems to work fine on my 9400 GT, now I just have trouble compiling bitcoind Smiley

sandos
Sr. Member
****
Offline Offline

Activity: 440
Merit: 250


#SWGT CERTIK Audited


View Profile
October 19, 2010, 09:18:55 PM
 #85

you’re welcome  Smiley

The new code you provided runs on my computer.


OpenCL-wise it seems to work fine on my 9400 GT, now I just have trouble compiling bitcoind Smiley

Ah, it worked it was just using another port.

I knew the 9400 GT would be slow relative to other cards, but maybe not this slow: I get 1800kh/s, which is slower than my cpu =)


I was hoping to maybe double performance, but oh well.

jef.blanc
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
October 20, 2010, 07:57:30 AM
 #86

Only 1800kh/s ? It seems very low in comparison to my 9800 GT which give me about 15200 kh/s

Perhaps for some strange reason your GPU is not fully used, if your graphical card gives you this information you can check the GPU load with GPU-Z, in the "Sensors" tab (http://www.techpowerup.com/gpuz/).
ArtForz
Sr. Member
****
Offline Offline

Activity: 406
Merit: 257


View Profile
October 20, 2010, 02:54:41 PM
 #87

9400GT 16SPs @ 1.4GHz
9800GT 112SPs @ 1.5GHz
-> a 9800GT is about 7.5x 9400GT ...

bitcoin: 1Fb77Xq5ePFER8GtKRn2KDbDTVpJKfKmpz
i0coin: jNdvyvd6v6gV3kVJLD7HsB5ZwHyHwAkfdw
jef.blanc
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
October 20, 2010, 06:08:23 PM
 #88

ah ... yes, I didn't check that before talking  Embarrassed
1800 * 7.5 = 13500 ... no so far than my 15200 ... logical then in fact.
Guybrush01
Newbie
*
Offline Offline

Activity: 20
Merit: 0



View Profile
October 21, 2010, 01:58:35 AM
 #89

Hi there!

Trying to use this, but here is the error I see:
Code:
D:\pycuda>poclbm.exe
No device specified, you may use -d to specify one of the following

Traceback (most recent call last):
  File "poclbm.py", line 58, in <module>
  File "pyopencl\__init__.pyc", line 138, in program_build
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce GTX 470' at 0x2d112d8>:

:52: error: incompatible type assigning 'int', expected 'uint2'
        work[5]=0x00000000;
               ^~~~~~~~~~~
:53: error: incompatible type assigning 'int', expected 'uint2'
        work[6]=0x00000000;
               ^~~~~~~~~~~
:54: error: incompatible type assigning 'int', expected 'uint2'
        work[7]=0x00000000;
               ^~~~~~~~~~~
:55: error: incompatible type assigning 'int', expected 'uint2'
        work[8]=0x00000000;
               ^~~~~~~~~~~
:56: error: incompatible type assigning 'int', expected 'uint2'
        work[9]=0x00000000;
               ^~~~~~~~~~~
:57: error: incompatible type assigning 'int', expected 'uint2'
        work[10]=0x00000000;
                ^~~~~~~~~~~
:58: error: incompatible type assigning 'int', expected 'uint2'
        work[11]=0x00000000;
                ^~~~~~~~~~~
:59: error: incompatible type assigning 'int', expected 'uint2'
        work[12]=0x00000000;
                ^~~~~~~~~~~
:60: error: incompatible type assigning 'int', expected 'uint2'
        work[13]=0x00000000;
                ^~~~~~~~~~~
:61: error: incompatible type assigning 'int', expected 'uint2'
        work[14]=0x00000000;
                ^~~~~~~~~~~
:62: error: incompatible type assigning 'int', expected 'uint2'
        work[15]=0x00000280;
                ^~~~~~~~~~~
:141: error: incompatible type assigning 'int', expected 'uint2'
        work[9]=0x00000000;
               ^~~~~~~~~~~
:142: error: incompatible type assigning 'int', expected 'uint2'
        work[10]=0x00000000;
                ^~~~~~~~~~~
:143: error: incompatible type assigning 'int', expected 'uint2'
        work[11]=0x00000000;
                ^~~~~~~~~~~
:144: error: incompatible type assigning 'int', expected 'uint2'
        work[12]=0x00000000;
                ^~~~~~~~~~~
:145: error: incompatible type assigning 'int', expected 'uint2'
        work[13]=0x00000000;
                ^~~~~~~~~~~
:146: error: incompatible type assigning 'int', expected 'uint2'
        work[14]=0x00000000;
                ^~~~~~~~~~~
:147: error: incompatible type assigning 'int', expected 'uint2'
        work[15]=0x00000100;
                ^~~~~~~~~~~
:149: error: incompatible type assigning 'int', expected 'uint2'
        A=0x6a09e667;
         ^~~~~~~~~~~
:151: error: incompatible type assigning 'int', expected 'uint2'
        C=0x3c6ef372;
         ^~~~~~~~~~~
:153: error: incompatible type assigning 'int', expected 'uint2'
        E=0x510e527f;
         ^~~~~~~~~~~
:155: error: incompatible type assigning 'int', expected 'uint2'
        G=0x1f83d9ab;
         ^~~~~~~~~~~
:156: error: incompatible type assigning 'int', expected 'uint2'
        H=0x5be0cd19;

Wish I were smart enough to understand what that means!

Any ideas?
jef.blanc
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
October 21, 2010, 07:16:26 AM
Last edit: October 21, 2010, 10:31:22 AM by jef.blanc
 #90

Hello, it is the errors I had when running poclbm from poclbm_py2exe.7z with the original OpenCL.dll inside.

The 7z archive contains the dll from the ATI driver, so using an nvidia card I had to replace this dll by the one provided by my nvidia driver which is in C:\Windows\System32\

Is it your case, executing poclbm from the package poclbm_py2exe.7z ?

The things I had to do for using poclbm :
- building pyopencl for my system, I installed the latest CUDA Toolkit from here http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows%20XP,%20Windows%20Vista%20and%20Windows7 to build pyopencl.
- using the latest driver (Developer Drivers) from here http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows%20XP,%20Windows%20Vista%20and%20Windows7 , I had the following errors without that :
Code:
ImportError: DLL load failed: La procÚdure spÚcifiÚe est introuvable.
- using the latest version of poclbm from http://github.com/m0mchil/poclbm , a correction has been made to make poclbm running on nvidia GPU without errors
LZ
Legendary
*
Offline Offline

Activity: 1722
Merit: 1072


P2P Cryptocurrency


View Profile
October 21, 2010, 08:22:49 AM
Last edit: January 22, 2018, 08:37:37 AM by LZ
 #91

Can someone give direct links to NVIDIA OpenCL 1.1 drivers?

My OpenPGP fingerprint: 5099EB8C0F2E68C63B4ECBB9A9D0993E04143362
jef.blanc
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
October 21, 2010, 10:29:27 AM
 #92

Can someone give direct links to NVIDIA OpenCL 1.1 drivers?
I didn't success to found a link to this driver (and I found two cd iso on bittorent, but I don't try to get them) ...

But Nvidia has apparently merge his OpenCL implementation in his CUDA Toolkit and drivers. The latest "Developer Drivers" from the "CUDA Toolkit 3.2 RC" page contains an OpenCL 1.1 compliant* driver (it is the one I use).

*at least concerning the openCL 1.1 functions needed by pyopencl

http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html
Scroll down in the page to found the drivers for windows, linux (some distributions), and MacOS)

Note : GPU Caps Viewer shows me OpenCL 1.0, but it works anyway.
m0mchil (OP)
Full Member
***
Offline Offline

Activity: 171
Merit: 127


View Profile
October 21, 2010, 01:45:40 PM
Last edit: November 30, 2010, 04:22:34 PM by m0mchil
 #93

bitcoin-getwork-svn170-win32.7z

poclbm_win32_exe.7z Wrong kernel was packed in the py2exe version, now fixed. Removed AMD OpenCL.dll to prevent conflicts.

I also reverted back to scalars. With vectors it was faster, but required hardware specific tweaks and was making it slower for others. Unfortunately OpenCL is not mature enough to provide means of automatic performance optimization.

BitLex
Hero Member
*****
Offline Offline

Activity: 532
Merit: 505


View Profile
October 21, 2010, 03:02:13 PM
 #94

seems to work now on my GTX260

hashcount results are similar to puddinpops cuda-code,
both get around 45Mhash/s.



Code:
C:\Documents and Settings\Administrator\Desktop\bitcoin_stuff\OpenCL\poclbm_win3
2_exe>poclbm --user=*** --pass=***
No device specified, you may use -d to specify one of the following

44120 khash/s

kwukduck
Legendary
*
Offline Offline

Activity: 1937
Merit: 1001


View Profile
October 21, 2010, 04:58:22 PM
 #95

I'm not sure if and whats going wrong, i started bitcoin in server mode. start poclbm with user and pass, then it shows khash/s for about 5 seconds then pops back to asking username and pass. i can keep doing that over and over.

14b8PdeWLqK3yi3PrNHMmCvSmvDEKEBh3E
kwukduck
Legendary
*
Offline Offline

Activity: 1937
Merit: 1001


View Profile
October 21, 2010, 08:15:51 PM
 #96

tnx, working fine now, forgot the username.


On my other pc i get this error "ImportError: DLL load failed: The specified module could not be found."

I already updated to latest graphics drivers and nvidia cuda toolkit..

Geforce 9800 GX2 @ win7 32 bit

i also noticed that the old puddingpop cuda client only puts out 2000khash/s on that gpu... i should get at least ten times as much...

any ideas?

14b8PdeWLqK3yi3PrNHMmCvSmvDEKEBh3E
jef.blanc
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
October 21, 2010, 08:43:18 PM
Last edit: October 21, 2010, 08:57:47 PM by jef.blanc
 #97

hum, you can check with dependency walker (http://www.dependencywalker.com/) that your OpenCL.dll file (in C:\Windows\System32\) provides the OpenCL 1.1 functions needed by pyopencl :

clCreateSubBuffer
clCreateUserEvent
clEnqueueCopyBufferRect
clEnqueueReadBufferRect
clEnqueueWriteBufferRect
clSetUserEventStatus

If not, then either the driver installation has failed, or it is not the good driver.
Otherwise ... I don't know  Huh

Edit : you can check with GPU Caps Viewer if this GPU really manage OpenCL, because 2000 kh/s is what is currently made by the CPU alone.
The Geforce 9800 GX2 is if I'm rigth two 8800 GTX functionning in pair, not sure that they manage OpenCL.
gim
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
October 22, 2010, 10:16:18 AM
Last edit: October 22, 2010, 11:18:08 AM by gim
 #98

Hi,

First, thanks for this wonderful miner.
I managed to make it work on linux (lib64 only) with a 8600 GT
(A bit disappointed about my card performance though: 5300kh/s)

:52: error: incompatible type assigning 'int', expected 'uint2'
        work[5]=0x00000000;
               ^~~~~~~~~~~
Any ideas?

Got this error too, just put some "u"s at the end of all these uint constants. Example:
Code:
       work[5]=0x00000000u;
L29Ah
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
October 23, 2010, 08:51:04 AM
 #99

Just pulled a fresh version and got this:

$ python2.6 poclbm.py -u l29ah --pass=hackme
No device specified, you may use -d to specify one of the following

Traceback (most recent call last):
  File "poclbm.py", line 133, in <module>
    target[6], pack('I', base), output_buf)
  File "/usr/lib64/python2.6/site-packages/pyopencl/__init__.py", line 158, in kernel_call
    self.set_arg(i, arg)
TypeError: expected a readable buffer object
gim
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
October 23, 2010, 10:00:53 AM
 #100

  File "/usr/lib64/python2.6/site-packages/pyopencl/__init__.py", line 158, in kernel_call
    self.set_arg(i, arg)
TypeError: expected a readable buffer object

Upgrade to pyopencl-0.92.
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!