Pages:
Author

Topic: [ANN]: cpuminer-opt v3.8.8.1, open source optimized multi-algo CPU miner - page 44. (Read 444067 times)

full member
Activity: 420
Merit: 108
I have  a problem running cpuminer-opt  v3.7.x on a couple of machines with win 10 x64. when started, it silently waits several seconds, then exit, without writing  symbol. any advice? do I miss some runtime libs ?
legendary
Activity: 1470
Merit: 1114
Damn! You are right

Too many "Lyras"  Cheesy

If you're comparing AVX2 vs AVX performance lyra2v2 is better, less memory hard.
jr. member
Activity: 196
Merit: 1
Making 2 packages is more work for me, I'm trying to reduce the work.

I'm leaning toward replacing avx2-sha with avx-sha unless someone shows a good
reason for avx2-sha.

Edit: a couple more points

AVX2 and SHA improve different algos and different parts of the same algos. AVX won't have
any effect on SHA code on Ryzen CPUs. There are no technical concerns with AVX-SHA.

The only question is performance on algos that have use AVX2. The best algo to test this is
lyra2v2, it is almost 100% AVX2 and not too hard on memory so it will expose any weaknesses
in AVX2 on Ryzen.
I'm getting around 1.6~2MH/s in Lyra2z. But I'm getting low difficult share errors on every share:
Code:
[2017-12-19 17:45:42] Starting Stratum on stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:20581
[2017-12-19 17:45:42] 16 miner threads started, using 'lyra2rev2' algorithm.
[2017-12-19 17:45:43] Stratum difficulty set to 10
[2017-12-19 17:46:05] CPU #9: 2097.15 kH, 116.83 kH/s
[2017-12-19 17:46:05] CPU #11: 2097.15 kH, 116.65 kH/s
[2017-12-19 17:46:05] CPU #7: 2097.15 kH, 116.33 kH/s
[2017-12-19 17:46:06] CPU #15: 2097.15 kH, 114.68 kH/s
[2017-12-19 17:46:06] CPU #6: 2097.15 kH, 111.85 kH/s
[2017-12-19 17:46:06] CPU #3: 2097.15 kH, 111.58 kH/s
[2017-12-19 17:46:06] CPU #14: 2097.15 kH, 110.05 kH/s
[2017-12-19 17:46:07] CPU #10: 2097.15 kH, 108.93 kH/s
[2017-12-19 17:46:07] CPU #5: 2097.15 kH, 107.02 kH/s
[2017-12-19 17:46:07] CPU #8: 2097.15 kH, 106.52 kH/s
[2017-12-19 17:46:07] CPU #2: 2097.15 kH, 106.20 kH/s
[2017-12-19 17:46:09] CPU #1: 2097.15 kH, 98.64 kH/s
[2017-12-19 17:46:10] CPU #13: 2097.15 kH, 93.44 kH/s
[2017-12-19 17:46:16] CPU #4: 2097.15 kH, 73.31 kH/s
[2017-12-19 17:46:16] CPU #0: 2097.15 kH, 73.11 kH/s
[2017-12-19 17:46:20] CPU #12: 2097.15 kH, 64.31 kH/s
[2017-12-19 17:46:39] Stratum difficulty set to 7
[2017-12-19 17:46:42] CPU #13: 3174.84 kH, 98.57 kH/s
[2017-12-19 17:46:42] Rejected 1/1 (100.0%), 34.63 MH, 1634.59 kH/s
[2017-12-19 17:46:42] reject reason: low difficulty share of 8.935987400308036e-8
[2017-12-19 17:46:42] factor reduced to : 0.67

Is it miner-related or pool-related?

User error, look carefullly at the algo.

Another note about lyra2z, 4way is likely slower due to previously mentioned issues with it.
Damn! You are right

Too many "Lyras"  Cheesy
legendary
Activity: 1470
Merit: 1114

tried this
Code:
// #if (WINDOWS)
/* sizeof(unsigned long) = 4 for MinGW64 */
// typedef unsigned long long ulong;
// #else
typedef unsigned long ulong;
// #endif
typedef unsigned int  uint;

same problem, unless I'm doing it wrong )

It's not wrong, thanks. I'm at a loss to explain it.

I could try to find out where it's crasshing but it may not be necessary. I noticed some optimization
opportunities that I hadn't noticed before but it will require a complete rewrite.
legendary
Activity: 1470
Merit: 1114
Making 2 packages is more work for me, I'm trying to reduce the work.

I'm leaning toward replacing avx2-sha with avx-sha unless someone shows a good
reason for avx2-sha.

Edit: a couple more points

AVX2 and SHA improve different algos and different parts of the same algos. AVX won't have
any effect on SHA code on Ryzen CPUs. There are no technical concerns with AVX-SHA.

The only question is performance on algos that have use AVX2. The best algo to test this is
lyra2v2, it is almost 100% AVX2 and not too hard on memory so it will expose any weaknesses
in AVX2 on Ryzen.
I'm getting around 1.6~2MH/s in Lyra2z. But I'm getting low difficult share errors on every share:
Code:
[2017-12-19 17:45:42] Starting Stratum on stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:20581
[2017-12-19 17:45:42] 16 miner threads started, using 'lyra2rev2' algorithm.
[2017-12-19 17:45:43] Stratum difficulty set to 10
[2017-12-19 17:46:05] CPU #9: 2097.15 kH, 116.83 kH/s
[2017-12-19 17:46:05] CPU #11: 2097.15 kH, 116.65 kH/s
[2017-12-19 17:46:05] CPU #7: 2097.15 kH, 116.33 kH/s
[2017-12-19 17:46:06] CPU #15: 2097.15 kH, 114.68 kH/s
[2017-12-19 17:46:06] CPU #6: 2097.15 kH, 111.85 kH/s
[2017-12-19 17:46:06] CPU #3: 2097.15 kH, 111.58 kH/s
[2017-12-19 17:46:06] CPU #14: 2097.15 kH, 110.05 kH/s
[2017-12-19 17:46:07] CPU #10: 2097.15 kH, 108.93 kH/s
[2017-12-19 17:46:07] CPU #5: 2097.15 kH, 107.02 kH/s
[2017-12-19 17:46:07] CPU #8: 2097.15 kH, 106.52 kH/s
[2017-12-19 17:46:07] CPU #2: 2097.15 kH, 106.20 kH/s
[2017-12-19 17:46:09] CPU #1: 2097.15 kH, 98.64 kH/s
[2017-12-19 17:46:10] CPU #13: 2097.15 kH, 93.44 kH/s
[2017-12-19 17:46:16] CPU #4: 2097.15 kH, 73.31 kH/s
[2017-12-19 17:46:16] CPU #0: 2097.15 kH, 73.11 kH/s
[2017-12-19 17:46:20] CPU #12: 2097.15 kH, 64.31 kH/s
[2017-12-19 17:46:39] Stratum difficulty set to 7
[2017-12-19 17:46:42] CPU #13: 3174.84 kH, 98.57 kH/s
[2017-12-19 17:46:42] Rejected 1/1 (100.0%), 34.63 MH, 1634.59 kH/s
[2017-12-19 17:46:42] reject reason: low difficulty share of 8.935987400308036e-8
[2017-12-19 17:46:42] factor reduced to : 0.67

Is it miner-related or pool-related?

User error, look carefullly at the algo.

Another note about lyra2z, 4way is likely slower due to previously mentioned issues with it.
jr. member
Activity: 196
Merit: 1
Making 2 packages is more work for me, I'm trying to reduce the work.

I'm leaning toward replacing avx2-sha with avx-sha unless someone shows a good
reason for avx2-sha.

Edit: a couple more points

AVX2 and SHA improve different algos and different parts of the same algos. AVX won't have
any effect on SHA code on Ryzen CPUs. There are no technical concerns with AVX-SHA.

The only question is performance on algos that have use AVX2. The best algo to test this is
lyra2v2, it is almost 100% AVX2 and not too hard on memory so it will expose any weaknesses
in AVX2 on Ryzen.
I'm getting around 1.6~2MH/s in Lyra2z. But I'm getting low difficult share errors on every share:
Code:
[2017-12-19 17:45:42] Starting Stratum on stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:20581
[2017-12-19 17:45:42] 16 miner threads started, using 'lyra2rev2' algorithm.
[2017-12-19 17:45:43] Stratum difficulty set to 10
[2017-12-19 17:46:05] CPU #9: 2097.15 kH, 116.83 kH/s
[2017-12-19 17:46:05] CPU #11: 2097.15 kH, 116.65 kH/s
[2017-12-19 17:46:05] CPU #7: 2097.15 kH, 116.33 kH/s
[2017-12-19 17:46:06] CPU #15: 2097.15 kH, 114.68 kH/s
[2017-12-19 17:46:06] CPU #6: 2097.15 kH, 111.85 kH/s
[2017-12-19 17:46:06] CPU #3: 2097.15 kH, 111.58 kH/s
[2017-12-19 17:46:06] CPU #14: 2097.15 kH, 110.05 kH/s
[2017-12-19 17:46:07] CPU #10: 2097.15 kH, 108.93 kH/s
[2017-12-19 17:46:07] CPU #5: 2097.15 kH, 107.02 kH/s
[2017-12-19 17:46:07] CPU #8: 2097.15 kH, 106.52 kH/s
[2017-12-19 17:46:07] CPU #2: 2097.15 kH, 106.20 kH/s
[2017-12-19 17:46:09] CPU #1: 2097.15 kH, 98.64 kH/s
[2017-12-19 17:46:10] CPU #13: 2097.15 kH, 93.44 kH/s
[2017-12-19 17:46:16] CPU #4: 2097.15 kH, 73.31 kH/s
[2017-12-19 17:46:16] CPU #0: 2097.15 kH, 73.11 kH/s
[2017-12-19 17:46:20] CPU #12: 2097.15 kH, 64.31 kH/s
[2017-12-19 17:46:39] Stratum difficulty set to 7
[2017-12-19 17:46:42] CPU #13: 3174.84 kH, 98.57 kH/s
[2017-12-19 17:46:42] Rejected 1/1 (100.0%), 34.63 MH, 1634.59 kH/s
[2017-12-19 17:46:42] reject reason: low difficulty share of 8.935987400308036e-8
[2017-12-19 17:46:42] factor reduced to : 0.67

Is it miner-related or pool-related?
member
Activity: 473
Merit: 18
One thing I couldn't resolve is that neoscrypt always fails to run (same in My9bot's version)

I can look into this now.

-DNOASM didn't solve the issue, it still fails.

But you are right, this algo is definitely not the best performer, so I don't know if its worth investing much time in it Smiley

I found a potential problem that could cause data misalignment.

In algo/neoscrypt.c line 56:

Code:
#if (WINDOWS)
/* sizeof(unsigned long) = 4 for MinGW64 */
typedef unsigned long long ulong;
#else
typedef unsigned long ulong;
#endif
typedef unsigned int  uint;

Further down in the code some data defined as uint is accessed as ulong which has stricter
alignment requirements if defined as long long. If the condition is removed and ulong is the
same as uint it shouldn't crash.

I found no other compilation divergence and alignment bugs can slip through unnoticed for
a time. The trigger seems to be the different compile environment.

Can you test to confirm?

tried this
Code:
// #if (WINDOWS)
/* sizeof(unsigned long) = 4 for MinGW64 */
// typedef unsigned long long ulong;
// #else
typedef unsigned long ulong;
// #endif
typedef unsigned int  uint;

same problem, unless I'm doing it wrong )
legendary
Activity: 1470
Merit: 1114
One thing I couldn't resolve is that neoscrypt always fails to run (same in My9bot's version)

I can look into this now.

-DNOASM didn't solve the issue, it still fails.

But you are right, this algo is definitely not the best performer, so I don't know if its worth investing much time in it Smiley

I found a potential problem that could cause data misalignment.

In algo/neoscrypt.c line 56:

Code:
#if (WINDOWS)
/* sizeof(unsigned long) = 4 for MinGW64 */
typedef unsigned long long ulong;
#else
typedef unsigned long ulong;
#endif
typedef unsigned int  uint;

Further down in the code some data defined as uint is accessed as ulong which has stricter
alignment requirements if defined as long long. If the condition is removed and ulong is the
same as uint it shouldn't crash.

I found no other compilation divergence and alignment bugs can slip through unnoticed for
a time. The trigger seems to be the different compile environment.

Can you test to confirm?
member
Activity: 473
Merit: 18
One thing I couldn't resolve is that neoscrypt always fails to run (same in My9bot's version)

I can look into this now.

I suspect the neoscrypt problem is related to its use of asm. It is controlled by a NOASM
compile flag. I didn't find any hooks for Windows so it should compile the same as Linux.

It works with the old mingw environment used to build previous binaries. The only obvious
difference is the mingw host, The old way was built on a Windows host, the new ones cross
compiled on a Linux host. I don't know if that makes any difference.

Digging deeper will be very time consuming and considering neoscrypt performance on CPU
it's hardly worth the effort, especially if the result is to disable ASM and performance drops.

An easy test would be to recompile with -DNOASM and see if it works and how the performance
compares with the old mingw build. I'll leave it up to you if you're interested. The results will
help determine how to proceed.

-DNOASM didn't solve the issue, it still fails.

Code:
[2017-12-19 18:11:05] 4 miner threads started, using 'neoscrypt' algorithm.
[2017-12-19 18:11:05] Starting Stratum on stratum+tcp://neoscrypt.mine.zpool.ca:4233
[2017-12-19 18:11:05] Binding thread 0 to cpu 0 (mask 1)
[2017-12-19 18:11:05] Binding thread 1 to cpu 1 (mask 2)
[2017-12-19 18:11:05] Binding thread 2 to cpu 2 (mask 4)
[2017-12-19 18:11:05] Binding thread 3 to cpu 3 (mask 8)
[2017-12-19 18:11:07] Stratum session id: 67d8d8d809e8d6ce65058b9626f51cf4
[2017-12-19 18:11:07] Stratum difficulty set to 512
[2017-12-19 18:11:11] DEBUG: job_id='347' extranonce2=00000000 ntime=123a395a
[2017-12-19 18:11:11] neoscrypt block 2011810, diff 110.548


But you are right, this algo is definitely not the best performer, so I don't know if its worth investing much time in it Smiley
legendary
Activity: 1470
Merit: 1114
Making 2 packages is more work for me, I'm trying to reduce the work.

I'm leaning toward replacing avx2-sha with avx-sha unless someone shows a good
reason for avx2-sha.

Edit: a couple more points

AVX2 and SHA improve different algos and different parts of the same algos. AVX won't have
any effect on SHA code on Ryzen CPUs. There are no technical concerns with AVX-SHA.

The only question is performance on algos that have use AVX2. The best algo to test this is
lyra2v2, it is almost 100% AVX2 and not too hard on memory so it will expose any weaknesses
in AVX2 on Ryzen.
jr. member
Activity: 196
Merit: 1
I've uploaded a new windows binaries package of v3.7.7 to git with support for SHA. I also trimmed some
of the file names to remove redundancy.

4way includes avx2
avx2 includes avx
avx includes aes and sse4.2

It's avaiable on the releases page or this direct link:

https://github.com/JayDDee/cpuminer-opt/files/1569739/cpuminer-opt-3.7.7-windows-v2.zip

Be careful with sha, only the AMD Ryzen family supports it at this time.

Consider this a beta for the new Windows build system.



Great! SHA works great! Your miner is blazing fast! I will do the benchmarks like I did with 4ward build.

Apologize me, but can I ask one more build? SHA AVX (not AVX2) version.

I explain:
Ryzen doesn't have a "fine" AVX2 implementation. In some algos, AVX is faster than AVX2. We are trying to find the best setup with SHA, so maybe AVX setup can give one more option to try. What do you think?

That's a very reasonable request and doable. However I'm trying to reduce the number of binaries I build, 8 is too many.
Also I'm hesitant to "downgrade" the technology, it just doesn't feel right.

Let me think about it and I'll do something for next release.

I'm considering eliminating the sse42 build. There are no specific optimizations targetting sse42 so there should no
performance loss when using the sse2 build.

If there are no reports showing a benefit to the sse42 build it will be removed.
There is two possibilities:
if
- Make a 3.7.7 build with only AVX and SHA to see if SHA-like algos takes advantage of AVX instead AVX2;
If yes
- Split into two packages: normal and SHA zips (or Ryzen zips). SHA doubles the build count, so split into different package could reduce the "useless" executables (to non-Ryzen users).
If no
- Remove AVX-SHA from future builds.
legendary
Activity: 1470
Merit: 1114
One thing I couldn't resolve is that neoscrypt always fails to run (same in My9bot's version)

I can look into this now.

I suspect the neoscrypt problem is related to its use of asm. It is controlled by a NOASM
compile flag. I didn't find any hooks for Windows so it should compile the same as Linux.

It works with the old mingw environment used to build previous binaries. The only obvious
difference is the mingw host, The old way was built on a Windows host, the new ones cross
compiled on a Linux host. I don't know if that makes any difference.

Digging deeper will be very time consuming and considering neoscrypt performance on CPU
it's hardly worth the effort, especially if the result is to disable ASM and performance drops.

An easy test would be to recompile with -DNOASM and see if it works and how the performance
compares with the old mingw build. I'll leave it up to you if you're interested. The results will
help determine how to proceed.
legendary
Activity: 1470
Merit: 1114
I've uploaded a new windows binaries package of v3.7.7 to git with support for SHA. I also trimmed some
of the file names to remove redundancy.

4way includes avx2
avx2 includes avx
avx includes aes and sse4.2

It's avaiable on the releases page or this direct link:

https://github.com/JayDDee/cpuminer-opt/files/1569739/cpuminer-opt-3.7.7-windows-v2.zip

Be careful with sha, only the AMD Ryzen family supports it at this time.

Consider this a beta for the new Windows build system.



Great! SHA works great! Your miner is blazing fast! I will do the benchmarks like I did with 4ward build.

Apologize me, but can I ask one more build? SHA AVX (not AVX2) version.

I explain:
Ryzen doesn't have a "fine" AVX2 implementation. In some algos, AVX is faster than AVX2. We are trying to find the best setup with SHA, so maybe AVX setup can give one more option to try. What do you think?

That's a very reasonable request and doable. However I'm trying to reduce the number of binaries I build, 8 is too many.
Also I'm hesitant to "downgrade" the technology, it just doesn't feel right.

Let me think about it and I'll do something for next release.

I'm considering eliminating the sse42 build. There are no specific optimizations targetting sse42 so there should no
performance loss when using the sse2 build.

If there are no reports showing a benefit to the sse42 build it will be removed.

Edit: I could replace the avx2-sha build with avx-sha. It won't affect any Intel users until Cannonlake next year and Ryzen users
can choose the 4way build if they prefer AVX2. Thoughts?
hero member
Activity: 630
Merit: 502
How fast is the 1950X at these SHA supported algorithms?
jr. member
Activity: 196
Merit: 1
I've uploaded a new windows binaries package of v3.7.7 to git with support for SHA. I also trimmed some
of the file names to remove redundancy.

4way includes avx2
avx2 includes avx
avx includes aes and sse4.2

It's avaiable on the releases page or this direct link:

https://github.com/JayDDee/cpuminer-opt/files/1569739/cpuminer-opt-3.7.7-windows-v2.zip

Be careful with sha, only the AMD Ryzen family supports it at this time.

Consider this a beta for the new Windows build system.



Great! SHA works great! Your miner is blazing fast! I will do the benchmarks like I did with 4ward build.

Apologize me, but can I ask one more build? SHA AVX (not AVX2) version.

I explain:
Ryzen doesn't have a "fine" AVX2 implementation. In some algos, AVX is faster than AVX2. We are trying to find the best setup with SHA, so maybe AVX setup can give one more option to try. What do you think?
member
Activity: 473
Merit: 18
I've uploaded a new windows binaries package of v3.7.7 to git with support for SHA. I also trimmed some
of the file names to remove redundancy.

4way includes avx2
avx2 includes avx
avx includes aes and sse4.2

It's avaiable on the releases page or this direct link:

https://github.com/JayDDee/cpuminer-opt/files/1569739/cpuminer-opt-3.7.7-windows-v2.zip

Be careful with sha, only the AMD Ryzen family supports it at this time.

Consider this a beta for the new Windows build system.



Great, now I don't need to compile it every time )
You version is even slightly faster that mine now, and much better than your old one

version2:
Code:
[2017-12-19 09:06:07] 4 miner threads started, using 'm7m' algorithm.
[2017-12-19 09:06:11] Total: 131.07 kH, 30.26 kH/s
[2017-12-19 09:06:17] Total: 543.27 kH, 116.68 kH/s
[2017-12-19 09:06:22] Total: 463.73 kH, 118.06 kH/s
[2017-12-19 09:06:27] Total: 588.01 kH, 118.16 kH/s
[2017-12-19 09:06:32] Total: 558.14 kH, 116.67 kH/s
[2017-12-19 09:06:37] Total: 463.77 kH, 118.15 kH/s
[2017-12-19 09:06:42] Total: 558.65 kH, 118.14 kH/s
[2017-12-19 09:06:47] Total: 559.65 kH, 117.80 kH/s

mine:
Code:
[2017-12-19 09:06:50] 4 miner threads started, using 'm7m' algorithm.
[2017-12-19 09:06:54] Total: 131.07 kH, 28.88 kH/s
[2017-12-19 09:06:55] Total: 422.10 kH, 112.21 kH/s
[2017-12-19 09:07:00] Total: 515.58 kH, 113.07 kH/s
[2017-12-19 09:07:05] Total: 457.03 kH, 113.83 kH/s
[2017-12-19 09:07:10] Total: 569.14 kH, 114.00 kH/s
[2017-12-19 09:07:15] Total: 570.00 kH, 114.54 kH/s
[2017-12-19 09:07:20] Total: 572.70 kH, 114.29 kH/s

old:
Code:
[2017-12-19 09:07:23] 4 miner threads started, using 'm7m' algorithm.
[2017-12-19 09:07:28] Total: 131.07 kH, 25.25 kH/s
[2017-12-19 09:07:33] Total: 439.86 kH, 101.17 kH/s
[2017-12-19 09:07:38] Total: 406.51 kH, 104.49 kH/s
[2017-12-19 09:07:43] Total: 522.45 kH, 104.94 kH/s
[2017-12-19 09:07:48] Total: 423.00 kH, 104.35 kH/s
[2017-12-19 09:07:53] Total: 521.77 kH, 105.34 kH/s
[2017-12-19 09:07:58] Total: 526.68 kH, 105.30 kH/s
legendary
Activity: 1470
Merit: 1114
One thing I couldn't resolve is that neoscrypt always fails to run (same in My9bot's version)

I can look into this now.
legendary
Activity: 1470
Merit: 1114
I've uploaded a new windows binaries package of v3.7.7 to git with support for SHA. I also trimmed some
of the file names to remove redundancy.

4way includes avx2
avx2 includes avx
avx includes aes and sse4.2

It's avaiable on the releases page or this direct link:

https://github.com/JayDDee/cpuminer-opt/files/1569739/cpuminer-opt-3.7.7-windows-v2.zip

Be careful with sha, only the AMD Ryzen family supports it at this time.

Consider this a beta for the new Windows build system.

legendary
Activity: 1470
Merit: 1114
I found the cross-compile instructions

https://bitcointalksearch.org/topic/m.23580581

since then i compiled it all to a script:
Code:
#!/bin/bash
OPENSSL_VER='1.1.0g'
CURL_VER='7.56.1'
GMP_VER='6.1.2'
DIR=$(pwd)
CORES=$(grep -c ^processor /proc/cpuinfo)

sudo apt-get install build-essential libz-mingw-w64-dev libz-mingw-w64 git autoconf -y

[[ -f openssl-${OPENSSL_VER}.tar.gz ]] || wget https://www.openssl.org/source/openssl-${OPENSSL_VER}.tar.gz
[[ -d openssl-${OPENSSL_VER} ]] || tar xvfz openssl-${OPENSSL_VER}.tar.gz
cd openssl-${OPENSSL_VER}
./Configure mingw64 shared --cross-compile-prefix=x86_64-w64-mingw32- || exit 1
make -j ${CORES} || exit 1

cd ${DIR}
[[ -f curl-${CURL_VER}.tar.bz2 ]] || wget https://curl.haxx.se/download/curl-${CURL_VER}.tar.bz2
[[ -d curl-${CURL_VER} ]] || tar xvfj curl-${CURL_VER}.tar.bz2
cd curl-${CURL_VER}
./configure --with-winssl --with-winidn --host=x86_64-w64-mingw32 || exit 1
make -j ${CORES} || exit 1

cd ${DIR}
[[ -f gmp-${GMP_VER}.tar.bz2 ]] || wget https://gmplib.org/download/gmp/gmp-${GMP_VER}.tar.bz2
[[ -d gmp-${GMP_VER} ]] || tar xvfj gmp-${GMP_VER}.tar.bz2
cd gmp-${GMP_VER}
./configure --host=x86_64-w64-mingw32 || exit 1
make -j ${CORES} || exit 1

cd ${DIR}
[[ -d cpuminer-opt ]] || git clone https://github.com/JayDDee/cpuminer-opt.git
cd cpuminer-opt
ln -s ../gmp-${GMP_VER}/gmp.h

cat > winbuild-cross.sh << EOF
#!/bin/bash

export LDFLAGS="-L${DIR}/curl-${CURL_VER}/lib/.libs -L${DIR}/gmp-${GMP_VER}/.libs -L${DIR}/openssl-${OPENSSL_VER}"
F="--with-curl=${DIR}/curl-${CURL_VER} --with-crypto=${DIR}/openssl-${OPENSSL_VER} --host=x86_64-w64-mingw32"

sed -i 's/"-lpthread"/"-lpthreadGC2"/g' configure.ac


mkdir release
cp /usr/x86_64-w64-mingw32/lib/zlib1.dll release/
cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll release/
cp /usr/lib/gcc/x86_64-w64-mingw32/6.2-win32/libstdc++-6.dll release/
cp /usr/lib/gcc/x86_64-w64-mingw32/6.2-win32/libgcc_s_seh-1.dll release/
cp ${DIR}/openssl-${OPENSSL_VER}/libcrypto-1_1-x64.dll release/
cp ${DIR}/curl-${CURL_VER}/lib/.libs/libcurl-4.dll release/


make distclean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=core-avx2 -Wall -DFOUR_WAY" ./configure \$F
make -j ${CORES}
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-4way.exe

make clean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=core-avx2 -Wall" ./configure \$F
make -j ${CORES}
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-aes-avx2.exe

make clean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=znver1 -Wall" ./configure \$F
make -j ${CORES}
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-aes-sha.exe

make clean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=corei7-avx -Wall" ./configure \$F
make -j ${CORES}
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-aes-avx.exe

make clean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -maes -msse4.2 -Wall" ./configure \$F
make -j ${CORES}
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-aes-sse42.exe

make clean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=corei7 -Wall" ./configure \$F
make -j ${CORES}
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-sse42.exe

make clean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 -march=core2 -Wall" ./configure \$F
make -j ${CORES}
strip -s cpuminer.exe
mv cpuminer.exe release/cpuminer-sse2.exe

EOF

chmod a+x winbuild-cross.sh
./winbuild-cross.sh

This is perfect. It's exactly what I needed. Since 4way is somewhat stalled right now I tried it out in a Ubuntu-16.04 VM.
I ran the script manually, had to make adjustments for compiler version, and lack or "znver1" arch but I built a 4way with sha.
I just can't run it anywhere.

I just need to tweak a few things and the next release should have the full suite of binaries, with the addition of AVX2-SHA
and 4WAY-SHA.
member
Activity: 473
Merit: 18
is CPU mining zcoin (lyra2z) still profitable? I have i7-7800X 3.5 GHz giving me about 950-971 kH/s where my 1080Ti gives me 3300 kH/s. I could not find easy resources to see if CPU is profitable
see for yourself on http://whattomine.com/coins/175-xzc-lyra2z
on my cpu, core i5 7600k it gives almost 500 khs, which is above 1$ per day (at current difficulty) after deducting power costs
Pages:
Jump to: