While not particularly competitive in coin mining performance, mining with an Nvidia card can still be a fun way to dabble in the world of cryptocurrency without investing in any new hardware.
This guide assumes you have Nvidia's CUDA setup. If you don't, you can follow my other guide.
There are several dependencies we need to get squared away:
# yum install automake gcc gcc-c++ glibc-devel libcurl-devel openssl-devel git
Now, checkout the latest copy of CudaMiner into the directory you want to work in (note, people have reported all manner of performance variations between different versions of CudaMiner, feel free to play around with versions):
$ git clone https://github.com/cbuchner1/CudaMiner.gitThis should have cloned the CudaMiner source into a 'CudaMiner' directory.
Now, export the CUDA environment variables, and do an autogen and configure:
$ export PATH=/usr/local/cuda-6.0/bin:$PATH $ export LD_LIBRARY_PATH=/usr/local/cuda-6.0/lib64:$LD_LIBRARY_PATH $ cd CudaMiner/ $ ./autogen.sh $ ./configure
The Makefile generated by the above does not properly pull in the use dynamic libraries linker option ('-ldl'), so we need to modify the Makefile.
Open the Makefile in your text editor of choice, and edit the LDFLAGS line to include '-ldl'. My generated Makefile didn't specify any LDFLAGS, so my LDFLAGS line looks like the one below:
LDFLAGS = -ldl
Once you have made the above changes you are ready to build:
$ makeWhen compiling is complete, you can test your install:
$ ./cudaminer -d 0 -i 0 --benchmarkIf you see something like:
*** CudaMiner for nVidia GPUs by Christian Buchner *** This is version 2013-12-18 (beta) based on pooler-cpuminer 2.3.2 (c) 2010 Jeff Garzik, 2012 pooler Cuda additions Copyright 2013 Christian Buchner My donation address: LKS1WDKGED647msBQfLBHV3Ls8sveGncnm [2013-12-18 21:34:30] 1 miner threads started, using 'scrypt' algorithm. [2013-12-18 21:34:59] GPU #0: GeForce GTX 560 with compute capability 2.1 [2013-12-18 21:34:59] GPU #0: interactive: 0, tex-cache: 0 , single-alloc: 0 [2013-12-18 21:34:59] GPU #0: Performing auto-tuning (Patience...) [2013-12-18 21:34:59] GPU #0: maximum warps: 409 [2013-12-18 21:36:55] GPU #0: 139.52 khash/s with configuration F84x4 [2013-12-18 21:36:55] GPU #0: using launch configuration F84x4 [2013-12-18 21:36:55] GPU #0: GeForce GTX 560, 10752 hashes, 0.07 khash/s [2013-12-18 21:36:55] Total: 0.07 khash/s [2013-12-18 21:36:55] GPU #0: GeForce GTX 560, 10752 hashes, 66.38 khash/s [2013-12-18 21:36:55] Total: 66.38 khash/s [2013-12-18 21:36:58] GPU #0: GeForce GTX 560, 333312 hashes, 130.03 khash/s [2013-12-18 21:36:58] Total: 130.03 khash/s
You are ready to start mining. Google up a mining guide for your scrypt coin of choice, and have a ball. Keep in mind, you will have to eventually either set up the CUDA paths in your '.bashrc', or you will have to export them every time you want to run CudaMiner. Alternatively, you can use a script similar to the one below:
1 2 3 4 5 6 7 8 9 10 11 | CUDA_BIN_PATH=/usr/local/cuda-6.0/bin CUDA_LD_PATH=/usr/local/cuda-6.0/lib64 STRATUM=YOUR_POOLS_STRATUM USERNAME=YOUR_POOL_USERNAME PASSWORD=YOUR_POOL_PASSWORD export PATH=.:$CUDA_BIN_PATH:$PATH export LD_LIBRARY_PATH=$CUDA_LD_PATH:$LD_LIBRARY_PATH cudaminer -H 1 -d 0 -i 0 -o stratum+tcp://$STRATUM -O $USERNAME:$PASSWORD |
If this helped you, you can tip me in BTC: 18ymUR1XyZ68NCzjrzYtMRP2ztk8LjAgBL
Otherwise, feel free to ask questions in the comments.
Update 2014-3-20:
$ cd CudaMiner $ git checkout 2014-02-02
Update 2014-4-8:
I've had some more time to look at this, and have figured out how to get the latest git version to compile. I've updated the post to reflect this. Special thanks to the folks in this bug report.
Update 2014-7-12:
I've updated this to reflect the fact CUDA 6 is out. It can be installed using my CUDA on Fedora 20 guide.
when i try to make i get returned.
ReplyDelete/usr/bin/ld: cudaminer-cpu-miner.o: undefined reference to symbol 'SHA256@@libcrypto.so.10'
/usr/bin/ld: note: 'SHA256@@libcrypto.so.10' is defined in DSO /lib64/libcrypto.so.10 so try adding it to the linker command line
/lib64/libcrypto.so.10: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [cudaminer] Error 1
make[2]: Leaving directory `/home/jaison/CudaMiner'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jaison/CudaMiner'
make: *** [all] Error 2
Do you have 'openssl-libs' installed?
Delete# yum install openssl-libs
What if you do:
$ export LD_LIBRARY_PATH=/usr/local/cuda-5.5/lib64:/lib64:$LD_LIBRARY_PATH
Before compiling?
What version of Cudaminer are you trying to compile? The latest git revision?
I have openssl-libs
ReplyDeleteCompiling latest git version 5.5. I did export that path initially. I went ahead and added it directly to my .bashrc and everything compiled just fine then. Thanks.
can you expound on what you did?
DeleteI'm not Jai B, but I did get the latest git version of CudaMiner to compile. I've updated the post accordingly. Hopefully it works for you!
DeleteI'm having the same error and modifying my path statements has not resolved the error. I do also have openssl-libs installed. Could this be related to the kernel version? Any other ideas?
ReplyDeleteThanks,
Kernel version shouldn't enter into it.
DeleteYou say you have openssl-libs installed, what about openssl-devel?
# yum install openssl-devel
There are a couple of issues to work around.
DeleteFor now, I recommend deleting your download of CudaMiner, doing a fresh git clone, then following instructions in my post update.