Posts and how to...
Many useful articles and instructions!
- 
Install depends sudo apt-get install -y git sudo apt-get install -y automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++ sudo apt-get install -y lib32z1-dev
- 
download aocc-compiler-2.1.0_1_amd64.deb from https://developer.amd.com/amd-aocc/ 
- 
install AOCC in Ubuntu sudo dpkg -i aocc-compiler-2.1.0_1_amd64.deb source /opt/AMD/aocc-compiler-2.1.0/setenv_AOCC.sh
- 
check the installed AOCC compiler clang -v
- 
Download cpuminer git clone https://github.com/bitzeny/cpuminer.git bitzeny-miner cd bitzeny-miner ./autogen.sh
AMD Optimizing C/C++ Compiler(AOCC) optimization CPUminer for Ryzen
We will test the new AMD compiler with optimization for Ryzen processors. In various miners.
How to install AOCC in ubuntu 16.04 (18.04, 19.04) and compile cpuminer with optimization for AMD Ryzen
AOCC Docs - https://developer.amd.com/wp-content/resources/AOCC-2.1-Install-Guide.pdf
Compile and test with gcc
./configure CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"
make
./minerd --benchmark -a yescrypt -t 1Ryzen 2600 = 0.79 khash/s
Compile and test with AOCC
make clean
./configure CC=clang CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"
make
./minerd --benchmark -a yescrypt -t 1Ryzen 2600 = 0.794 khash/s
make clean
./configure CC=clang CFLAGS="-O3 -march=znver2 -funroll-loops -fomit-frame-pointer"
make
./minerd --benchmark -a yescrypt -t 1Ryzen 2600 = 0.796 khash/s
Test Bitzeny Cpuminer with yespower 0.5 (yescrypt compatibility)
Install bitzeny cpuminer
git clone https://github.com/BitzenyCoreDevelopers/cpuminer.git bitzeny-yespower
cd bitzeny-yespower
./autogen.shwith gcc
./configure CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"
make 
./minerd --benchmark -a yespower -t 1with AOCC
make clean
./configure CC=clang CFLAGS="-O3 -march=native -mno-avx2"
make
./minerd --benchmark -a yespower -t 1speed AOCC in yespower < gcc
Test Bitzeny Cpuminer for Bellcoin with yespower 1.0
Change line https://github.com/BitzenyCoreDevelopers/cpuminer/blob/master/yespower/yespower.c#L45 to
 static const yespower_params_t yespower_BITZENY = {YESPOWER_1_0, 2048, 32, NULL, 0};with gcc
make clean
./configure CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"
make 
./minerd --benchmark -a yespower -t 1Ryzen 2600 = 0.276 khash/s
make clean
./configure CFLAGS="-O3 -msse2 -Wall -funroll-loops -fomit-frame-pointer"
make 
./minerd --benchmark -a yespower -t 1Ryzen 2600 = 0.278 khash/s
make clean
./configure CFLAGS="-O3 -msse2 -Wall"
make 
./minerd --benchmark -a yespower -t 1Ryzen 2600 = 0.277 khash/s
with AOCC
make clean
./configure CC=clang CFLAGS="-O3 -march=native -mno-avx2"
make
./minerd --benchmark -a yespower -t 1Ryzen 2600 = 0.258 khash/s
./configure CC=clang CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"./configure CC=clang CFLAGS="-O3 -march=znver2 -funroll-loops -fomit-frame-pointer"./configure CC=clang CFLAGS="-O3 -march=znver1 -funroll-loops -fomit-frame-pointer"Ryzen 2600 = 0.256 khash/s
Test cpuminer-opt with AOCC
you need to remove all algorithms from the miner, except yespower
git clone https://github.com/cpu-pool/cpuminer-opt-cpupower.gitchmod +x autogen.sh
./autogen.sh || echo donebefore every configure
make cleanafter configure
make
./cpuminer --benchmark -a yespower -t 1with gcc
CFLAGS="-O3 -msse2 -Wall" ./configure --with-curlRyzen 2600 = 0.276 khash/s
CFLAGS="-O3 -msse2 -Wall -funroll-loops -fomit-frame-pointer" ./configure --with-curlRyzen 2600 = 0.278 khash/s
with AOCC
./configure --with-curl CC=clang CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"Ryzen 2600 = 0.253 khash/s
./configure --with-curl CC=clang CFLAGS="-O3 -msse2 -Wall"Ryzen 2600 = 0.267 khash/s
Test Koto Miner on optimization for Ryzen (better AOCC or GCC?)
install Koto Miner
https://github.com/KotoDevelopers/cpuminer-yescryptresults:
with gcc
CFLAGS="-O3 -msse2 -Wall" ./configureRyzen 2600 - 0.88 khash/s
CFLAGS="-O3 -msse2 -Wall -funroll-loops -fomit-frame-pointer" ./configureRyzen 2600 - 0.88 khash/s
with AOCC
./configure CC=clang CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"Ryzen 2600 - 0.80 khash/s
./configure CC=clang CFLAGS="-O3 -msse2 -Wall"Ryzen 2600 - 0.87 khash/s
./configure CC=clang CFLAGS="-O3 -march=znver1"./configure CC=clang CFLAGS="-O3 -march=znver2"Ryzen 2600 - 0.82 khash/s
Results For algorithms yespower and yescrypt - the new optimized compiler from AMD does not give a gain.
p.s. - Thanks to cpu-pool.com for the material provided.





