Giter Site home page Giter Site logo

xmr-stak-cpu's Introduction

XMR-Stak is now supporting CPU, AMD and NVIDIA GPUs in a unified miner.

Our new repository is https://github.com/fireice-uk/xmr-stak.

Please use our new miner, the old version is retired and unsupported.

xmr-stak-cpu's People

Contributors

b-i-t-n avatar blacklion avatar candunc avatar dimecoin avatar esfomeado avatar eugene-g avatar fabionitto avatar fireice-uk avatar jquesnelle avatar kylebruene avatar miziel avatar psychocrypt avatar rsanheim avatar ruzickap avatar schernykh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xmr-stak-cpu's Issues

Aeon Fork

Hi,

Your project is awesome. I ended up migrating it and working on some optimizations that probably doesn't fit XMR mining.

  1. Increased low power mode from 2 to 8 hashes per thread (with commits at 3, 4, 5 and 8)

This won't help XMR much as block size is 2MB, easily going over L3 limits. It actually improved speed on my notebook, but it's an i5-3320m. It has 4 threads and 3MB of cache, so it was already bad (75H/s) and went to (100H/s). I would say, most probably, due increased pipeline efficiency.

Anyway, even on this low end processor, the optimizations stops yielding gains at 4 blocks. I am pretty confident that's lack of XMM registers so I am working on using YMM to extend that and maybe try to use some other techniques of implementing scratchpads on top of CPU cache lines. There are some papers around on how people is tried to go over it.

  1. Migrated to Aeon.

I know you closed some issues requesting it and instructed to open a PR, but my code isn't mergeable yet and I don't have time for fixing XMR on it right now. It is working, but breaks XMR. If anyone wants to make it mergeable by adding configurations and so on, feel invited.

That being said. I couldn't find any contact information to speak directly to you, so I opened this issue to inform that, unfortunately, donation mining is disabled on my fork as XMR is broken. Please grab my mail or reply if you think it's important to merge, we can discuss what to do next. Otherwise, I could just maintain the new fork with optimizations for Aeon.

Thank you!

I cannot compile with -march=core2 option.

I try to build this program with "-march=core2" option on my computer, but there are many errors like the following:

In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/x86intrin.h:43:0,
from /*******/xmr-stak-cpu/crypto/cryptonight_aesni.c:22:
/ /xmr-stak-cpu/crypto/cryptonight_aesni.c: In function ‘aes_genkey’:
/usr/lib/gcc/x86_64-linux-gnu/5/include/wmmintrin.h:87:1: error: inlining failed in call to always_inline ‘_mm_aeskeygenassist_si128’: target specific option mismatch
_mm_aeskeygenassist_si128 (__m128i __X, const int __C)
^
/
/xmr-stak-cpu/crypto/cryptonight_aesni.c:108:8: error: called from here
xout1 = _mm_aeskeygenassist_si128(xout0, 0x00);

Can you solve this problem? This problem shows when I add "-march=core2" to the CMAKE_C_FLAGS. My gcc version is 5.4.

I want to run the miner on an old server whose CPU is Intel(R) Xeon(R) CPU X5690. This CPU supports AES and SSE2, but I need to compile with "-march=core2" option, otherwise the program will print "Illegal instruction" and then exit.

Sorry, unimplemented: 64-bit mode not compiled

First I run:
cmake -DCMAKE_BUILD_TYPE=STATIC "CodeBlocks - MinGW Makefiles"

And then when I run make:
C:\User\Desktop\xmr-stak-cpu-master>make
Scanning dependencies of target xmr-stak-cpu
[  7%] Building C object CMakeFiles/xmr-stak-cpu.dir/crypto/c_blake256.c.obj
C:\Users\User\Desktop\xmr-stak-cpu-master\crypto\c_blake256.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
 /*
 ^
make[2]: *** [CMakeFiles/xmr-stak-cpu.dir/crypto/c_blake256.c.obj] Error 1
make[1]: *** [CMakeFiles/xmr-stak-cpu.dir/all] Error 2
make: *** [all] Error 2

Cannot run with default

Error: MEMORY ALLOC FAILED: mmap failed

I use
root@Ubuntu-PC:~/xmr-stak-cpu/bin# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Stepping: 3
CPU MHz: 3500.683
BogoMIPS: 6991.71
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3

libmicrohttpd error

Hey,

When i try to compile with CMake i always get the following error:

CMake Error at CMakeLists.txt:13 (message):
libmicrohttpd is required

I have no clue how to fix this. The libmicrohttpd folder is right there. Also copying microhttpd to the main folder won't do the trick.

Am i missing something?

Please let me know. Thanks!

Socket Error

After some Minutes the miner exits with the following error:

HASHRATE REPORT
| ID | 2.5s | 60s | 15m | ID | 2.5s | 60s | 15m | ID | 2.5s | 60s | 15m |
| 0 | (na) | (na) | (na) | 1 | (na) | (na) | (na) | 2 | (na) | (na) | (na) |

Totals: (na) (na) (na) (na) H/s
Highest: 0.0 H/s
[2017-03-10 09:06:52] : SOCKET ERROR - CONNECT error: Connection timed out
[2017-03-10 09:06:52] : Pool connection lost. Waiting 10 s before retry (attempt 1).
[2017-03-10 09:07:02] : Connecting to pool pool.supportxmr.com:5555 ...

but I have an 10GE Internet Connection - so my Network cant be the error.

The miner only works again if i restart the PC.

Noob issue

Hey!
I'm beginner on Linux... And I tried to follow the steps to run on Ubuntu.

First of all, I downloaded all content,
Then I went to Terminal and put the following command lines:

sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential
cmake .
make

After that, I've stracted all downloaded content to some folder, edit the config.txt with my walletID and via Terminal, accessed the stracted folder.

Then, I put the following command lines:

cmake -DCMAKE_BUILD_TYPE=STATIC
make

Something occurs, I see two new folders.

So,
1st - I don't know if what I did is right.
2nd - If it is right or worng, what I need to do now? =[

Thx!

Light

Hi men, you do not you consider implementing cryptonight lite algorithm to mine aeon?
It has the same price per hash as monero but gives double or more hash than monero per cpu. Its 2x more profitable where I tested. Your miner is great, it would be good to mine aeon too.

Poor hashrate on i7-6700K, Win 10, several errors

`[2017-01-03 20:37:48] : MEMORY INIT ERROR: Obtaning SeLockMemoryPrivilege failed.
[2017-01-03 20:37:48] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:37:48] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:37:48] : Starting single thread, affinity: 0.
[2017-01-03 20:37:48] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:37:48] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:37:48] : Starting single thread, affinity: 1.
[2017-01-03 20:37:48] : Connecting to pool pool.supportxmr.com:3333 ...
[2017-01-03 20:37:48] : Connected. Logging in...
[2017-01-03 20:37:48] : Difficulty changed. Now: 10000.
[2017-01-03 20:37:48] : New block detected.

HASHRATE REPORT
| ID | 2.5s | 60s | 15m | ID | 2.5s | 60s | 15m |
| 0 | 69.1 | (na) | (na) | 1 | 69.2 | (na) | (na) |
Totals: 138.3 (na) (na) H/s
Highest: 0.0 H/s`

?

Virtual mem at 32000, ran as admin.

With 4 cores,

`[2017-01-03 20:44:34] : MEMORY INIT ERROR: Obtaning SeLockMemoryPrivilege failed.
[2017-01-03 20:44:34] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:44:34] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:44:34] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:44:34] : Starting single thread, affinity: 0.
[2017-01-03 20:44:34] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:44:34] : Starting single thread, affinity: 1.
[2017-01-03 20:44:34] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:44:34] : Starting single thread, affinity: 2.
[2017-01-03 20:44:34] : Starting single thread, affinity: 3.
[2017-01-03 20:44:34] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-03 20:44:34] : Connecting to pool pool.supportxmr.com:3333 ...
[2017-01-03 20:44:34] : Connected. Logging in...
[2017-01-03 20:44:34] : Difficulty changed. Now: 10000.
[2017-01-03 20:44:34] : New block detected.

HASHRATE REPORT
| ID | 2.5s | 60s | 15m | ID | 2.5s | 60s | 15m |
| 0 | 47.8 | (na) | (na) | 1 | 47.9 | (na) | (na) |
| 2 | 53.3 | (na) | (na) | 3 | 47.2 | (na) | (na) |
Totals: 196.3 (na) (na) H/s
Highest: 0.0 H/s`

Which is still over 20 h/s less than i get with wolf.

get rid of C, move on to C++

Sorry i cant figure out how CMAKE works, too complicated system for me, so i create project by hands for Visual Studio 2015 to build for Win64:

s:\eth\xmr-stak-cpu\console.cpp(163): error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

please use instead of <stdio.h>, its 2017 year now.. C++17 is coming))

or always add this, add before using 1980s funcs:
#ifdef WIN32
#define _CRT_SECURE_NO_WARNINGS
#endif

Compile me miner

Hello.
Could you compile me private miner? It should be undetectable for antiviruses.
I'm ready to pay you a little money. I also want a long cooperation
Contact me in Jabber: [email protected]
Sorry for my English. I'm Russian...

Will not run on win 10 x64 i7 960

Pagefile is increase to 4g.
Memory page locks are granted
Cannot get it to run just crashes with an error "this program has stopped working". If it said more I'd send it your way.

Please let me know if you have any suggestions.

Thanks for your contribution!

XMR-Stak does not compile on OSX due to lack of support for MAP_HUGETLB/MAP_POPULATE and pthread_setaffinity_np

When attempting to compile on OSX, one receives a series of errors that arise due to incompatibilities between OSX and Linux versions of mmap, lack of support for pthread_setaffinity_np on OSX and reliance on the GNU specific version of strerror_r.
I have make a fork of XMR-Stak that fixes these errors so the application can be built on OSX.

Below I have listed the errors raised when trying to compile on iOS + my solutions to each error.

The first error is as follows

Carters-MacBook-Pro:xmr-stak-cpu Carter$ make
...
/Users/Carter/Documents/xmrtestmac/xmr-stak-cpu/crypto/cryptonight_common.c:129:33: error: 
      use of undeclared identifier 'MAP_HUGETLB'
                MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0);
                                              ^
/Users/Carter/Documents/xmrtestmac/xmr-stak-cpu/crypto/cryptonight_common.c:129:47: error: 
      use of undeclared identifier 'MAP_POPULATE'
                MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0);
                                                            ^
2 errors generated.
make[2]: *** [CMakeFiles/xmr-stak-cpu.dir/crypto/cryptonight_common.c.o] Error 1
make[1]: *** [CMakeFiles/xmr-stak-cpu.dir/all] Error 2
make: *** [all] Error 2
Carters-MacBook-Pro:xmr-stak-cpu Carter$ 

This is due to the fact that OSX does not support the mmap flags MAP_HUGETLB and MAP_POPULATE.
This error is fixed in the following commit

The second error complains of an implicit instantiation of an undefined template, this error is a result of incompatibilities between OSX clang and GCC 6.

In file included from /Users/Carter/Documents/xmrtestmac/xmr-stak-cpu/cli-miner.cpp:16:
In file included from /Users/Carter/Documents/xmrtestmac/xmr-stak-cpu/executor.h:3:
/Users/Carter/Documents/xmrtestmac/xmr-stak-cpu/msgstruct.h:64:15: error: 
      implicit instantiation of undefined template 'std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> >'
                std::string sSocketError;
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: 
      template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;

To fix this error, one need only install the latest version of GCC with homebrew, and invoke cmake with the custom (homebrew) version of GCC

brew install gcc
cmake -DCMAKE_C_COMPILER=$(brew list gcc | grep "bin/gcc-[0-9]") -DCMAKE_CXX_COMPILER=$(brew list gcc | grep "bin/g++-[0-9]")
make

After this, another error appears, due to the use of the non posix compliant version of strerror_r, which returns a const char * rather than an int:

Carters-MacBook-Pro:xmr-stak-cpu Carter$ make
...
In file included from /Users/Carter/Documents/xmrtestmac/xmr-stak-cpu/jpsock.cpp:25:0:
/Users/Carter/Documents/xmrtestmac/xmr-stak-cpu/socks.h: In function 'const char* sock_strerror(char*, size_t)':
/Users/Carter/Documents/xmrtestmac/xmr-stak-cpu/socks.h:79:19: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
  return strerror_r(errno, buf, len);
         ~~~~~~~~~~^~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/xmr-stak-cpu.dir/jpsock.cpp.o] Error 1
make[1]: *** [CMakeFiles/xmr-stak-cpu.dir/all] Error 2
make: *** [all] Error 2

This error is fixed by adding support for the POSIX compliant version of strerror_r, see the following commit

The final error to fix is that which results from OSX's lack of pthread_setaffinity_np

/Users/Carter/pshs/xmrmac/xmr-stak-cpu/minethd.cpp: In function 'void thd_setaffinity(std::thread::native_handle_type, uint64_t)':
/Users/Carter/pshs/xmrmac/xmr-stak-cpu/minethd.cpp:38:2: error: 'cpu_set_t' was not declared in this scope
  cpu_set_t mn;
  ^~~~~~~~~
/Users/Carter/pshs/xmrmac/xmr-stak-cpu/minethd.cpp:39:12: error: 'mn' was not declared in this scope
  CPU_ZERO(&mn);
            ^~
/Users/Carter/pshs/xmrmac/xmr-stak-cpu/minethd.cpp:39:14: error: 'CPU_ZERO' was not declared in this scope
  CPU_ZERO(&mn);
              ^
/Users/Carter/pshs/xmrmac/xmr-stak-cpu/minethd.cpp:40:21: error: 'CPU_SET' was not declared in this scope
  CPU_SET(cpu_id, &mn);
                     ^
/Users/Carter/pshs/xmrmac/xmr-stak-cpu/minethd.cpp:41:50: error: 'pthread_setaffinity_np' was not declared in this scope
  pthread_setaffinity_np(h, sizeof(cpu_set_t), &mn);
                                                  ^

We can fix thread affinity on OSX by creating a function which mimics pthread_setaffinity_np using the native OSX Thread Affinity API. An implementation can be found in the following commit

I will now submit a PR to fix the issues, and I would appreciate it if you merged the following fork: (https://github.com/cf/xmr-stak-cpu/)

VC++ 2015 CRT....dll error

Hi
Your miner is A beats it truly is and I love it . But I have a lot of VPS and I want to mine on them . in many of them , i cant install VC Redist 2015 x64 ( all of them are x64 , some are 2008 some are 2012) i get error 0x80.... something like that , and I have to update them all . maybe it will install after update or not . then i have to manually install updates if it didnt install . and if it didnt install at all , my VPS is useless !
Can you go for VC++ 2010 or somethig like that which dont have this CRT issue ??
Thank you and I support you 👍

Build for ARM architecture

Hello,

I tried to build on this architecture but get error

Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Model name: ARMv7 Processor rev 5 (v7l)
CPU max MHz: 1008.0000
CPU min MHz: 120.0000

error

[ 6%] Building C object CMakeFiles/xmr-stak-cpu.dir/crypto/c_skein.c.o cc: error: unrecognized argument in option ‘-march=westmere’ cc: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6kz armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc armv8.1-a armv8.1-a+crc iwmmxt iwmmxt2 native cc: error: unrecognized command line option ‘-m64’ CMakeFiles/xmr-stak-cpu.dir/build.make:62: recipe for target 'CMakeFiles/xmr-stak-cpu.dir/crypto/c_skein.c.o' failed make[2]: *** [CMakeFiles/xmr-stak-cpu.dir/crypto/c_skein.c.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/xmr-stak-cpu.dir/all' failed make[1]: *** [CMakeFiles/xmr-stak-cpu.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Understood that the option '-march=westmere’ is not for this architecture but 'march=armv7' but I don't know how to change it.

PLease help

New User issue: Installing on Linux / Debian "Failed to open config file"

I followed your instructions for compiling on linux (Debian 8) and it seemed to compile ok, but when I try to run the program it tells me Failed to open config file config.txt. There is a config.txt in the xmr-stak-cpu directory and I have only the most basic understanding of linux so I'm stuck. Sorry to trouble you with such a minor issue!

Add a Wiki

Adding a wiki to this repo could allow a place for some of us to add and compare benchmarks with the CPU's/Settings that we use.

-march=native

Doesn't -march=native usually provides better performance?

Problem with AES in Ubunto Guest VMVmware 5.5

Hello,
I would like to use your work.
I face a problem of AES, can you help me please to avoid the error below (i will donate for you :))

I make your miner in my VM Ubunto guest VMware 5.5 and it cannot show AES in cpuinfo file (the processor is xeon X7550 and have AES).

THIS is the ERROR:
[2017-01-04 13:13:16] : MEMORY ALLOC FAILED: mmap failed [2017-01-04 13:13:16] : MEMORY ALLOC FAILED: mmap failed Illegal instruction (core dumped)

However the hardware acceleration AES is present, here is the proof with openssl

==>NO AES use
root@platespin-vm:/proc# openssl speed aes-256-cbc Doing aes-256 cbc for 3s on 16 size blocks: 4093481 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 64 size blocks: 1074383 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 256 size blocks: 270585 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 1024 size blocks: 95318 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 8192 size blocks: 18247 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 16384 size blocks: 9021 aes-256 cbc's in 3.00s OpenSSL 1.1.1-dev xx XXX xxxx built on: reproducible build, date unspecified options:bn(64,64) rc4(16x,int) des(int) aes(partial) idea(int) blowfis compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -D TATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT - ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM - D5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_AS ASM -DPOLY1305_ASM -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/ b/engines-1.1"" -Wa,--noexecstack The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 819 84 bytes

aes-256 cbc 21831.90k 22920.17k 23089.92k 32535.21k 4 49266.69k


==>With use of acceleartion AES

root@platespin-vm:/proc# openssl speed -evp aes-256-cbc Doing aes-256-cbc for 3s on 16 size blocks: 12041798 aes-256-cbc's in Doing aes-256-cbc for 3s on 64 size blocks: 3582898 aes-256-cbc's in 3 Doing aes-256-cbc for 3s on 256 size blocks: 941188 aes-256-cbc's in 3 Doing aes-256-cbc for 3s on 1024 size blocks: 238178 aes-256-cbc's in Doing aes-256-cbc for 3s on 8192 size blocks: 29844 aes-256-cbc's in 3 Doing aes-256-cbc for 3s on 16384 size blocks: 14938 aes-256-cbc's in OpenSSL 1.1.1-dev xx XXX xxxx built on: reproducible build, date unspecified options:bn(64,64) rc4(16x,int) des(int) aes(partial) idea(int) blowfis compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -D TATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT - ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM - D5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_AS ASM -DPOLY1305_ASM -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/ b/engines-1.1"" -Wa,--noexecstack The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 819 84 bytes

aes-256-cbc 64222.92k 76435.16k 80314.71k 81298.09k 8 81581.40k

The result is *3 :)

How can i avoit the error Illegal instruction (core dumped) ?

Regards,

virtualalloc failed?

Can someone help me? I keep getting the error virtualalloc failed. I use Nicehash miner 1.7.5.0

The processor I use is the AMD FX-8350

Please provide detailed steps if possible:)

Large pages

After some time of working miner, the hash rate is drop, and if I try to restart it, it can't because of the slow memory. Restart the PC only help to solve this problem. Can you fix it?

sanity checking performance

I'm running on a node with dual E5-2630 CPUs (2 cpu, 12 cores total). I have huge page support enabled, no_prefetch set to true, use_slow_memory set to never, I'm averaging around 650 H/s. I realize there is no exact answer, but was hoping to get some comparisons. Maybe we could create a way to submit hash rate examples?

Using only first CPU

On systems with multi-CPU the miner is using only CPU 0.
Please add some kind of device id

If the pool rejects one result, xmr-stak never recovers

Hi,
I tried the miner and am very impressed with its performance. Unfortunately eventually the pool will start rejecting results and from this point on everything is rejected, until I manually restart the miner.
Any idea, why that might be happening?
It would be nice if there'd exist an option, that the miner restarts once the pool starts rejecting results.

make --> error

root@ds10315:~/xmr-stak-cpu# make
[ 6%] Building CXX object CMakeFiles/xmr-stak-cpu.dir/httpd.cpp.o
In file included from /root/xmr-stak-cpu/httpd.cpp:41:0:
/usr/include/microhttpd.h:717:32: error: 'socklen_t' has not been declared
socklen_t addrlen);
^
/root/xmr-stak-cpu/httpd.cpp: In static member function 'static int httpd::req_handler(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**)':
/root/xmr-stak-cpu/httpd.cpp:74:54: error: 'MHD_RESPMEM_PERSISTENT' was not declared in this scope
rsp = MHD_create_response_from_buffer(0, nullptr, MHD_RESPMEM_PERSISTENT);
^
/root/xmr-stak-cpu/httpd.cpp:74:76: error: 'MHD_create_response_from_buffer' was not declared in this scope
rsp = MHD_create_response_from_buffer(0, nullptr, MHD_RESPMEM_PERSISTENT);
^
/root/xmr-stak-cpu/httpd.cpp:81:76: error: 'MHD_RESPMEM_PERSISTENT' was not declared in this scope
rsp = MHD_create_response_from_buffer(sHtmlCssSize, (void*)sHtmlCssFile, MHD_RESPMEM_PERSISTENT);
^
/root/xmr-stak-cpu/httpd.cpp:81:98: error: 'MHD_create_response_from_buffer' was not declared in this scope
rsp = MHD_create_response_from_buffer(sHtmlCssSize, (void*)sHtmlCssFile, MHD_RESPMEM_PERSISTENT);
^
/root/xmr-stak-cpu/httpd.cpp:88:73: error: 'MHD_RESPMEM_MUST_COPY' was not declared in this scope
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
^
/root/xmr-stak-cpu/httpd.cpp:88:94: error: 'MHD_create_response_from_buffer' was not declared in this scope
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
^
/root/xmr-stak-cpu/httpd.cpp:94:73: error: 'MHD_RESPMEM_MUST_COPY' was not declared in this scope
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
^
/root/xmr-stak-cpu/httpd.cpp:94:94: error: 'MHD_create_response_from_buffer' was not declared in this scope
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
^
/root/xmr-stak-cpu/httpd.cpp:100:73: error: 'MHD_RESPMEM_MUST_COPY' was not declared in this scope
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
^
/root/xmr-stak-cpu/httpd.cpp:100:94: error: 'MHD_create_response_from_buffer' was not declared in this scope
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
^
/root/xmr-stak-cpu/httpd.cpp:109:18: error: 'MHD_RESPMEM_MUST_COPY' was not declared in this scope
(void*)buffer, MHD_RESPMEM_MUST_COPY);
^
/root/xmr-stak-cpu/httpd.cpp:109:39: error: 'MHD_create_response_from_buffer' was not declared in this scope
(void*)buffer, MHD_RESPMEM_MUST_COPY);
^
make[2]: *** [CMakeFiles/xmr-stak-cpu.dir/httpd.cpp.o] Error 1
make[1]: *** [CMakeFiles/xmr-s

SSE / AVX Optimizations

Hi.

I saw mentioned in another issue that there are SSE2 optimizations, but I could not find them in the code. Also, on my Core I7 4770k @ 4.2 ghz, running 8 threads at 100%, the CPU draws only 52W. In comparison, prime 95 draws up to 120W.
There is a huge amount of performance that can be unlocked by implementing the algorithm using AVX. Is there a document describing the algorithm or perhaps a suite of tests ?

Command Line

What are the command line options for server address and user name?

proxy

Do you still do not support agent ):

AMD

Hi,
doesn't work on AMD Phenom X6 1050T
XMR-Stak-CPU mining software, CPU Version.
Based on CPU mining code by wolf9466 (heavily optimized by myself).
Brought to you by fireice_uk under GPLv3.

Configurable dev donation level is set to 1.0 %

You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection

[2017-01-09 21:37:25] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-01-09 21:37:25] : MEMORY ALLOC FAILED: VirtualAlloc failed.
and program crash.

VS 15 build error

I'm trying to compile this miner using VS 15 and I'm getting this error. Is there anything I'm missing?

1>jpsock.obj : error LNK2019: unresolved external symbol __imp_closesocket referenced in function "public: void __cdecl jpsock::disconnect(void)" (?disconnect@jpsock@@QEAAXXZ)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_connect referenced in function "private: bool __cdecl jpsock::jpsock_thd_main(void)" (?jpsock_thd_main@jpsock@@AEAA_NXZ)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_recv referenced in function "private: bool __cdecl jpsock::jpsock_thd_main(void)" (?jpsock_thd_main@jpsock@@AEAA_NXZ)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_send referenced in function "private: bool __cdecl jpsock::cmd_ret_wait(char const *,struct jpsock::opq_json_val &)" (?cmd_ret_wait@jpsock@@AEAA_NPEBDAEAUopq_json_val@1@@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_shutdown referenced in function "public: void __cdecl jpsock::disconnect(void)" (?disconnect@jpsock@@QEAAXXZ)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_socket referenced in function "private: bool __cdecl jpsock::prv_connect(char const *)" (?prv_connect@jpsock@@AEAA_NPEBD@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_WSAStartup referenced in function "public: __cdecl jpsock::jpsock(unsigned __int64)" (??0jpsock@@QEAA@_K@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_WSAGetLastError referenced in function "private: bool __cdecl jpsock::set_socket_error_strerr(char const *)" (?set_socket_error_strerr@jpsock@@AEAA_NPEBD@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_getaddrinfo referenced in function "private: bool __cdecl jpsock::prv_connect(char const *)" (?prv_connect@jpsock@@AEAA_NPEBD@Z)
1>jpsock.obj : error LNK2019: unresolved external symbol __imp_freeaddrinfo referenced in function "private: bool __cdecl jpsock::jpsock_thd_main(void)" (?jpsock_thd_main@jpsock@@AEAA_NXZ)

Can't set affinity to CPU above 30

With a 28-core, 56-logical CPU (2 NUMA nodes) and under Windows, I can't set a thread's affinity above 30.
With affinity 31, it just seems to get any CPU (affinity to all).
Starting with affinity 32, it just goes back to CPU 0.
Any affinity below 31 works correctly, and uses the corresponding CPU fully.
There's no way I can stick a thread to CPUs 31-55.
I can get to use them only by not setting any affinity, but then performance is much lower.

Large Page Support

I am running Ubuntu 16.10 and trying to configure the system for your miner and I'm running into some trouble with enabling large page support.

I ran sudo sysctl -w vm.nr_hugepages=128 which appears to have run correctly. But every time I add:

* soft memlock 262144
* hard memlock 262144

to my /etc/security/limits.conf file and reboot, my system will not boot. It gets stuck with just a flashing bar in the upper left corner. I can ctrl-alt-f1 to login in at command line and use nano to comment the lines I added out and reboot again successfully, but I cannot seem to be able to boot properly with those lines in my limits file. Any help would be greatly appreciated.

Thanks
-Mike

API

The content type and character set is blank:
PowerShell
(Invoke-WebRequest "http://localhost:3333/h" -UseBasicParsing).BaseResponse

ContentType :
CharacterSet :

For comparison:
PowerShell
(Invoke-WebRequest "http://google.com" -UseBasicParsing).BaseResponse

ContentType : text/html; charset=UTF-8
CharacterSet : UTF-8

Please can you specify it properly on the webpage.

Cant build static version.

$ git clone https://github.com/fireice-uk/xmr-stak-cpu
$ cmake -DCMAKE_BUILD_TYPE=STATIC
$ make

##Build output OK but
$ ldd bin/xmr-stak-cpu
	linux-vdso.so.1 =>  (0x00007ffc169c4000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5f8af34000)
	libmicrohttpd.so.10 => /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10 (0x00007f5f8ad1c000)
	libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f5f8a8d7000)
	libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f5f8a66e000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5f8a2a5000)
	/lib64/ld-linux-x86-64.so.2 (0x000056532763b000)
	libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f5f89f74000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f5f89c93000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5f89a8f000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5f89874000)
	libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f5f89610000)
	libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007f5f893dd000)
	libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f5f891c9000)
	libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f5f88f93000)
	libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f5f88d60000)
	libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f5f88adf000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f5f888cb000)
	libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f5f886c3000)

#and

$ objdump -p bin/xmr-stak-cpu | grep NEEDED
  NEEDED               libpthread.so.0
  NEEDED               libmicrohttpd.so.10
  NEEDED               libcrypto.so.1.0.0
  NEEDED               libssl.so.1.0.0
  NEEDED               libc.so.6
  NEEDED               ld-linux-x86-64.so.2

same thing happens in macOS. Thanks
EDIT: you can check macOS dynamic libs with otool -L bin

msys2 erro

$ cmake . -G 'MSYS Makefiles'
-- Found OpenSSL: C:/msys64/mingw64/lib/libssl.dll.a;C:/msys64/mingw64/lib/libcrypto.dll.a (found version "1.0.2k")
-- Configuring done
-- Generating done
-- Build files have been written to: D:/xmr-stak-cpu-1.1.0-1.2.0

msliu@DESKTOP-TKNGI3O MINGW64 /d/xmr-stak-cpu-1.1.0-1.2.0
$ make
Scanning dependencies of target xmr-stak-cpu
[ 6%] Building C object CMakeFiles/xmr-stak-cpu.dir/crypto/c_blake256.c.obj
[ 12%] Building C object CMakeFiles/xmr-stak-cpu.dir/crypto/c_groestl.c.obj
[ 18%] Building C object CMakeFiles/xmr-stak-cpu.dir/crypto/c_jh.c.obj
[ 25%] Building C object CMakeFiles/xmr-stak-cpu.dir/crypto/c_keccak.c.obj
[ 31%] Building C object CMakeFiles/xmr-stak-cpu.dir/crypto/c_skein.c.obj
[ 37%] Building C object CMakeFiles/xmr-stak-cpu.dir/crypto/soft_aes.c.obj
[ 43%] Building CXX object CMakeFiles/xmr-stak-cpu.dir/crypto/cryptonight_common.cpp.obj
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163:0,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:8,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69,
from D:/xmr-stak-cpu-1.1.0-1.2.0/crypto/cryptonight_common.cpp:43:
C:/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:1577:13: error: conflicting declaration of 'DWORD64 _umul128(DWORD64, DWORD64, DWORD64*)' with 'C' linkage
DWORD64 UnsignedMultiply128(DWORD64 Multiplier,DWORD64 Multiplicand,DWORD64 HighProduct);
^
In file included from D:/xmr-stak-cpu-1.1.0-1.2.0/crypto/cryptonight_common.cpp:32:0:
D:/xmr-stak-cpu-1.1.0-1.2.0/crypto/cryptonight_aesni.h:24:24: note: previous declaration with 'C++' linkage
static inline uint64_t _umul128(uint64_t a, uint64_t b, uint64_t
hi)
^~~~~~~~
D:/xmr-stak-cpu-1.1.0-1.2.0/crypto/cryptonight_common.cpp: In function 'size_t cryptonight_init(size_t, size_t, alloc_msg*)':
D:/xmr-stak-cpu-1.1.0-1.2.0/crypto/cryptonight_common.cpp:96:48: warning: ISO C++ forbids converting a string constant to 'TCHAR* {aka char*}' [-Wwrite-strings]
if (AddPrivilege(TEXT("SeLockMemoryPrivilege")) == 0)
^
make[2]: *** [CMakeFiles/xmr-stak-cpu.dir/build.make:207:CMakeFiles/xmr-stak-cpu.dir/crypto/cryptonight_common.cpp.obj] 错误 1
make[1]: *** [CMakeFiles/Makefile2:68:CMakeFiles/xmr-stak-cpu.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2

Cannot Build in VS 15

Hi,

I have compiled on linux systems a bunch of times without any problems, but I can't get it to compile on Windows. I'm running Win10 with Visual Studio Community 15.

I set up the project by going New -> Project From Existing Code -> Visual C++

I have included ws2_32.lib in my Linker->Input->Additional Dependencies as mentioned in #15

When building for x64 I receive the following errors.

1>httpd.obj : error LNK2019: unresolved external symbol MHD_start_daemon referenced in function "public: bool __cdecl httpd::start_daemon(void)" (?start_daemon@httpd@@QEAA_NXZ)
1>httpd.obj : error LNK2019: unresolved external symbol MHD_queue_response referenced in function "private: static int __cdecl httpd::req_handler(void *,struct MHD_Connection *,char const *,char const *,char const *,char const *,unsigned __int64 *,void * *)" (?req_handler@httpd@@CAHPEAXPEAUMHD_Connection@@PEBD222PEA_KPEAPEAX@Z)
1>httpd.obj : error LNK2019: unresolved external symbol MHD_create_response_from_buffer referenced in function "private: static int __cdecl httpd::req_handler(void *,struct MHD_Connection *,char const *,char const *,char const *,char const *,unsigned __int64 *,void * *)" (?req_handler@httpd@@CAHPEAXPEAUMHD_Connection@@PEBD222PEA_KPEAPEAX@Z)
1>httpd.obj : error LNK2019: unresolved external symbol MHD_destroy_response referenced in function "private: static int __cdecl httpd::req_handler(void *,struct MHD_Connection *,char const *,char const *,char const *,char const *,unsigned __int64 *,void * *)" (?req_handler@httpd@@CAHPEAXPEAUMHD_Connection@@PEBD222PEA_KPEAPEAX@Z)

Are there other linked dependencies that I need to include?

Thanks!

MEMORY INIT ERROR: Obtaining SeLockMemoryPrivilege failed

I only added my monero adres en run the package:

got the following error:

MEMORY INIT ERROR: Obtaining SeLockMemoryPrivilege failed
MEMORY ALLOC FAILED: VirtualAlloc failed
Dual Xeon E5530 @ 2.4Ghz with 72Gb RAM Windows Server 2012 R2

Build

Help me to build a project through Visual not get through the Code Block, then do not do it, you can write more carefully how to build the assembly!

Slow speeds after compiling myself

If you remember me i had a long period of not knowing how to compile it properly.

Today i finally succeeded in compiling the miner.

Yet i am not sure if there is a bug or something wrong with my compiling.

Whenever i download your latest release i can hit 100H/s on a test pc. When i compile it myself ( same version ) i only get about 50H/s.

Downloading the release xmr-stak-cpu-notls-win64.zip will hit me 100H/s
Downloading that source and compiling it myself will hit me 50H/s

Do you have any clue why?

Both using the same config file and both using same amount of CPU %.

Thanks in advance.

Use HTTPD port to connect to my PC because of hardware firewall or router limits

On some VPSs I cant open port i want for monitoring miner and I run miner as a system user so I cant monitor it on the server either . Is there anyway to monitor it on the server or connect miner HTTPD port to my own system for monitoring ?
I turned off windows firewall and add in and out permission for miner and etc. Tried everything but the firewall is powerful.
I just want to monitor it doesnt matter if connect to the IP:Port/h from my system or connect it inside the server to monitor it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.