Skip to content

Commit

Permalink
2.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
IndeedMiners committed May 4, 2018
1 parent 0beaf68 commit 4ed658c
Show file tree
Hide file tree
Showing 95 changed files with 1,045 additions and 932 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ matrix:
- CMAKE_C_COMPILER=gcc-6
- XMRSTAK_CMAKE_FLAGS="-DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF"

# test with disabled HWLOC, MICROHTTPD, OpenSSL and no accelerators
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *default_packages
- gcc-6
- g++-6
env:
- CMAKE_CXX_COMPILER=g++-6
- CMAKE_C_COMPILER=gcc-6
- XMRSTAK_CMAKE_FLAGS="-DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF -DHWLOC_ENABLE=OFF -DOpenSSL_ENABLE=OFF -DMICROHTTPD_ENABLE=OFF"

- os: linux
compiler: gcc
addons:
Expand Down
21 changes: 9 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,14 @@ if(CUDA_ENABLE)
# set flags to create device code for the given architectures
set(CLANG_BUILD_FLAGS "${CLANG_BUILD_FLAGS} --cuda-gpu-arch=sm_${CUDA_ARCH_ELEM}")
endforeach()

elseif(CUDA_COMPILER STREQUAL "nvcc")
# add c++11 for cuda
if(NOT CMAKE_CXX_FLAGS MATCHES "-std=c\\+\\+11")
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11")
endif()

# avoid that nvcc in CUDA 8 complains about sm_20 pending removal
if(CUDA_VERSION VERSION_EQUAL 8.0)
if(CUDA_VERSION VERSION_EQUAL 8.0)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -Wno-deprecated-gpu-targets")
endif()

Expand Down Expand Up @@ -180,7 +179,7 @@ if(CUDA_ENABLE)
if(CUDA_KEEP_FILES)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}" --keep --keep-dir "${PROJECT_BINARY_DIR}")
endif(CUDA_KEEP_FILES)

if(CUDA_VERSION VERSION_LESS 8.0)
# for CUDA 7.5 fix compile error: https://github.com/fireice-uk/xmr-stak/issues/34
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}" "-D_MWAITXINTRIN_H_INCLUDED")
Expand Down Expand Up @@ -232,7 +231,7 @@ if(OpenCL_ENABLE)
"AMD APP/include")

find_library(OpenCL_LIBRARY
NAMES
NAMES
OpenCL
OpenCL.lib
NO_DEFAULT_PATH
Expand Down Expand Up @@ -284,7 +283,7 @@ endif()
# Find microhttpd
################################################################################

option(MICROHTTPD_ENABLE "Enable or disable the requirement of microhttp (http deamon)" ON)
option(MICROHTTPD_ENABLE "Enable or disable the requirement of microhttp (http daemon)" ON)
if(MICROHTTPD_ENABLE)
find_path(MTHD_INCLUDE_DIR
NAMES
Expand All @@ -307,7 +306,7 @@ if(MICROHTTPD_ENABLE)
PATH_SUFFIXES
lib)
if(MHTD STREQUAL "MHTD-NOTFOUND")
message(FATAL_ERROR "microhttpd NOT found: use `-DMICROHTTPD_ENABLE=OFF` to build without http deamon support")
message(FATAL_ERROR "microhttpd NOT found: use `-DMICROHTTPD_ENABLE=OFF` to build without http daemon support")
else()
set(LIBS ${LIBS} ${MHTD})
include_directories(AFTER ${MTHD_INCLUDE_DIR})
Expand Down Expand Up @@ -399,10 +398,10 @@ execute_process(
)

if(NOT GIT_COMMIT_HASH STREQUAL "")
add_definitions("-DGIT_COMMIT_HASH=${GIT_COMMIT_HASH}")
add_definitions("-DGIT_COMMIT_HASH=${GIT_COMMIT_HASH}")
endif()
if(NOT GIT_BRANCH STREQUAL "")
add_definitions("-DGIT_BRANCH=${GIT_BRANCH}")
add_definitions("-DGIT_BRANCH=${GIT_BRANCH}")
endif()

# generate backend string
Expand All @@ -426,7 +425,6 @@ else()
# activate sse2 and aes-ni
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -maes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -maes")

endif()

# add -Wall for debug builds with gcc
Expand Down Expand Up @@ -478,7 +476,7 @@ target_link_libraries(xmr-stak-backend xmr-stak-c ${CMAKE_DL_LIBS})

# compile CUDA backend
if(CUDA_FOUND)
file(GLOB CUDASRCFILES
file(GLOB CUDASRCFILES
"xmrstak/backend/nvidia/nvcc_code/*.cu"
"xmrstak/backend/nvidia/*.cpp")

Expand Down Expand Up @@ -506,7 +504,7 @@ endif()

# compile AMD backend
if(OpenCL_FOUND)
file(GLOB OPENCLSRCFILES
file(GLOB OPENCLSRCFILES
"xmrstak/backend/amd/amd_gpu/*.cpp"
"xmrstak/backend/amd/*.cpp")
add_library(xmrstak_opencl_backend
Expand Down Expand Up @@ -536,7 +534,6 @@ target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend)
# Install
################################################################################


# do not install the binary if the project and install are equal
if( NOT CMAKE_INSTALL_PREFIX STREQUAL PROJECT_BINARY_DIR )
install(TARGETS xmr-stak
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
###### fireice-uk's and psychocrypt's
# XMR-Stak - Monero/Aeon All-in-One Mining Software

**XMR-Stak is ready for the POW change of Monero-v7, Aeon-v7, stellite-v4 and Sumukoin-v3**

XMR-Stak is a universal Stratum pool miner. This miner supports CPUs, AMD and NVIDIA gpus and can be used to mine the crypto currency Monero and Aeon.

## HTML reports
<img src="https://gist.githubusercontent.com/fireice-uk/2da301131ac01695ff79539a27b81d68/raw/4c09cdeee86f94df2e9dd86b927e64aded6184f5/xmr-stak-cpu-hashrate.png" width="260"> <img src="https://gist.githubusercontent.com/fireice-uk/2da301131ac01695ff79539a27b81d68/raw/4c09cdeee86f94df2e9dd86b927e64aded6184f5/xmr-stak-cpu-results.png" width="260"> <img src="https://gist.githubusercontent.com/fireice-uk/2da301131ac01695ff79539a27b81d68/raw/4c09cdeee86f94df2e9dd86b927e64aded6184f5/xmr-stak-cpu-connection.png" width="260">

## Video setup guide on Windows

[<img src="https://gist.githubusercontent.com/fireice-uk/3621b179d56f57a8ead6303d8e415cf6/raw/4f2863d4072b78fdff649805e733203c9802daef/vidguidetmb.jpg">](https://www.youtube.com/watch?v=-8paGFwxyMU)
[<img src="https://gist.githubusercontent.com/fireice-uk/3621b179d56f57a8ead6303d8e415cf6/raw/f572faba67cc9418116f3c1dfd7783baf52182ce/vidguidetmb.jpg">](https://youtu.be/YNMa8NplWus)
###### Video by Crypto Sewer

## Overview
* [Features](#features)
* [Supported altcoins](#supported-altcoins)
* [Download](#download)
* [Linux Portable Binary](doc/Linux_deployment.md)
* [Usage](doc/usage.md)
* [HowTo Compile](doc/compile.md)
* [FAQ](doc/FAQ.md)
Expand All @@ -40,12 +41,17 @@ XMR-Stak is a universal Stratum pool miner. This miner supports CPUs, AMD and NV
Besides [Monero](https://getmonero.org), following coins can be mined using this miner:

- [Aeon](http://www.aeon.cash)
- [BBSCoin](https://www.bbscoin.xyz)
- [Croat](https://croat.cat)
- [Edollar](https://edollar.cash)
- [Electroneum](https://electroneum.com)
- [Graft](https://www.graft.network)
- [Haven](https://havenprotocol.com)
- [Intense](https://intensecoin.com)
- [IPBC](https://ipbc.io)
- [Karbo](https://karbo.io)
- [Sumokoin](https://www.sumokoin.org)
- [TurtleCoin](https://turtlecoin.lol)

If your prefered coin is not listed, you can chose one of the following algorithms:

Expand All @@ -57,7 +63,6 @@ Please note, this list is not complete, and is not an endorsement.
## Download

You can find the latest releases and precompiled binaries on GitHub under [Releases](https://github.com/fireice-uk/xmr-stak/releases).
If you are running on Linux (especially Linux VMs), checkout [Linux Portable Binary](doc/Linux_deployment.md).

## Default Developer Donation

Expand Down
10 changes: 5 additions & 5 deletions doc/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* [Virus Protection Alert](#virus-protection-alert)
* [Change Currency to Mine](#change-currency-to-mine)
* [How can I mine Monero](#how-can-i-mine-monero)
* [Why is Monero named monero7](why-is-monero-named-monero7)
* [Why is Monero named monero7](#why-is-monero-named-monero7)
* [Which currency must be chosen if my fork coin is not listed](#which-currency-must-be-chosen-if-my-fork-coin-is-not-listed)

## "Obtaining SeLockMemoryPrivilege failed."
Expand Down Expand Up @@ -44,18 +44,18 @@ Download and install this [runtime package](https://go.microsoft.com/fwlink/?Lin

## Error: MEMORY ALLOC FAILED: mmap failed

On Linux you will need to configure large page support and increase your ulimit -l.
On Linux you will need to configure large page support and increase your ulimit -l.

To set large page support, add the following lines to /etc/sysctl.conf:

vm.nr_hugepages=128

To increase the ulimit, add following lines to /etc/security/limits.conf:

* soft memlock 262144
* hard memlock 262144

You WILL need to log out and log back in for these settings to take affect on your user (no need to reboot, just relogin in your session).
You WILL need to log out and log back in for these settings to take effect on your user (no need to reboot, just relogin in your session).

You can also do it Windows-style and simply run-as-root, but this is NOT recommended for security reasons.

Expand All @@ -72,7 +72,7 @@ If your antivirus software flags **xmr-stak**, it will likely move it to its qua

If the miner is compiled for Monero and Aeon than you can change
- the value `currency` in the config *or*
- start the miner with the [command line option](usage.md) `--currency monero7` or `--currency aeon`
- start the miner with the [command line option](usage.md) `--currency monero7` or `--currency aeon7`
- run `xmr-stak --help` to see all supported currencies and algorithms

## How can I mine Monero
Expand Down
6 changes: 3 additions & 3 deletions doc/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ After the configuration you need to compile the miner, follow the guide for your

## Generic Build Options
- `CMAKE_INSTALL_PREFIX` install miner to the home folder
- `cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/xmr-stak-cpu`
- you can find the binary and the `config.txt` file after `make install` in `$HOME/xmr-stak-cpu/bin`
- `cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/xmr-stak`
- you can find the binary and the `config.txt` file after `make install` in `$HOME/xmr-stak/bin`
- `CMAKE_LINK_STATIC` link libgcc and libstdc++ libraries static (default OFF)
- disable with `cmake .. -DCMAKE_LINK_STATIC=ON`
- if you use static compile to run the miner on another system set `-DXMR-STAK_COMPILE=generic`
Expand All @@ -55,7 +55,7 @@ After the configuration you need to compile the miner, follow the guide for your

- `CPU_ENABLE` allow to disable/enable the CPU backend of the miner
- `HWLOC_ENABLE` allow to disable/enable the dependency *hwloc*
- the config suggestion is not optimal if option is disabled: `cmake . -DHWLOC_ENABLE=OFF`
- the config suggestion is not optimal if option is disabled: `cmake .. -DHWLOC_ENABLE=OFF`
- disabling can be reduce the miner performance

## AMD Build Options
Expand Down
2 changes: 1 addition & 1 deletion doc/compile_FreeBSD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

From the root shell, run the following commands:

pkg install git libmicrohttpd hwloc cmake
pkg install git libmicrohttpd hwloc cmake

Type 'y' and hit enter to proceed with installing the packages.

Expand Down
11 changes: 9 additions & 2 deletions doc/compile_Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
cd xmr-stak/build
cmake ..
make install
# TinyCore Linux 8.x
# TinyCore is 32-bit only, but there is an x86-64 port, known as "Pure 64,"
# hosted on the TinyCore home page, and it works well.
Expand Down Expand Up @@ -94,9 +94,16 @@
make install
```

- g++ version 5.1 or higher is required for full C++11 support.
- g++ version 5.1 or higher is required for full C++11 support.
If you want to compile the binary without installing libraries / compiler or just compile binary for some other distribution, please check the [build_xmr-stak_docker.sh script](scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh).

- Some newer gcc versions are not supported by CUDA (e.g. Ubuntu 17.10). It will require installing gcc 5 but you can avoid changing defaults.

In that case you can force CUDA to use an older compiler in the following way:
```
cmake -DCUDA_HOST_COMPILER=/usr/bin/gcc-5 ..
```

### To do a generic and static build for a system without gcc 5.1+
```
cmake -DCMAKE_LINK_STATIC=ON -DXMR-STAK_COMPILE=generic .
Expand Down
12 changes: 6 additions & 6 deletions doc/compile_Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@
- Execute the following commands (NOTE: path to Visual Studio Community 2017 can be different)
```
# Execute next line only if compiling for Cuda 9.1 and using Visual Studio 2017 >= 15.5 (released 12/04/17)
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.11
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.11
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
```
- Sometimes Windows will change the directory to `C:\Users\USERNAME\source\` instead of `C:\Users\USERNAME\xmr-stak-<version>\`. If that's the case execute `cd C:\Users\USERNAME\xmr-stak-<version>` followed by:
```
mkdir build
cd build
set CMAKE_PREFIX_PATH=C:\xmr-stak-dep\hwloc;C:\xmr-stak-dep\libmicrohttpd;C:\xmr-stak-dep\openssl
```

Expand All @@ -104,9 +104,9 @@
- Then execute
```
cmake --build . --config Release --target install
cd bin\Release
copy C:\xmr-stak-dep\openssl\bin\* .
```
- Miner is by default compiled for NVIDIA GPUs (if CUDA is installed), AMD GPUs (if the AMD APP SDK is installed) and CPUs.
4 changes: 2 additions & 2 deletions doc/tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ If you are unsure of either GPU or platform index value, you can use `clinfo` to
```
"gpu_threads_conf" :
[
{ "index" : 0, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false,
{ "index" : 0, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false,
"strided_index" : true, "mem_chunk" : 2, "comp_mode" : true
},
{ "index" : 1, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false,
{ "index" : 1, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false,
"strided_index" : true, "mem_chunk" : 2, "comp_mode" : true
},
],
Expand Down
1 change: 1 addition & 0 deletions doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The number of files depends on the available backends.
`pools.txt` contains the selected mining pools and currency to mine.
`amd.txt`, `cpu.txt` and `nvidia.txt` contains miner backend specific settings and can be used for further tuning ([Tuning Guide](tuning.md)).

Note: If the pool is ignoring the option `rig_id` in `pools.txt` to name your worker please check the pool documentation how a worker name can be set.

## Usage on Windows
1) Double click the `xmr-stak.exe` file
Expand Down
12 changes: 6 additions & 6 deletions xmrstak/backend/amd/amd_gpu/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <algorithm>
#include <regex>
#include <cassert>
#include <algorithm>
#include <algorithm>

#include <fstream>
#include <sstream>
Expand Down Expand Up @@ -397,7 +397,7 @@ size_t InitOpenCLGpu(cl_context opencl_ctx, GpuContext* ctx, const char* source_
* used data:
* - source code
* - device name
* - compile paramater
* - compile parameter
*/
std::string src_str(source_code);
src_str += options;
Expand Down Expand Up @@ -935,7 +935,7 @@ size_t InitOpenCL(GpuContext* ctx, size_t num_gpus, size_t platform_idx)

size_t XMRSetJob(GpuContext* ctx, uint8_t* input, size_t input_len, uint64_t target, xmrstak_algo miner_algo)
{
// switch to the kernel storage
// switch to the kernel storage
int kernel_storage = miner_algo == ::jconf::inst()->GetCurrentCoinSelection().GetDescription(1).GetMiningAlgo() ? 0 : 1;

cl_int ret;
Expand Down Expand Up @@ -1004,12 +1004,12 @@ size_t XMRSetJob(GpuContext* ctx, uint8_t* input, size_t input_len, uint64_t tar
return(ERR_OCL_API);
}

if(miner_algo == cryptonight_monero || miner_algo == cryptonight_aeon || miner_algo == cryptonight_ipbc)
if(miner_algo == cryptonight_monero || miner_algo == cryptonight_aeon || miner_algo == cryptonight_ipbc || cryptonight_stellite)
{
// Input
if ((ret = clSetKernelArg(ctx->Kernels[kernel_storage][1], 3, sizeof(cl_mem), &ctx->InputBuffer)) != CL_SUCCESS)
{
printer::inst()->print_msg(L1, "Error %s when calling clSetKernelArg for kernel 1, arugment 4(input buffer).", err_to_str(ret));
printer::inst()->print_msg(L1, "Error %s when calling clSetKernelArg for kernel 1, argument 4(input buffer).", err_to_str(ret));
return ERR_OCL_API;
}
}
Expand Down Expand Up @@ -1102,7 +1102,7 @@ size_t XMRRunJob(GpuContext* ctx, cl_uint* HashOutput, xmrstak_algo miner_algo)
{
// switch to the kernel storage
int kernel_storage = miner_algo == ::jconf::inst()->GetCurrentCoinSelection().GetDescription(1).GetMiningAlgo() ? 0 : 1;

cl_int ret;
cl_uint zero = 0;
size_t BranchNonces[4];
Expand Down
Loading

0 comments on commit 4ed658c

Please sign in to comment.