Author

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

sr. member
Activity: 312
Merit: 250
Yep, -march=native still fails.

Also ./build.sh produces slightly slower binary for me on Intel and AMD (with changed -march=), maybe too many CFLAGS?

Thanks. -march=native chooses a lower arch than your CPU is capable of. You can confirm this with this command

gcc -march=native -Q --help=target

You will likely see amdfam10 but will get better performance with btver1.
cpuminer-opt v3.1.18 on AMD

Command:
Code:
./autogen.sh && ./configure CFLAGS="-O3 -march=amdfam10" --with-curl --with-crypto && make

Result: Build Failed, gcc tried to compile AES-NI binary.

Command:
Code:
./autogen.sh && ./configure CFLAGS="-O3 -march=btver1" --with-curl --with-crypto && make

Result: Build Successful
legendary
Activity: 1470
Merit: 1114
legendary
Activity: 1470
Merit: 1114
Yep, -march=native still fails.

Also ./build.sh produces slightly slower binary for me on Intel and AMD (with changed -march=), maybe too many CFLAGS?

Thanks. -march=native chooses a lower arch than your CPU is capable of. You can confirm this with this command

gcc -march=native -Q --help=target

You will likely see amdfam10 but will get better performance with btver1.
sr. member
Activity: 312
Merit: 250
Yep, -march=native still fails.

Also ./build.sh produces slightly slower binary for me on Intel and AMD (with changed -march=), maybe too many CFLAGS?
legendary
Activity: 1470
Merit: 1114
When using the git fork with this command line
Code:
./autogen.sh && CXXFLAGS="-std=gnu++11" ./configure CFLAGS="-O3 -march=btver1" --with-curl --with-crypto && make
I got a successful compile and working binary on AMD

Code:
         **********  cpuminer-multi 1.2-dev  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI extension.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0 and Jeff Garzik.

Checking CPU capatibility of AMD Phenom(tm) II X4 940 Processor...
   CPU arch supports AES_NI... NO.
   CPU arch supports SSE2..... YES.
   SW built with AES_NI....... NO.
   SW built with SSE2......... YES.
   Algo supports AES_NI....... YES.
Starting mining without AES_NI optimisations...

Thanks. I presume -march=native still fails.

I will soon release 3.1.18 with  the following:

- Implement CPU check logic from hmage
    - remove check for inferior SW build on SSE2 CPU
    - add check for superior build
- Suppress messages not used in decision making
- document AMD workaround
- fix set_data_size bug

Edit: here is a draft of the test I intend to add to the build instructions:

Some users with AMD CPUs without AES_NI have reported problems compiling
with build.sh or "-march=native". Problems have included compile errors
and poor performance. These users are recommended to compile manually
specifying "-march=btver1" on the configure command line.
sr. member
Activity: 312
Merit: 250
When using the git fork with this command line
Code:
./autogen.sh && CXXFLAGS="-std=gnu++11" ./configure CFLAGS="-O3 -march=btver1" --with-curl --with-crypto && make
I got a successful compile and working binary on AMD

Code:
         **********  cpuminer-multi 1.2-dev  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI extension.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0 and Jeff Garzik.

Checking CPU capatibility of AMD Phenom(tm) II X4 940 Processor...
   CPU arch supports AES_NI... NO.
   CPU arch supports SSE2..... YES.
   SW built with AES_NI....... NO.
   SW built with SSE2......... YES.
   Algo supports AES_NI....... YES.
Starting mining without AES_NI optimisations...
legendary
Activity: 1470
Merit: 1114
@hmage

I see the difference in your logic in the sse2 check. I checked for an inferiour build missing sse2 (since removed in 3.1.17)
and you check for a superiour build including aes_ni. In practical terms the superiour check seems more important as that
scenario could occur if cpuminer-opt was cross compiled on a CPU with aes-ni. On the other hand cross compiling on a
CPU without sse2 would have failed.

Removing the check for inferiour build, as done in 3.1.17 and your fork, is harmless and will become permanent.
I will add a check for superiour build because that is a possible scenario. Both pending test results from users with
real AMD CPUs with sse2 but without aes-ni.

So if I read correctly - we should use github fork of hmage, which is with fixed CPU, OS and algo checks.
If everything is OK on AMD CPUs it will become the main branch of cpuminer-opt?

It's up to hmage whether he wants to maintain his fork. I intend to implement the fix on mine once it has been
properly tested.

Even with the fix I believe AMD will require a workaround for -march
sr. member
Activity: 312
Merit: 250
@hmage

I see the difference in your logic in the sse2 check. I checked for an inferiour build missing sse2 (since removed in 3.1.17)
and you check for a superiour build including aes_ni. In practical terms the superiour check seems more important as that
scenario could occur if cpuminer-opt was cross compiled on a CPU with aes-ni. On the other hand cross compiling on a
CPU without sse2 would have failed.

Removing the check for inferiour build, as done in 3.1.17 and your fork, is harmless and will become permanent.
I will add a check for superiour build because that is a possible scenario. Both pending test results from users with
real AMD CPUs with sse2 but without aes-ni.

So if I read correctly - we should use github fork of hmage, which is with fixed CPU, OS and algo checks.
If everything is OK on AMD CPUs it will become the main branch of cpuminer-opt?
legendary
Activity: 1470
Merit: 1114
@hmage

I see the difference in your logic in the sse2 check. I checked for an inferiour build missing sse2 (since removed in 3.1.17)
and you check for a superiour build including aes_ni. In practical terms the superiour check seems more important as that
scenario could occur if cpuminer-opt was cross compiled on a CPU with aes-ni. On the other hand cross compiling on a
CPU without sse2 would have failed.

Removing the check for inferiour build, as done in 3.1.17 and your fork, is harmless and will become permanent.
I will add a check for superiour build because that is a possible scenario. Both pending test results from users with
real AMD CPUs with sse2 but without aes-ni.
legendary
Activity: 1470
Merit: 1114

algo/hodl/hodl-gate.c:132:7: error: ‘algo_gate_t’ has no member named ‘set_data_size’
   gate->set_data_size          = (void*)&hodl_set_data_size;
       ^
make[2]: *** [algo/hodl/cpuminer-hodl-gate.o] Fehler 1
make[2]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird verlassen
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird verlassen
make: *** [all] Fehler 2
kim@spiel-2:~/cpuminer-opt-3.1.17$


That's a coding error. I just recompiled successfuly from the tarball I uploaded  so don't know why you got
that error.

This line happens when you're compiling for core2. You probably removed set_data_size everywhere but on that line. I had to remove it in my fork.


This is getting really weird. I reproduced the compile error with core2. It doesn't make any sense because
set_data_size is not conditional on the arch. I need to really dig into this.

Edit: I take that back, I found some weird code I need to sort out.

Edit2: set_data_size is a coding error on my part. When hodl was introduced set_data_size became targetted.
In 3.1.16 I eliminated the need for set_data_size but missed one reference in targetted code and failed to test
that target.

At this point with so many versions flying around I'm hesitant to rush out another one. Hmage seems to have
posted a version with the set_data_size fix so I'll wait to see if that solves both problems before I build another
release.


member
Activity: 83
Merit: 10

algo/hodl/hodl-gate.c:132:7: error: ‘algo_gate_t’ has no member named ‘set_data_size’
   gate->set_data_size          = (void*)&hodl_set_data_size;
       ^
make[2]: *** [algo/hodl/cpuminer-hodl-gate.o] Fehler 1
make[2]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird verlassen
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird verlassen
make: *** [all] Fehler 2
kim@spiel-2:~/cpuminer-opt-3.1.17$


That's a coding error. I just recompiled successfuly from the tarball I uploaded  so don't know why you got
that error.

This line happens when you're compiling for core2. You probably removed set_data_size everywhere but on that line. I had to remove it in my fork.

Tried it out to delete the sourcecode line, then "SW built for SSE2..........NO." change to "YES", but the miner stops working immediately; tried also several -march versions

same here with: Sempron145 CPU, configure und make with no mistakes

Code:
         **********  cpuminer-opt 3.1.16  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI extension.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0 and Jeff Garzik.

Checking CPU capatibility...
        AMD Phenom(tm) II X4 940 Processor
   CPU arch supports AES_NI...NO.
   CPU arch supports SSE2.....YES.
   SW built for SSE2..........NO.
Incompatible SW build, rebuild with "-march=native"

Why?

Try using this fork -- https://github.com/hmage/cpuminer-opt -- it should report SSE and AES properly. Let us know if it works, I'll offer the diff to joblo.
legendary
Activity: 1470
Merit: 1114

algo/hodl/hodl-gate.c:132:7: error: ‘algo_gate_t’ has no member named ‘set_data_size’
   gate->set_data_size          = (void*)&hodl_set_data_size;
       ^
make[2]: *** [algo/hodl/cpuminer-hodl-gate.o] Fehler 1
make[2]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird verlassen
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird verlassen
make: *** [all] Fehler 2
kim@spiel-2:~/cpuminer-opt-3.1.17$


That's a coding error. I just recompiled successfuly from the tarball I uploaded  so don't know why you got
that error.
full member
Activity: 192
Merit: 100
kim@spiel-2:~/cpuminer-opt-3.1.17$ ./configure CFLAGS="-O3 -march=btver1" --with-curl --with-crypto && make
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc -std=gnu99 needs -traditional... no
checking dependency style of gcc -std=gnu99... gcc3
checking for ranlib... ranlib
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/sysctl.h... yes
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking whether le16dec is declared... no
checking whether le16enc is declared... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for getopt_long... yes
checking whether we can compile AVX code... yes
checking whether we can compile XOP code... yes
checking whether we can compile AVX2 code... yes
checking for json_loads in -ljansson... yes
checking for pthread_create in -lpthread... yes
checking whether __uint128_t is supported... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compat/Makefile
config.status: creating compat/jansson/Makefile
config.status: creating cpuminer-config.h
config.status: cpuminer-config.h is unchanged
config.status: executing depfiles commands
make  all-recursive
make[1]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird betreten
Making all in compat
make[2]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17/compat« wird betreten
make[3]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17/compat« wird betreten
make[3]: Für das Ziel »all-am« ist nichts zu tun.
make[3]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17/compat« wird verlassen
make[2]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17/compat« wird verlassen
make[2]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird betreten
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -O3 -march=btver1  -Iyes/include -Iyes/include -MT algo/hodl/cpuminer-hodl-gate.o -MD -MP -MF algo/hodl/.deps/cpuminer-hodl-gate.Tpo -c -o algo/hodl/cpuminer-hodl-gate.o `test -f 'algo/hodl/hodl-gate.c' || echo './'`algo/hodl/hodl-gate.c
algo/hodl/hodl-gate.c: In function ‘register_hodl_algo’:
algo/hodl/hodl-gate.c:132:7: error: ‘algo_gate_t’ has no member named ‘set_data_size’
   gate->set_data_size          = (void*)&hodl_set_data_size;
       ^
make[2]: *** [algo/hodl/cpuminer-hodl-gate.o] Fehler 1
make[2]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird verlassen
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis »/home/kim/cpuminer-opt-3.1.17« wird verlassen
make: *** [all] Fehler 2
kim@spiel-2:~/cpuminer-opt-3.1.17$
legendary
Activity: 1470
Merit: 1114
I tried:

... :~/cpuminer-opt-3.1.17$ ./configure CFLAGS="-O3 -march=btver1" --with-curl --with-crypto && make

"configure" o.k., "make" completly failed

Console?
full member
Activity: 192
Merit: 100
I tried:

... :~/cpuminer-opt-3.1.17$ ./configure CFLAGS="-O3 -march=btver1" --with-curl --with-crypto && make

"configure" o.k., "make" completly failed
legendary
Activity: 1470
Merit: 1114
Is there a mac os version?

Can I compile this on mac os, if yes, how?

Sorry, Linux only.
newbie
Activity: 2
Merit: 0
Is there a mac os version?

Can I compile this on mac os, if yes, how?
legendary
Activity: 1470
Merit: 1114
here my output, ubuntu 14.04, will try your next version

.... :~$ gcc -march=native -Q --help=target | fgrep march
  -march=                           amdfam10


Thanks. Did you use build.sh or enter the commands individually?

Could you also try "-march=btver1", it worked for another user with, IIRC, a similar CPU.

I think maybe amdfam10 isn't being seen as SSE2 capable. If that is the case it is outside
the scope of the application and appears to be a compiler issue. The change to disable
the SSE2 build check in v3.1.17 will become permanent and a workaround will be documented
for AMD CPUs recommending "-march=btver1".
full member
Activity: 192
Merit: 100
here my output, ubuntu 14.04, will try your next version

.... :~$ gcc -march=native -Q --help=target | fgrep march
  -march=                           amdfam10
legendary
Activity: 1470
Merit: 1114
I've released cpuminer-opt v3.1.17 due to problems with AMD CPUs. The 3.1.16 package was also
not clean, I don't know if the garbage I left lying wroind contrinuted to the problems seen by users.

Here is a clean package with the SSE2 build check disabled.

https://drive.google.com/file/d/0B0lVSGQYLJIZdE0wZ1d6VzJIeG8/view?usp=sharing
Jump to: