madzebra / hodlminer-binary

0 stars 0 forks source link

Hodlminer compilation instructions #3

Open Orava2 opened 6 years ago

Orava2 commented 6 years ago

Hello

You have compiled https://github.com/Optiminer/hodlminer-wolf for 64 bit Windows. Could you tell how have you managed to compile hodlminer-wolf? I really appreciate any help you can provide.

madzebra commented 6 years ago

Hello.

Sorry for such a delay. First, I tried to compile it with cygwin and with a couple of changes it worked. But it required a bunch of dll files to work. And I wanted to get a single file to distribute. So then I went with mingw, it was harder and required a lot more changes.

If I remember it correctly, I've compiled it on window 7 virtual machine with cpu that supports AVX2. The errors I've got I resolved with the google.

Sure, it can be done on linux with cross compilation but it requires skills and knowledge that I did not have back then.

Orava2 commented 6 years ago

I compiled hodlminer with Cygwin. I needed to add this to sha512_avx2.c

define ulong unsigned long

define htobe64(x) (((uint64_t)(x) << 56) | \

(((uint64_t)(x) << 40) & 0xff000000000000ULL) | \ (((uint64_t)(x) << 24) & 0xff0000000000ULL) | \ (((uint64_t)(x) << 8) & 0xff00000000ULL) | \ (((uint64_t)(x) >> 8) & 0xff000000ULL) | \ (((uint64_t)(x) >> 24) & 0xff0000ULL) | \ (((uint64_t)(x) >> 40) & 0xff00ULL) | \ ((uint64_t)(x) >> 56))

I tried Msys2 and Mingw64. There were no compilation errors but pool rejects all shares. I don't know what's wrong.

Your build is fast but as far as I know it does not support AVX2 but needs a processor with AVX support. My Cygwin AVX2 build is faster but if I build equivalent AVX version hash rate is lower than with your build. Maybe the Cygwin slows down the hash rate. Linux builds are always fast.

Did you have problems with invalid shares?

madzebra commented 6 years ago

Maybe the Cygwin slows down the hash rate. Linux builds are always fast.

Have you tried builds from Nicehash?

Did you have problems with invalid shares?

No.

Orava2 commented 6 years ago

With NiceHash cpuminer-hodl-core-avx2-2.4.3-16-windows-amd64.zip I get about 120 hash/s. With my Cygwin AVX2 build I get 379 hash/s. With your AVX/SSE2 build I get 320 hash/s. I don't remenber what I got with Cygwin AVX/SSE2 build but It was significantly lower than 320 hash/s. CPU is i5-7400T.

With Intel i5-660 NiceHash Core2 gives 82 hash/s. My Cygwin SSE2 (Westmere architecture) gives 109 hash/s. Thats +32 %.

Orava2 commented 6 years ago

I tried this in Mingw64 https://gist.github.com/erkmos/406a5e4bededd38fd797 Performace is still lower than in Linux. File size is about 1.2 MB.