Unix/Linux Go Back    


High Performance Computing Message Passing Interface (MPI) programming and tuning, MPI library installation and management, parallel administration tools, cluster monitoring, cluster optimization, and more HPC topics.

AVX for Linux (32-bit)

High Performance Computing


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-10-2014
GG2014 GG2014 is offline
Registered User
 
Join Date: May 2014
Last Activity: 21 May 2014, 12:35 PM EDT
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
AVX for Linux (32-bit)

For Intel processors we've a lot of new instruction sets (AVX and AVX2 already exists, AVX512 is announced). Therefore an application has to check during run time which instruction sets are available. I've written for that purpopse some procedures, which are callable from C or C++.

A strange result is that: With Ubuntu (64-bit), AVX is properly indicated. The 32-bit version doesn't indicate AVX (same CPU, other OS). So, the reason is probably that AVX isn't supported from the 32-bit kernel. I've an Ivy Bridge processor, which supports AVX. Does anyone know more destails? Your help and tips are welcome.

Gunther
Sponsored Links
    #2  
Old Unix and Linux 05-10-2014
alister alister is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 11 June 2014, 8:40 PM EDT
Posts: 3,231
Thanks: 179
Thanked 976 Times in 790 Posts
Welcome to the forum.

Your post is devoid of specifics, so don't expect much targeted advice.

Are you using the CPUID instruction to detect AVX? That should work. For the specifics, there are posts on intel's site (and probably other places) demonstrating what to write/read from which registers.

However, if you actually want to use AVX, simply detecting CPU support is insufficient. Even if the CPU implements AVX, it cannot be used without operating system support (e.g. to save/restore the registers across context switches).

Regards,
Alister
The Following User Says Thank You to alister For This Useful Post:
GG2014 (05-10-2014)
Sponsored Links
    #3  
Old Unix and Linux 05-10-2014
GG2014 GG2014 is offline
Registered User
 
Join Date: May 2014
Last Activity: 21 May 2014, 12:35 PM EDT
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by alister View Post
Welcome to the forum.
Thank you for your warm words.Linux

Quote:
Originally Posted by alister View Post
Are you using the CPUID instruction to detect AVX?
Yes, that's necessary. My code follows the recommendations of Intel in every detail. That's for sure.

Quote:
Originally Posted by alister View Post
However, if you actually want to use AVX, simply detecting CPU support is insufficient. Even if the CPU implements AVX, it cannot be used without operating system support (e.g. to save/restore the registers across context switches).
That's the tricky point. Under 64-bit Linux support both the CPU and the operating system the AVX instruction set. No problem. But under 32-bit Linux, it lacks the support of the operating system.

At the moment I'm writing a program for a more detailed analysis of the problem.

Gunther
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
migrating unix mp-ras 32 bit to linux suse 64 bit mrodrig UNIX for Advanced & Expert Users 1 07-05-2009 10:19 AM
boot the 32 bit kernel on a 64 bit PPC Linux machine? philrau Red Hat 0 08-13-2008 03:14 PM
compiling 32 bit application on 64 bit linux(x86_64) uttamhoode Gentoo 3 12-17-2007 01:21 PM



All times are GMT -4. The time now is 08:48 PM.