# GPU Mining

## Nvidia/CUDA

Currently, the best option is Protovist's patch of ccminer on Ubuntu.

Instructions:

* Ubuntu 16.04 is known to work.
* Install the Zen Protocol wallet.
* Obtain the exact versions of CUDA (9.2.11-1) and openssl (1.1.1-pre8) needed:

```
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt update
sudo apt dist-upgrade
sudo apt install build-essential automake
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.2.88-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_9.2.88-1_amd64.deb
sudo apt install libcurl4-openssl-dev 
sudo apt-get update
sudo apt-get install cuda
wget https://www.openssl.org/source/openssl-1.1.1-pre8.tar.gz
tar zxf openssl-1.1.1-pre8.tar.gz
cd openssl-1.1.1-pre8/
./config
make -j8
sudo make install
cd ..

```

* Get the right version of ccminer:

```
git clone https://github.com/protovist/ccminer.git
cd ccminer
git checkout zenprotocol
./build.sh
```

* Run the Zen Protocol client and create or import an account.
* Run ccminer, pointing it to the Zen Protocol client, like this:

```
./ccminer -a zenprotocol -o 127.0.0.1:11567
```

For a pool, change `127.0.0.1:11567` to the pool address.

## AMD

Proper AMD mining support is still in development. Right now you need to compile your own Zen Protocol node.

Instructions:

* Checkout or download the cgminer branch at [https://gitlab.com/zenprotocol/zenprotocol/tree/cgminer ](https://gitlab.com/zenprotocol/zenprotocol/tree/cgminer)
* Follow the instructions for building the Zen Protocol node.
* Get a patched cgminer from <https://github.com/A-Manning/cgminer_zp>
* Compile cgminer
* Run cgminer as follows:

```
cgminer --keccak -o http://127.0.0.1:11567
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zenprotocol.com/for-miners/gpu-mining.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
