tromp / cuckoo

a memory-bound graph-theoretic proof-of-work system
Other
822 stars 173 forks source link

not work on NVIDIA GeForce GTX 750 Ti #75

Closed nevata closed 5 years ago

nevata commented 5 years ago

-d 0 -E 0 -h "" -m 176 -n 0 -r 1 -U 4096 -u 256 -v 128 -w 512 -y 1024 -Z 1024 -z 1024

The thread 0x1c84 has exited with code 0 (0x0). The thread 0x1160 has exited with code 0 (0x0). The thread 0x2a30 has exited with code 0 (0x0). First-chance exception at 0x01049349 in vs2013.exe: 0xC0000005: Access violation reading location 0x08812770. Unhandled exception at 0x01049349 in vs2013.exe: 0xC0000005: Access violation reading location 0x08812770.

class cuckoo_hash { public: u64 *cuckoo;

cuckoo_hash() { cuckoo = new u64[CUCKOO_SIZE]; } ~cuckoo_hash() { delete[] cuckoo; } void set(node_t u, node_t v) { u64 niew = (u64)u << NODEBITS | v; for (node_t ui = u >> IDXSHIFT; ; ui = (ui+1) & CUCKOO_MASK) { u64 old = cuckoo[ui]; //error at if (old == 0 || (old >> NODEBITS) == (u & KEYMASK)) { cuckoo[ui] = niew; return; } } } node_t operator[](node_t u) const { for (node_t ui = u >> IDXSHIFT; ; ui = (ui+1) & CUCKOO_MASK) { u64 cu = cuckoo[ui]; //error at if (!cu) return 0; if ((cu >> NODEBITS) == (u & KEYMASK)) { assert(((ui - (u >> IDXSHIFT)) & CUCKOO_MASK) < MAXDRIFT); return (node_t)(cu & NODEMASK); } } } };

tromp commented 5 years ago

What executable did you run? src/cuckoo/cuda29 ? What are your first lines of output? I get

$ ./cuda29 -d 0 -E 0 -h "" -m 176 -n 0 -r 1 -U 4096 -u 256 -v 128 -w 512 -y 1024 -Z 1024 -z 1024 GeForce GTX 1080 Ti with 10GB @ 352 bits x 5505MHz Looking for 42-cycle on cuckoo30("",0) with 50% edges, 64*64 buckets, 176 trims, and 64 thread blocks. Using 6976MB of global memory. nonce 0 k0 k1 k2 k3 a34c6a2bdaa03a14 d736650ae53eee9e 9a22f05e3bffed5e b8d55478fa3a606d Seeding completed in 545 + 307 ms 4-cycle found 2-cycle found 16-cycle found 26-cycle found 40-cycle found findcycles edges 70214 time 16 ms total 2010 ms Time: 2010 ms 0 total solutions

Note that this needs 7 GB to run. Does your GPU have that much?

nevata commented 5 years ago

Thank you, I use GTX 1080 has error:

C:\DevRoot\cuckoo\vs2013\x64\Debug>vs2013.exe -d 0 -E 0 -h "" -m 176 -n 0 -r 1 -U 4096 -u 256 -v 128 -w 512 -y 1024 -Z 1024 -z 1024 GeForce GTX 1080 with 8192MB @ 256 bits x 5005MHz Looking for 42-cycle on cuckoo30("",0) with 50% edges, 64*64 buckets, 176 trims, and 64 thread blocks. MALLOC: -1275068416 Using 6976MB of global memory. Error initialising trimmer. Aborting. Reason: Device 0 GPUassert: out of memory C:/DevRoot/cuckoo/src/cuckoo/mean.cu 389

tromp commented 5 years ago

The 1080 has more than 7 GB of memory, so it shouldn't be out. I don't know where that MALLOC: -1275068416 comes from. Apparently the solver doesn't build correctly under Windows. But I have no experience with or way to diagnose Windows problems.

timolson commented 5 years ago

Just a guess... Looks like overflow of a signed 32-bit integer. Make sure you’re building on a 64-bit platform. 32-bit addressing can only go up to 4GB.

On Thu, Dec 27, 2018 at 2:02 AM John Tromp notifications@github.com wrote:

The 1080 has more than 7 GB of memory, so it shouldn't be out. I don't know where that MALLOC: -1275068416 comes from. Apparently the solver doesn't build correctly under Windows. But I have no experience with or way to diagnose Windows problems.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tromp/cuckoo/issues/75#issuecomment-450119714, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnlW8CqNJqCUOqR7HknNJTcmjW5lsl5ks5u9JqjgaJpZM4Zg6sS .