Update: CudaMiner Binaries

After the initial post of this article, I have started posting compiled binaries of CudaMiner ready-to-go.  To grab those binaries, head over to CudaMiner for OS X.

Update 2: CUDA Toolkit 6.0

These instructions will continue to work with the 6.0 release of the CUDA Toolkit. Simply replace the 5.5 references with 6.0. In my testing of CUDA 6.0, I have found it to result in lower performance than 5.5.

Introduction

Many of the common mining software packages use OpenCL for GPU mining.  OpenCL works well with AMD/ATI-based GPUs.  However, with Nvidia-based GPUs, OpenCL is not very efficient.  Mining scrypt-based crypto-coins, such as Litecoin, on Nvidia-based GPUs is currently most efficient with CudaMiner.  CudaMiner, however, is currently only released for Windows.  In this tutorial, we will compile CudaMiner for Mac OS X.

This article is intended for those familiar with UNIX-based command-line tools for Mac OS X that would like to compile CudaMiner themselves.  To simply download existing CudaMiner binaries for Mac OS X, head over to CudaMiner for OS X. If you would like to get familiar with using command-line tools in the Mac OS X Terminal, here are a couple of good articles to start with: Introduction to the Mac OS X Command Line and Learning the Mac OS X Terminal.

Prerequisites

  • Xcode Command Line Tools (download Xcode from the Mac App Store and then run  xcode-select --install  in the Terminal, lastly run sudo xcodebuild -license  to agree to the Xcode license)
  • CUDA Toolkit 5.5 for 10.7, 10.8, and 10.9 (reboot after installing)
  • CUDA Toolkit 5.0 for 10.6 (reboot after installing)
  • MacPorts

Compiling CudaMiner

  1. Open Terminal.app.
  2. Install the gcc46automake, autoconf, and curl packages using MacPorts by running the following commands:
    For 10.7, 10.8, and 10.9:

    For 10.6:
  3. Open your bash shell profile in a text editor, such as vi from the Terminal as follows:
  4. Hit the o key to start editing the file.
  5. Ensure the following lines are added to the file (for 10.6, replace CUDA-5.5 with CUDA-5.0):

    bashprofile
  6. Hit the Escape key to stop editing the file.  Save the file and close vi by entering :wq and hitting the Enter key.
    bashprofilesave
  7. Close Terminal.app (we will reopen it later, we are closing it now so that the new bash profile will be loaded when we do).
  8. Download the CudaMiner source code from https://github.com/cbuchner1/CudaMiner.
  9. Extract the ZIP file.
  10. Open Terminal.app.
  11. Change the current directory to the directory containing the extracted files, for example:
  12. In order for our compile to be successful on Mac OS X, we need to make a few adjustments to the source code.  Use the following commands to make the adjustments:

    Add the following command for 10.6 only:
  13.  Configure and build the source code as follows:

As long as no errors occur during the compilation process, we have now compiled CudaMiner and can begin using it.

Using CudaMiner

There are a number of command-line parameters available for CudaMiner outlined in its README file.  CudaMiner, however, will attempt to auto-tune its configuration based on your Nvidia GPU.  To launch CudaMiner using the auto-tune options, simply specify your pool URL and worker credentials as follows:

CudaMiner

Credits

Christian Buchner (cbuchner1): Developer of CudaMiner –  CudaMiner announcement | CudaMiner on GitHub

Marcel Mƒ¼ller: This tutorial is an updated version of Marcel Mƒ¼ller’s post – Compiling CudaMiner on OS X 10.9


Pin It on Pinterest

Share This
%d bloggers like this: