Compiler Error on Linux systems: suffix or operands invalid for ‘vbroadcastss’ solution Error scenario solution reference
Error: suffix or operands invalid for ‘vbroadcastss’ solution
When running Kaggle-2014-Criteo-Master open source program, I encountered errors when compiling and running GBDT, libffm program and Makefile. The intuition was related to the system running the program. A search led to a solution. The
problem is primarily that GCC or g++ compile-time sets the -march parameter, which is a platform-dependent parameter. You need to modify this parameter value to correspond to the machine.
(program download address: https://github.com/ycjuan/kaggle-2014-criteo)
for this open source programs need to modify: Makefile
[file path]/kaggle-2014-criteo/solvers/ GBDT
[file path]/kaggle-2014-criteo/solvers/libffm-1.13 Makefile
-march =native march=broadwel
then Makefile error disappears.
An error scenario
Specifically report the following mistakes:
[dhy@Master kaggle-2014-criteo-master]$ make
make -C solvers/gbdt
make[1]: Entering directory `/home/dhy/code/kaggle-2014-criteo-master/solvers/gbdt'
g++ -Wall -Wconversion -O2 -fPIC -std=c++0x -march=native -fopenmp -o gbdt src/train.cpp src/common.cpp src/timer.cpp src/gbdt.cpp
make[1]: Leaving directory `/home/dhy/code/kaggle-2014-criteo-master/solvers/gbdt'
ln -sf solvers/gbdt/gbdt
make -C solvers/libffm-1.13
make[1]: Entering directory `/home/dhy/code/kaggle-2014-criteo-master/solvers/libffm-1.13'
g++ -Wall -O3 -std=c++0x -march=native -fopenmp -DUSEOMP -c -o ffm.o ffm.cpp
/tmp/ccuUtD2f.s: Assembler messages:
/tmp/ccuUtD2f.s:3671: Error: suffix or operands invalid for `vbroadcastss'
/tmp/ccuUtD2f.s:3787: Error: suffix or operands invalid for `vbroadcastss'
/tmp/ccuUtD2f.s:3917: Error: suffix or operands invalid for `vbroadcastss'
/tmp/ccuUtD2f.s:4071: Error: suffix or operands invalid for `vbroadcastss'
make[1]: *** [ffm.o] Error 1
make[1]: Leaving directory `/home/dhy/code/kaggle-2014-criteo-master/solvers/libffm-1.13'
make: *** [ffm-train] Error 2
The solution
Modify the Makefile, – march = native for – march = broadwell
this is because the GCC/g + + parameters march on different architecture platform corresponding to different – march Options, refer to: https://gcc.gnu.org/onlinedocs/gcc in the “3.18 Machine – Dependent Options” section. To view the machine’s corresponding -march, run the following command 1 :
$gcc -c -Q -march=native --help=target | grep march
My machine to execute the above command appears:
-march= broadwell
Therefore, in the compile file Makefile, the g++ or GCC parameter is set to -march= broadwell.
different cpus corresponding to march selection can refer to the following table: 2
The
CPU type th> | march option th> tr> |
---|---|
AMD Barcelona td> | – march = Barcelona td> tr> |
AMD Bobcat td> | – march = btver1 td> tr> |
AMD Jaguar | – march=btver2 |
AMD Bulldozer | – march=bdver1 |
AMD Piledriver | – march=bdver2 |
AMD Steamroller | – march=bdver3 |
Intel Westmere | – march=westmere |
Intel Core Nehalem | – march=corei7 |
Intel Core Sandy Bridge | – march=corei7-avx |
Intel Core Ivy Bridge | – march=core-avx-i |
Intel Core Haswell | – march=core-avx2 |
Intel Core Broadwell | – march=broadwell |
Intel Atom Bonnell | – march=bonnell |
Intel Atom Silvermont | – march=silvermont |
reference
- https://blog.csdn.net/listener51/article/details/80468021 ↩ ︎ http://blog.sciencenet.cn/blog-365047-1014406.html ↩ ︎ ol>