mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2018-08-01, 08:44   #1
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

32×5×107 Posts
Default 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)
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")); }
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!

Luigi

P.S. Nevermind, I found this link and everything ran smoothly.
Now I have another programming issue, but it's not a Linux issue.

Last fiddled with by ET_ on 2018-08-01 at 09:22
ET_ is offline   Reply With Quote
Old 2018-08-01, 20:01   #2
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

23·3·72 Posts
Default

The processor listed in your post doesn't support AVX512.
You need a Skylake-X based processor (or one of the new Xeons)
VictordeHolland is offline   Reply With Quote
Old 2018-08-02, 06:22   #3
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

32×5×107 Posts
Default

Quote:
Originally Posted by VictordeHolland View Post
The processor listed in your post doesn't support AVX512.
You need a Skylake-X based processor (or one of the new Xeons)
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 The instruction should in fact return false and choose a different path code in such case.
ET_ is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming questions Xyzzy Programming 76 2015-01-24 04:35
Need some help on php programming pinhodecarlos Programming 2 2012-07-23 18:17
New to programming. What to do? lorgix Miscellaneous Math 9 2010-12-08 22:22
Linux vs Windows performance issue Freezer Information & Answers 15 2010-05-22 17:10
plz, help me in c programming alaa Homework Help 12 2007-06-12 22:17

All times are UTC. The time now is 08:33.


Sat Jul 17 08:33:48 UTC 2021 up 50 days, 6:21, 1 user, load averages: 1.21, 1.50, 1.51

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.