![]() |
Linux and programming issue
Hi all,
Please forgive me for presenting a request for help. I have an issue trying to compile code for AVX512. My setup: [code] Ubuntu Linux 16.04 LTS 64 bit, processor Intel® Pentium(R) CPU G2030 @ 3.00GHz × 2 uname -a Linux luigi-Aspire-MC605 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) [/code] My offending instruction: [code] g++ -Isieve -m64 -Wall -O2 -std=c++11 -c -o core/App.o core/App.cpp error: Parameter to builtin not valid: avx512vl bool CpuSupportsAvx512(void) { return (__builtin_cpu_supports("avx512f") && __builtin_cpu_supports("avx512vl")); } [/code] From tis layout, my impression is that gcc 5.4.0 can't code the instruction, and should be upgraded. 1 - Am I right? I heard horrible stories of people trying to upgrade the compiler to version 6 or 7 and losing the whole toolchain in the make, so I'm a bit scared about the process. 2 - Would you help me giving me a step-by-step procedure, or at least a working link with the correct instructions? Thank you! :smile: Luigi P.S. [COLOR="Red"]Nevermind,[/COLOR] I found [URL="https://gist.github.com/application2000/73fd6f4bf1be6600a2cf9f56315a2d91"]this[/URL] link and everything ran smoothly. Now I have another programming issue, but it's not a Linux issue. :smile: |
The processor listed in your post doesn't support AVX512.
You need a Skylake-X based processor (or one of the new Xeons) |
[QUOTE=VictordeHolland;492903]The processor listed in your post doesn't support AVX512.
You need a Skylake-X based processor (or one of the new Xeons)[/QUOTE] Thanks Victor. The issue was in the compiler, everything compiled fine with gcc 8.1 I know my processor has not AVX512 instructions, it is quite old :smile: The instruction should in fact return false and choose a different path code in such case. |
| All times are UTC. The time now is 08:33. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.