kozyilmaz / nheqminer-macos

nheqminer for macOS with AVX and CUDA
85 stars 9 forks source link

GeForce GTX 750 Ti 2Gb : CUDA: failed to alloc memory (version v0.5c) #13

Open locmer opened 7 years ago

locmer commented 7 years ago

Getting the following error when trying to use a GeForce GTX 750 Ti 2Gb

./nheqminer-gpu -b -cd 0

==================== www.nicehash.com ====================
    Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
    Special thanks to tromp, xenoncat and djeZo for providing 
      optimized CPU and CUDA equihash solvers.
==================== www.nicehash.com ====================

Setting log level to 2 [22:11:06][0x00007fff96be73c0] Using SSE2: YES [22:11:06][0x00007fff96be73c0] Using AVX: YES [22:11:06][0x00007fff96be73c0] Using AVX2: YES [22:11:06][0x00007fff96be73c0] Benchmarking CUDA worker (CUDA-DJEZO) GeForce GTX 750 Ti (#0) M=2 [22:11:06][0x0000700001afe000] CUDA: failed to alloc memory machine-a:miner user1$ ./nheqminer-gpu -ci

==================== www.nicehash.com ====================
    Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
    Special thanks to tromp, xenoncat and djeZo for providing 
      optimized CPU and CUDA equihash solvers.
==================== www.nicehash.com ====================

Number of CUDA devices found: 1

0 GeForce GTX 750 Ti | SM version: 5.0 | SM count: 5

machine-a:miner user1$

uname -a Darwin machin-a-iMac.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

kozyilmaz commented 7 years ago

@locmer I am assuming you are getting "out of memory" error while doing real mining too, not only in benchmarking. In that case can you please also test with:

  1. a setup where all GPU related workloads are minimised
  2. nheqminer-old

Thanks!

locmer commented 7 years ago

@kozyilmaz I am a developer but not very experienced with crypto currency yet (so take my input with that in mind)

Mining with just cpu works just fine (I think):

./nheqminer-cpu -l equihash.eu.nicehash.com:3357 -u [redacted] -t 4

==================== www.nicehash.com ====================
    Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
    Special thanks to tromp, xenoncat and djeZo for providing 
      optimized CPU and CUDA equihash solvers.
==================== www.nicehash.com ====================

Setting log level to 2 [10:30:45][0x00007fff96be73c0] Using SSE2: YES [10:30:45][0x00007fff96be73c0] Using AVX: YES [10:30:45][0x00007fff96be73c0] Using AVX2: YES [10:30:45][0x0000700005f36000] stratum | Starting miner [10:30:45][0x0000700005fb9000] miner#0 | Starting thread #0 (CPU-XENONCAT-AVX2) [10:30:45][0x0000700006142000] miner#3 | Starting thread #3 (CPU-XENONCAT-AVX2) [10:30:45][0x0000700005f36000] stratum | Connecting to stratum server equihash.eu.nicehash.com:3357 [10:30:45][0x000070000603c000] miner#1 | Starting thread #1 (CPU-XENONCAT-AVX2) [10:30:45][0x00007000060bf000] miner#2 | Starting thread #2 (CPU-XENONCAT-AVX2) [10:30:45][0x0000700005f36000] stratum | Connected! [10:30:45][0x0000700005f36000] stratum | Subscribed to stratum server [10:30:45][0x0000700005f36000] miner | Extranonce is f4d020000000000000000000000000000f [10:30:45][0x0000700005f36000] stratum | Authorized worker 3HQDfaWG5JZcnc6J8EJduY2ocNmWuJTM53 [10:30:45][0x0000700005f36000] stratum | Target set to 0007878787800000000000000000000000000000000000000000000000000000 [10:30:45][0x0000700005f36000] stratum | Received new job #00000024b3898278 [10:30:47][0x0000700005f36000] stratum | Received new job #00000024b38a2571 [10:30:53][0x0000700005f36000] stratum | Received new job #00000024b38a8fd7 [10:30:57][0x00007fff96be73c0] Speed [15 sec]: 12.01 I/s, 22.7331 Sols/s [10:31:08][0x00007fff96be73c0] Speed [15 sec]: 15.2 I/s, 27.8 Sols/s [10:31:20][0x00007fff96be73c0] Speed [15 sec]: 16.6667 I/s, 32.1333 Sols/s [10:31:24][0x0000700005f36000] stratum | Received new job #00000024b38bfec4 [10:31:32][0x00007fff96be73c0] Speed [15 sec]: 15.7333 I/s, 29.4667 Sols/s [10:31:44][0x00007fff96be73c0] Speed [15 sec]: 16.8667 I/s, 28.7333 Sols/s

But of course I'd like to use my GPU:

./nheqminer-gpu -l equihash.eu.nicehash.com:3357 -u [redacted] -t 4 -cd 0

==================== www.nicehash.com ====================
    Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
    Special thanks to tromp, xenoncat and djeZo for providing 
      optimized CPU and CUDA equihash solvers.
==================== www.nicehash.com ====================

Setting log level to 2 [10:28:22][0x00007fff96be73c0] Using SSE2: YES [10:28:22][0x00007fff96be73c0] Using AVX: YES [10:28:22][0x00007fff96be73c0] Using AVX2: YES [10:28:22][0x00007000070d5000] stratum | Starting miner [10:28:22][0x00007000070d5000] stratum | Connecting to stratum server equihash.eu.nicehash.com:3357 [10:28:22][0x0000700007158000] miner#0 | Starting thread #0 (CPU-XENONCAT-AVX2) [10:28:22][0x00007000072e1000] miner#3 | Starting thread #3 (CPU-XENONCAT-AVX2) [10:28:22][0x0000700007364000] miner#4 | Starting thread #4 (CUDA-DJEZO) GeForce GTX 750 Ti (#0) M=2 [10:28:22][0x00007000071db000] miner#1 | Starting thread #1 (CPU-XENONCAT-AVX2) [10:28:22][0x000070000725e000] miner#2 | Starting thread #2 (CPU-XENONCAT-AVX2) [10:28:22][0x00007000070d5000] stratum | Connected! [10:28:22][0x0000700007364000] miner#4 | CUDA: failed to alloc memory

and also the -old fails:

./nheqminer-old -l equihash.eu.nicehash.com:3357 -u 3HQDfaWG5JZcnc6J8EJduY2ocNmWuJTM53 -t 4 -cd 0

==================== www.nicehash.com ====================
    Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
    Special thanks to tromp, xenoncat and djeZo for providing 
      optimized CPU and CUDA equihash solvers.
==================== www.nicehash.com ====================

Setting log level to 2 [10:28:41][0x00007fff96be73c0] Using SSE2: YES [10:28:41][0x00007fff96be73c0] Using AVX: YES [10:28:41][0x00007fff96be73c0] Using AVX2: YES [10:28:41][0x000070000c421000] stratum | Starting miner [10:28:41][0x000070000c421000] stratum | Connecting to stratum server equihash.eu.nicehash.com:3357 [10:28:41][0x000070000c4a4000] miner#0 | Starting thread #0 (CPU-XENONCAT-AVX2) [10:28:41][0x000070000c527000] miner#1 | Starting thread #1 (CPU-XENONCAT-AVX2) [10:28:41][0x000070000c62d000] miner#3 | Starting thread #3 (CPU-XENONCAT-AVX2) [10:28:41][0x000070000c5aa000] miner#2 | Starting thread #2 (CPU-XENONCAT-AVX2) [10:28:41][0x000070000c6b0000] miner#4 | Starting thread #4 (CUDA-DJEZO) GeForce GTX 750 Ti (#0) M=2 [10:28:41][0x000070000c421000] stratum | Connected! [10:28:41][0x000070000c421000] stratum | Subscribed to stratum server [10:28:41][0x000070000c421000] miner | Extranonce is 0ecf200000000000000000000000000099 [10:28:41][0x000070000c421000] stratum | Authorized worker 3HQDfaWG5JZcnc6J8EJduY2ocNmWuJTM53 [10:28:41][0x000070000c6b0000] miner#4 | CUDA: failed to alloc memory

Is this what you were asking?

locmer commented 7 years ago

Some more data points, may be it helps. I tested some of the available options and with some it seems to work but I do not see a lot of performance difference then with CPU only. So I wonder if it works effectively:

./nheqminer-old -cv 1 -l equihash.eu.nicehash.com:3357 -u 3HQDfaWG5JZcnc6J8EJduY2ocNmWuJTM53 -t 4 -cd 0

==================== www.nicehash.com ====================
    Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
    Special thanks to tromp, xenoncat and djeZo for providing 
      optimized CPU and CUDA equihash solvers.
==================== www.nicehash.com ====================

Setting log level to 2 [23:53:29][0x00007fff96be73c0] Using SSE2: YES [23:53:29][0x00007fff96be73c0] Using AVX: YES [23:53:29][0x00007fff96be73c0] Using AVX2: YES [23:53:29][0x0000700004e07000] stratum | Starting miner [23:53:29][0x0000700004e8a000] miner#0 | Starting thread #0 (CPU-XENONCAT-AVX2) [23:53:29][0x0000700004f0d000] miner#1 | Starting thread #1 (CPU-XENONCAT-AVX2) [23:53:29][0x0000700005013000] miner#3 | Starting thread #3 (CPU-XENONCAT-AVX2) [23:53:29][0x0000700005096000] miner#4 | Starting thread #4 (cuda_tromp_STUB) [23:53:29][0x0000700004f90000] miner#2 | Starting thread #2 (CPU-XENONCAT-AVX2) [23:53:29][0x0000700004e07000] stratum | Connecting to stratum server equihash.eu.nicehash.com:3357 [23:53:29][0x0000700004e07000] stratum | Connected! [23:53:29][0x0000700004e07000] stratum | Subscribed to stratum server [23:53:29][0x0000700004e07000] miner | Extranonce is d6f8ff4f00000000000000004ffff8d507 [23:53:29][0x0000700004e07000] stratum | Authorized worker 3HQDfaWG5JZcnc6J8EJduY2ocNmWuJTM53 [23:53:29][0x0000700004e07000] stratum | Target set to 0007878787800000000000000000000000000000000000000000000000000000 [23:53:29][0x0000700004e07000] stratum | Received new job #00000024b8165af6 [23:53:40][0x00007fff96be73c0] Speed [15 sec]: 5.86207 I/s, 10.7759 Sols/s [23:53:45][0x0000700004e07000] stratum | Received new job #00000024b8168dc2 [23:53:52][0x00007fff96be73c0] Speed [15 sec]: 6.13333 I/s, 11.7333 Sols/s

kozyilmaz commented 7 years ago

Hey @locmer thanks for testing it all out. Somehow CUDA can not allocate memory which is odd (I got a a GTX680 and GTX960 with 2GB working for weeks). It is also visible in your test: ./nheqminer-old -l equihash.eu.nicehash.com:3357 -u 3HQDfaWG5JZcnc6J8EJduY2ocNmWuJTM53 -t 4 -cd 0

Your last test ./nheqminer-old -cv 1 -l equihash.eu.nicehash.com:3357 -u 3HQDfaWG5JZcnc6J8EJduY2ocNmWuJTM53 -t 4 -cd 0 kind of works (only CPU is mining) because it uses a dummy CUDA solver (cuda_tromp_STUB) so it is not much of a help.

The command that should be working in your case is ./nheqminer-gpu -l equihash.eu.nicehash.com:3357 -u 3HQDfaWG5JZcnc6J8EJduY2ocNmWuJTM53 -cd 0 but because we get the memory error maybe we can try manual allocation options.

If you run ./nheqminer-gpu -h you will see blocks and threads option (-cb and -ct). Can you try it out to find a working case for example (like -cd 0 -cb 8 -ct 32)? Maybe default values do not work properly.

By the way is this a vanilla GPU or does it contain a modified ROM or something like that?

locmer commented 7 years ago

@kozyilmaz This a bog standard GPU.

Tweaking -cd 0 -cb 8 -ct 32 does make a slight difference (It fails at another point) See below. And it tweaked the CT and CB number (8-16/4-8/4-4/1-1) but that does seem to make a difference same failure. On upside is for the short time it runs it seems to function with a lot better performance numbers (makes it more painful :-)

Looks like I am not the only one, and it is not tied to Mac OS X, and not progress since January :(

https://github.com/nicehash/nheqminer/issues/223

./nheqminer-gpu -l zec-eu.suprnova.cc:2142 -u locmer.Mac -t 7 -cd 0 -cb 8 -ct 16

==================== www.nicehash.com ====================
    Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
    Special thanks to tromp, xenoncat and djeZo for providing 
      optimized CPU and CUDA equihash solvers.
==================== www.nicehash.com ====================

Setting log level to 2 [22:05:29][0x00007fff96be73c0] Using SSE2: YES [22:05:29][0x00007fff96be73c0] Using AVX: YES [22:05:29][0x00007fff96be73c0] Using AVX2: YES [22:05:29][0x00007000023b3000] stratum | Starting miner [22:05:29][0x0000700002436000] miner#0 | Starting thread #0 (CPU-XENONCAT-AVX2) [22:05:29][0x000070000253c000] miner#2 | Starting thread #2 (CPU-XENONCAT-AVX2) [22:05:29][0x00007000025bf000] miner#3 | Starting thread #3 (CPU-XENONCAT-AVX2) [22:05:29][0x00007000023b3000] stratum | Connecting to stratum server zec-eu.suprnova.cc:2142 [22:05:29][0x0000700002748000] miner#6 | Starting thread #6 (CPU-XENONCAT-AVX2) [22:05:29][0x0000700002642000] miner#4 | Starting thread #4 (CPU-XENONCAT-AVX2) [22:05:29][0x00007000026c5000] miner#5 | Starting thread #5 (CPU-XENONCAT-AVX2) [22:05:29][0x00007000024b9000] miner#1 | Starting thread #1 (CPU-XENONCAT-AVX2) [22:05:29][0x00007000027cb000] miner#7 | Starting thread #7 (CUDA-DJEZO) GeForce GTX 750 Ti (#0) M=2 [22:05:29][0x00007000023b3000] stratum | Connected! [22:05:29][0x00007000023b3000] stratum | Subscribed to stratum server [22:05:29][0x00007000023b3000] miner | Extranonce is a882e30f00000000000000000fe382a7 [22:05:29][0x00007000023b3000] stratum | Target set to 003c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c [22:05:29][0x00007000023b3000] stratum | Received new job #2859 [22:05:29][0x00007000023b3000] stratum | Authorized worker locmer.Mac [22:05:33][0x00007000027cb000] stratum | Submitting share #4, nonce 0000000000000000000000000700006a [22:05:33][0x00007000023b3000] stratum | Accepted share #4 [22:05:38][0x00007000027cb000] stratum | Submitting share #5, nonce 00000000000000000000000007000110 [22:05:38][0x00007000023b3000] stratum | Accepted share #5 [22:05:41][0x00007fff96be73c0] Speed [15 sec]: 47.268 I/s, 88.2914 Sols/s [22:05:47][0x00007000027cb000] miner#7 | CUDA error 'an illegal memory access was encountered' in func 'solve' line 2114

I am guessing this puts this issue outside the realm macOS space and to CUDA driver/BIOS or nheqminer core code?

kozyilmaz commented 7 years ago

@locmer indeed, it really seems this issue is GTX 750Ti specific, good catch in nheqminer issues. This line seems to be giving the error (after patch lines are shifted) https://github.com/nicehash/nheqminer/blob/b9900ff8e3c6f8e5a46af18db454f2a2082d9f46/cuda_djezo/equi_miner.cu#L2095

I'll look for a spare 750Ti among my friends, I'll update the issue if I find one. Btw are you using CUDA 9?

locmer commented 7 years ago

@kozyilmaz This is the exact model I have

EVGA 02G-P4-3751-KR GeForce GTX 750 Ti 2GB GDDR5

CUDA Driver Version: 9.0.214

screenshot 2017-10-28 23 12 24

Bigsy commented 6 years ago

I have this exact issue on arch linux with cuda V9.0.176 running a Quadro M1000M which unsurprisingly is based on early pascal GM107 same as a GTX 750ti. I suspect anything on this arch is having a problem.

kozyilmaz commented 6 years ago

Thanks for the info @Bigsy, you are right arch looks problematic. I am looking for GTX745,750,750TI so far but no luck yet.

Lumiboy commented 6 years ago

@locmer I got the same issue (CUDA: failed to alloc memory).. did different -cd 0 -cb 8 -ct 16 etc. What I did was I disconnected my Thunderbolt Display and now it's working (I had two displays) 😅 ./nheqminer-old -l eu1-zcash.flypool.org:3333 -u t1KTxk4tAPUp428MH18vu6Ruz2WEDGFccNX.mac -t 8 -cd 0

@kozyilmaz Lol, I did stop it and resumed and got same error.. but when I connected and disconnected the Thunderbolt display it works.. weird..

kozyilmaz commented 6 years ago

oh really :) @Lumiboy what was the configuration of your displays? both 4K, 1080p?

Lumiboy commented 6 years ago

@kozyilmaz both 2560x1440

Bigsy commented 6 years ago

Interesting.. the laptop I was trying this on did have a 4k display connected via thunderbolt. Unfortunately, I don't have access to this combo at preset to retest.

mstei4176 commented 6 years ago

OS: High Sierra GPU: Nvidia Quadro K1200, 4GB

Number of CUDA devices found: 1

0 Quadro K1200 | SM version: 5.0 | SM count: 4

I can kick it off, but if fails shortly:

./nheqminer-gpu -cd 0 -ct 0 -l zec.pool.minergate.com:3357 -u UserName

==================== www.nicehash.com ====================
    Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
    Special thanks to tromp, xenoncat and djeZo for providing 
      optimized CPU and CUDA equihash solvers.
==================== www.nicehash.com ====================

Setting log level to 2 [22:25:52][0x00007fff91d2e340] Using SSE2: YES [22:25:52][0x00007fff91d2e340] Using AVX: NO [22:25:52][0x00007fff91d2e340] Using AVX2: NO [22:25:52][0x0000700006746000] stratum | Starting miner [22:26:04][0x00007fff91d2e340] Speed [15 sec]: 25.1181 I/s, 45.6769 Sols/s [22:26:16][0x00007fff91d2e340] Speed [15 sec]: 27.8 I/s, 50.8 Sols/s [22:26:26][0x00007000067c9000] miner#0 | CUDA error 'an illegal memory access was encountered' in func 'solve' line 2114