Links

What is GPU Mining?

HARDWARE

The algorithm is memory hard and in order to fit the DAG into memory, it needs 1-2GB of RAM on each GPU. If you get Error GPU mining. GPU memory fragmentation? you do not have enough memory. The GPU miner is implemented in OpenCL, so AMD GPUs will be ‘faster’ than same-category NVIDIA GPUs. ASICs and FPGAs are relatively inefficient and therefore discouraged. To get openCL for your chipset and platform, try:

UBUNTU LINUX SET-UP

For this quick guide, you’ll need Ubuntu 14.04 or 15.04 and the fglrx graphics drivers. You can use NVidia drivers and other platforms, too, but you’ll have to find your own way to getting a working OpenCL install with them, such as Genoil’s ethminer fork.
If you’re on 15.04, Go to “Software and Updates > Additional Drivers” and set it to “Using video drivers for the AMD graphics accelerator from fglrx”.
If you’re on 14.04, go to “Software and Updates > Additional Drivers” and set it to “Using video drivers for the AMD graphics accelerator from fglrx”. Unfortunately, for some of you this will not work due to a known bug in Ubuntu 14.04.02 preventing you from switching to the proprietary graphics drivers required to GPU mine.
So, if you encounter this bug, and before you do anything else, go to “Software and updates > Updates” and select “Pre-released updates trusty proposed”. Then, go back to “Software and Updates > Additional Drivers” and set it to “Using video drivers for the AMD graphics accelerator from fglrx”). After rebooting, it’s well worth having a check that the drivers have now indeed been installed correctly (For example by going to “Additional Drivers” again).
Whatever you do, if you are on 14.04.02 do not alter the drivers or the drivers configuration once set. For example, the usage of aticonfig –initial (especially with the -f, –force option) can ‘break’ your setup. If you accidentally alter their configuration, you’ll need to de-install the drivers, reboot, reinstall the drivers and reboot.

MAC SET-UP

wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.29_mac.pkg sudo installer -pkg ~/Desktop/cuda_7.0.29_mac.pkg -target / brew update brew tap expanse/expanse brew reinstall cpp-expanse –with-gpu-mining –devel –headless –build-from-source
You check your cooling status:
aticonfig –adapter=0 –od-gettemperature

WINDOWS SET-UP

Download the latest Eth++ installation and choose ethminer at the “Choose Components” screen of the installation screen.

USING ETHMINER WITH GEXP

gexp account new // Set-up expanse account if you do not have one gexp –rpc –rpccorsdomain localhost 2>> gexp.log & ethminer -G // -G for GPU, -M for benchmark tail -f gexp.log
ethminer communicates with gexp on port 8545 (the default RPC port in gexp). You can change this by giving the –rpcport option to gexp. Ethminer will find gexp on any port. Note that you need to set the CORS header with –rpccorsdomain localhost. You can also set port on ethminer with -F http://127.0.0.1:3301. Setting the ports is necessary if you want several instances mining on the same computer, although this is somewhat pointless. If you are testing on a private chain, we recommend you use CPU mining instead.
Note: You do not need to give gexp the –mine option or start the miner in the console unless you want to do CPU mining on TOP of GPU mining.
If the default for ethminer does not work try to specify the OpenCL device with: –opencl-device Xwhere X is {0, 1, 2,…}. When running ethminer with -M (benchmark), you should see something like:
Benchmarking on platform: { “platform”: “NVIDIA CUDA”, “device”: “GeForce GTX 750 Ti”, “version”: “OpenCL 1.1 CUDA” } Benchmarking on platform: { “platform”: “Apple”, “device”: “Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz”, “version”: “OpenCL 1.2 ” }
To debug gexp:
gexp –rpccorsdomain “localhost” –verbosity 6 2>> gexp.log
To debug the miner:
make -DCMAKE_BUILD_TYPE=Debug -DETHASHCL=1 -DGUI=0 gdb –args ethminer -G -M
Note: Hashrate info is not available in gexp when GPU mining.
Check your hashrate with ethminer, miner.hashrate will always report 0.

USING ETHMINER WITH EXP

Mining on a single GPU
In order to mine on a single GPU all that needs to be done is to run exp with the following arguments:
exp -v 1 -a 0xcadb3223d4eebcaa7b40ec5722967ced01cfc8f2 –client-name “OPTIONALNAMEHERE” -x 50 -m on -G
  • -v 1 Set verbosity to 1. Let’s not get spammed by messages.
  • -a YOURWALLETADDRESS Set the coinbase, where the mining rewards will go to. The above address is just an example. This argument is really important, make sure to not make a mistake in your wallet address or you will receive no expanse payout.
  • –client-name “OPTIONAL” Set an optional client name to identify you on the network
  • -x 50 Request a high amount of peers. Helps with finding peers in the beginning.
  • -m on Actually launch with mining on.
  • -G set GPU mining on.
While the client is running you can interact with it using either gexp attach` or [ethconsole](https://github.com/expanse-org/expanse-console).
Mining on a multiple GPUs
Mining with multiple GPUs and exp is very similar to mining with gexp and multiple GPUs. Ensure that an exp node is running with your coinbase address properly set:
exp -v 1 -a 0xcadb3223d4eebcaa7b40ec5722967ced01cfc8f2 –client-name “OPTIONALNAMEHERE” -x 50 -j
Notice that we also added the -j argument so that the client can have the JSON-RPC server enabled to communicate with the ethminer instances. Additionally we removed the mining related arguments since ethminer will now do the mining for us. For each of your GPUs execute a different ethminer instance:
ethminer –no-precompute -G –opencl-device X
Where X is the index number corresponding to the openCL device you want the ethminer to use {0, 1, 2,…}. In order to easily get a list of OpenCL devices you can execute ethminer –list-devices which will provide a list of all devices OpenCL can detect, with also some additional information per device.
Below is a sample output:
[0] GeForce GTX 770 CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 4286345216 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1071586304 CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024
Finally the –no-precompute argument requests that the ethminers don’t create the DAG of the next epoch ahead of time. Although this is not recommended since you’ll have a mining interruption every time when there’s an epoch transition.
Benchmarking
Mining power tends to scale with memory bandwidth. Our implementation is written in OpenCL, which is typically supported better by AMD GPUs over NVidia. Empirical evidence confirms that AMD GPUs offer a better mining performance in terms of price than their NVidia counterparts.
To benchmark a single-device setup you can use ethminer in benchmarking mode through the -M option:
ethminer -G -M
If you have many devices and you’ll like to benchmark each individually, you can use the –opencl-device option similarly to the previous section:
ethminer -G -M –opencl-device X
Use ethminer –list-devices to list possible numbers to substitute for the X {0, 1, 2,…}.
To start mining on Windows, first download the gexp windows binary.
  • Unzip Gexp (right-click and select unpack) and launch Command Prompt. Use cd to navigate to the location of the Gexp data folder. (e.g. cd / to go to the C: drive)
  • Start gexp by typing gexp –rpc.
As soon as you enter this, the Expanse blockchain will start downloading. Sometimes your firewall may block the synchronisation process (it will prompt you when doing so). If this is the case, click “Allow access”.
  • First download and install ethminer, the C++ mining software (your firewall or Windows itself may act up, allow access)
  • Open up another Command Prompt (leave the first one running!), change directory by typing cd /Program\ Files/Expanse(++)/release
  • Now make sure gexp has finished syncing the blockchain. If it is not syncing any longer, you can start the mining process by typing ethminer -G at the command prompt
At this point some problems may appear. If you get an error, you can abort the miner by pressing Ctrl+C. If the error says “Insufficient Memory”, your GPU does not have enough memory to mine expanse.