Open acid-jack opened 6 years ago
I have no solaris available. I thought it is dead :-) You can disable all code within the pinning function, than you will have no pinned threads but you should pass maybe the compile process.
OK. I commented next in the minethd.cpp:
#else
cpu_set_t mn;
CPU_ZERO(&mn);
CPU_SET(cpu_id, &mn);
pthread_setaffinity_np(h, sizeof(cpu_set_t), &mn);
Now I received next error:
[ 61%] Building CXX object CMakeFiles/xmr-stak-cpu.dir/crypto/cryptonight_common.cpp.o
/root/xmr-stak-cpu/crypto/cryptonight_common.cpp: In function 'cryptonight_ctx* cryptonight_alloc_ctx(std::size_t, std::size_t, alloc_msg*)':
/root/xmr-stak-cpu/crypto/cryptonight_common.cpp:154:33: error: 'MAP_HUGETLB' was not declared in this scope
MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0);
^
/root/xmr-stak-cpu/crypto/cryptonight_common.cpp:154:47: error: 'MAP_POPULATE' was not declared in this scope
MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0);
^
/root/xmr-stak-cpu/crypto/cryptonight_common.cpp:166:63: error: 'madvise' was not declared in this scope
if(madvise(ptr->long_state, MEMORY, MADV_RANDOM|MADV_WILLNEED) != 0)
^
*** Error code 1
The following command caused the error:
/usr/bin/c++ -m64 -msse2 -maes -O3 -DNDEBUG -std=c++11 -o CMakeFiles/xmr-stak-cpu.dir/crypto/cryptonight_common.cpp.o -c /root/xmr-stak-cpu/crypto/cryptonight_common.cpp
This is for using huge memory pages in linux. Since you are using solaris you need to add the methods how large pages can be activated in solaris or remove the code snipped :-)
Oh. I'm not a programmer. Don't know how to do this :(
In this case you can try to disable the huge page allocation but you should use a more common OS. The uset base of solaris is to small t invest time to it. sry
I have successfully build this project on SunOS:
# uname -a
SunOS <host name> 5.11 oi_151a9 i86pc i386 i86pc Solaris
# cmake --version
cmake version 3.4.3
# gcc --version
gcc (GCC) 5.2.0
Build command line:
rm -Rf CMakeFiles && CC=/opt/csw/bin/gcc-5.2 CXX=/opt/csw/bin/g++-5.2 cmake -DMICROHTTPD_ENABLE=OFF -DHWLOC_ENABLE=OFF . && make
Trying to fix this error:
[2017-10-29 15:05:04] : SOCKET ERROR - PARSE error: Protocol error 3
Thx for your help. With these edits I could to build binary. But after starting I received the same protocol error 3.
I have made some improvements but unfortunately still have protocol error 3. Debug info from here:
8 Value::ConstMemberIterator itr = obj.FindMember(key);
(gdb) p obj
$1 = (const rapidjson::Value &) @0x4d03d8: {static kDefaultArrayCapacity = <optimized out>, static kDefaultObjectCapacity = <optimized out>, data_ = {s = {length = 4, hashcode = 4,
str = 0x30000005432f8 <error: Cannot access memory at address 0x30000005432f8>}, ss = {str = "\004\000\000\000\004\000\000\000\370\062T\000\000"}, n = {i = {i = 4, padding = "\004\000\000"}, u = {u = 4,
padding2 = "\004\000\000"}, i64 = 17179869188, u64 = 17179869188, d = 8.4879831658373518e-314}, o = {size = 4, capacity = 4, members = 0x30000005432f8}, a = {size = 4, capacity = 4, elements = 0x30000005432f8}, f = {
payload = "\004\000\000\000\004\000\000\000\370\062T\000\000", flags = 3}}}
This object does not have "id" so here it will fail :(
I finally make it works. Do not know why rapidjson is not working with static memory allocation... Hwloc is also working fine:
[2017-11-02 14:52:56] : Starting single thread, affinity: 0.
[2017-11-02 14:52:56] : Starting single thread, affinity: 1.
[2017-11-02 14:52:56] : Connecting to pool cryptonight.usa.nicehash.com:3355 ...
[2017-11-02 14:52:56] : hwloc: memory pinned
[2017-11-02 14:52:56] : hwloc: memory pinned
[2017-11-02 14:52:57] : Connected. Logging in...
[2017-11-02 14:52:57] : Difficulty changed. Now: 160003.
[2017-11-02 14:52:57] : New block detected.
[2017-11-02 14:53:18] : New block detected.
Confirm. It's works!
I have made simple test example to confirm bug with Protocol error 3
.
It works if I build it without -m64
flag. But with this flag I have "NULL pointer"
.
I am going to ask rapidjson developers.
Very nice work. Any help for making xmr-stak-cpu works also on SPARC Solaris? I have 2 servers with 256 VCPU for testing the portability if needed.
Marco
I have changed cpuminer-multi to use the Sparc T4 instructions so I should be able to do the same to this. I ended up using cpuminer-multi as I couldn't figure out getting gcc 5.2 on Solaris 11.3 - the package masking system seems to be rather obtuse...
Mind you, I ended up building cmake from source so perhaps I should just do that to gcc?!
If you send me the config you're trying to use I'll duplicate it and have a bash at this. The cpuminer-multi code had lots of bigendian / address alignment problems within the *.c crypto files, so there may be a reasonable amount of churn though.
@marcofortina @acid-jack I've got a fork that works on Sparc here:
https://github.com/oforpertainingtothesun/xmr-stak-sparc
It turns out you do have to build gcc (5.5) from source as Oracle couldn't devops their way out of a paper bag. I get ~60H/s on 16 threads on my T4, so ~240H/s on full... you might get near 1kH/s on each system if this works for you.
Mind if I ask (part of my day job...) what your Sparc systems do (even vaguely...) for their day job?
@oforpertainingtothesun I have no Sparc-station.
@acid-jack Probably best to keep it that way!
Hello. I'm trying to build this project under Illumos-based OS OpenIndiana Hipster 2017.04. And I got a problem with 64-bit mode.
At first I received this error:
At first sight looks like it is 32-bit OS but it supports 64-bit binaries:
So I tried to add '-m64' flag for gcc:
After this I moved forward but received this error:
Can you help me to build this project under Solaris OS?