Bitcoin Forum
March 18, 2019, 05:11:05 PM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 [154] 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 »
  Print  
Author Topic: [ANN]: cpuminer-opt v3.8.8.1, open source optimized multi-algo CPU miner  (Read 419060 times)
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 18, 2017, 06:05:53 PM
 #3061

Is there a possibility to make a SHA version with AES-AVX/AES-AVX2/4WAY to improve the tests?

There should be no problem adding 4way to the Ryzen build. 4way only needs AVX2 and all Ryzens
have it. Itcould become an issue in the future if some low-budget CPUs are built with SHA but not
AVX2.

Edit: At this time the only algo that can use both 4way and SHA is skein.

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1552929065
Hero Member
*
Offline Offline

Posts: 1552929065

View Profile Personal Message (Offline)

Ignore
1552929065
Reply with quote  #2

1552929065
Report to moderator
Bitcope
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
December 18, 2017, 06:27:18 PM
 #3062

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
4ward
Member
**
Offline Offline

Activity: 444
Merit: 17


View Profile
December 18, 2017, 06:38:50 PM
 #3063

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

joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 18, 2017, 07:31:45 PM
 #3064


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.

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 18, 2017, 11:27:03 PM
Last edit: December 19, 2017, 01:04:27 AM by joblo
 #3065

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.


cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 19, 2017, 02:46:36 AM
 #3066

One thing I couldn't resolve is that neoscrypt always fails to run (same in My9bot's version)

I can look into this now.

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
4ward
Member
**
Offline Offline

Activity: 444
Merit: 17


View Profile
December 19, 2017, 07:09:08 AM
 #3067

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

Larvitar
Jr. Member
*
Offline Offline

Activity: 198
Merit: 1


View Profile
December 19, 2017, 11:50:47 AM
 #3068

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?
NameTaken
Hero Member
*****
Offline Offline

Activity: 630
Merit: 502


View Profile
December 19, 2017, 11:52:38 AM
 #3069

How fast is the 1950X at these SHA supported algorithms?
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 19, 2017, 02:23:17 PM
Last edit: December 19, 2017, 02:54:01 PM by joblo
 #3070

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?

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 19, 2017, 02:37:17 PM
 #3071

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.

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
Larvitar
Jr. Member
*
Offline Offline

Activity: 198
Merit: 1


View Profile
December 19, 2017, 02:54:39 PM
 #3072

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.
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 19, 2017, 03:09:43 PM
Last edit: December 19, 2017, 04:11:37 PM by joblo
 #3073

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.

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
4ward
Member
**
Offline Offline

Activity: 444
Merit: 17


View Profile
December 19, 2017, 04:15:51 PM
 #3074

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

Painlor
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
December 19, 2017, 04:37:50 PM
 #3075

since today I got an error by doing:

./build.sh


compilation terminated.
Makefile:3144: recipe for target 'algo/cpuminer-m7m.o' failed
make[2]: *** [algo/cpuminer-m7m.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/cpuminer-util.Tpo .deps/cpuminer-util.Po
mv -f .deps/cpuminer-cpu-miner.Tpo .deps/cpuminer-cpu-miner.Po
mv -f algo/.deps/cpuminer-neoscrypt.Tpo algo/.deps/cpuminer-neoscrypt.Po
make[2]: Leaving directory '/downloads/7/77/cpuminer-opt'
Makefile:4147: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/downloads/7/77/cpuminer-opt'
Makefile:725: recipe for target 'all' failed
make: *** [all] Error 2
strip: 'cpuminer': No such file

i have changed nothing. Thanks for Help
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 19, 2017, 05:34:30 PM
 #3076

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?

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
4ward
Member
**
Offline Offline

Activity: 444
Merit: 17


View Profile
December 19, 2017, 08:07:41 PM
 #3077

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 )

Larvitar
Jr. Member
*
Offline Offline

Activity: 198
Merit: 1


View Profile
December 19, 2017, 09:22:02 PM
 #3078

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?
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 19, 2017, 09:34:34 PM
 #3079

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.

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
joblo
Legendary
*
Offline Offline

Activity: 1148
Merit: 1050


View Profile
December 19, 2017, 09:38:16 PM
 #3080


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.

cpuminer-opt developer, https://bitcointalk.org/index.php?topic=1326803.0
BTC: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT,
ETH: 0x72122edabcae9d3f57eab0729305a425f6fef6d0
Pages: « 1 ... 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 [154] 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!