AMD Processors
Decrease font size
Increase font size
Topic Title: compiled on opteron, run on xeon
Topic Summary:
Created On: 02/16/2011 03:20 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 02/16/2011 03:20 AM
User is offline View Users Profile Print this message

Author Icon
a.green
Lurker

Posts: 9
Joined: 09/26/2010

Is there any compatibility considerations about mixed opteron and xeon cluster? I mean if I compile my source code in opteron 64 bit (using gcc), will the binary work on xeon?
 02/16/2011 05:47 PM
User is offline View Users Profile Print this message

Author Icon
MD - Moderator
Deployer of Mjölnir - House Keeping

Posts: 11102
Joined: 11/05/2003

Don't see why not, we compile firmware on all different Optiplex machines and they sport both AMD and Intel processors.

-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.

Physics? Ha! This is clearly magic and devilry at work. Prepare firewood! We have witches to burn!


MODERATOR
 02/17/2011 08:36 PM
User is offline View Users Profile Print this message

Author Icon
MU_Engineer
Dr. Mu

Posts: 1837
Joined: 08/26/2006

Originally posted by: a.green

Is there any compatibility considerations about mixed opteron and xeon cluster? I mean if I compile my source code in opteron 64 bit (using gcc), will the binary work on xeon?


Whether or not the binary runs depends on what you use in your CFLAGS and CXXFLAGS. The thing you don't want to do is have a binary compiled with SIMD extensions that one of the chips cannot execute. For example, using "-msse4a" or "-march=barcelona" in your flags may lead to the Xeons segfaulting on an "illegal instruction" error as no Intel CPU supports all of the SSE4A instructions. Likewise, no current Opteron can run all of the instructions in Intel's SSSE3, SSE4.1, SSE4.2, or AVX instruction sets, so any flag that calls them (including the "-march" flags for Core 2 and Core i7 CPUs) may cause segfaults on AMD CPUs. If in doubt, don't set the -march and don't use any -msse* flags. You can use -msse3 if you are running dual-core or greater Opterons since all 64-bit Xeons and dual-core or later Opterons support SSE3. Past SSE3, the SIMD instructions AMD and Intel CPUs support vary. AMD is supposed to be adding support for most of Intel's SIMD instructions in Bulldozer, but that's not shipped yet.

-------------------------
 02/18/2011 02:31 PM
User is offline View Users Profile Print this message

Author Icon
Mime
Troll Hunter

Posts: 8517
Joined: 10/06/2003

Yeah, that's the great and terrible thing about optimizing compilers. There's often a legion of compiler flags that can be used with them some of those are quite useful for tuning an application. However, there are others that when used in the wrong context can cause problems that make you want to burst into tears and curl up into a ball on the floor.

Aside from problems like that... I don't expect there to be a lot of trouble. Depending on the software you use for clustering you might even be able to use mixed instruction sets... although that does increase the likelihood of weirdness by a bit.

-------------------------
Containment Breach

Do not meddle in the affairs of archers, for they are subtle and quick to anger.
 02/20/2011 02:01 AM
User is offline View Users Profile Print this message

Author Icon
a.green
Lurker

Posts: 9
Joined: 09/26/2010

Originally posted by: MU_Engineer

Originally posted by: a.green



Is there any compatibility considerations about mixed opteron and xeon cluster? I mean if I compile my source code in opteron 64 bit (using gcc), will the binary work on xeon?




Whether or not the binary runs depends on what you use in your CFLAGS and CXXFLAGS. The thing you don't want to do is have a binary compiled with SIMD extensions that one of the chips cannot execute. For example, using "-msse4a" or "-march=barcelona" in your flags may lead to the Xeons segfaulting on an "illegal instruction" error as no Intel CPU supports all of the SSE4A instructions. Likewise, no current Opteron can run all of the instructions in Intel's SSSE3, SSE4.1, SSE4.2, or AVX instruction sets, so any flag that calls them (including the "-march" flags for Core 2 and Core i7 CPUs) may cause segfaults on AMD CPUs. If in doubt, don't set the -march and don't use any -msse* flags. You can use -msse3 if you are running dual-core or greater Opterons since all 64-bit Xeons and dual-core or later Opterons support SSE3. Past SSE3, the SIMD instructions AMD and Intel CPUs support vary. AMD is supposed to be adding support for most of Intel's SIMD instructions in Bulldozer, but that's not shipped yet.


Thanks, it was quite complete. I understand in what situations it might not work
 11/20/2011 06:22 AM
User is offline View Users Profile Print this message

Author Icon
wornomsf
Lurker

Posts: 1
Joined: 11/20/2011

I understand that compiling on opteron running on xeon is ok. But will compiling on xeon and running on opteron give the same performance as compiling/running on opteron?

-------------------------
sfw0140
 11/20/2011 10:51 AM
User is offline View Users Profile Print this message

Author Icon
MU_Engineer
Dr. Mu

Posts: 1837
Joined: 08/26/2006

Originally posted by: wornomsf

I understand that compiling on opteron running on xeon is ok. But will compiling on xeon and running on opteron give the same performance as compiling/running on opteron?


Performance of compiled code on difference processors depends on what optimization flags are given to the compiler at compile time. Compiling on one CPU and running on another makes NO difference in performance, as long as the compiler optimization flags are not set to auto-detect and auto-optimize for the compiling CPU. So avoid using something like "-march=native" with GCC that will auto-optimize for the CPU the compilation is being performed on. In fact, if you are running on both Xeon and Opteron, don't do any processor-specific (-march) options.

-------------------------
Statistics
112018 users are registered to the AMD Processors forum.
There are currently 0 users logged in.

FuseTalk Hosting Executive Plan v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.



Contact AMD Terms and Conditions ©2007 Advanced Micro Devices, Inc. Privacy Trademark information