26.11.2012 Views

Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...

Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...

Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

32035 Rev. 3.22 November 2007<br />

<str<strong>on</strong>g>Compiler</str<strong>on</strong>g> <str<strong>on</strong>g>Usage</str<strong>on</strong>g> <str<strong>on</strong>g>Guidelines</str<strong>on</strong>g> <str<strong>on</strong>g>for</str<strong>on</strong>g> AMD<str<strong>on</strong>g>64</str<strong>on</strong>g> Plat<str<strong>on</strong>g>for</str<strong>on</strong>g>ms<br />

Because not using the -xK and -xW switches could lower per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance, the user should investigate<br />

the precisi<strong>on</strong> requirements of the program. If the user has access to the source code, it may be<br />

possible to adapt the algorithm to SSE2.<br />

4.9.4 Program Terminates Unexpectedly<br />

Are you using an architecture switch that is unsafe <str<strong>on</strong>g>for</str<strong>on</strong>g> AMD Athl<strong>on</strong> <str<strong>on</strong>g>64</str<strong>on</strong>g>and AMD Opter<strong>on</strong><br />

processors?<br />

Some architecture switches can cause programs compiled with Intel compiler versi<strong>on</strong>s 7.1, 8.0, and<br />

8.1 to terminate unexpectedly when run <strong>on</strong> AMD Athl<strong>on</strong> <str<strong>on</strong>g>64</str<strong>on</strong>g> and AMD Opter<strong>on</strong> processors.<br />

Table 8 shows 32-bit Intel compiler architecture switches that are not safe <str<strong>on</strong>g>for</str<strong>on</strong>g> AMD Athl<strong>on</strong> <str<strong>on</strong>g>64</str<strong>on</strong>g> and<br />

AMD Opter<strong>on</strong> processors. Try building the program without these switches.<br />

Table 8. Unsafe Architecture Switches in 32-<str<strong>on</strong>g>Bit</str<strong>on</strong>g> Intel <str<strong>on</strong>g>Compiler</str<strong>on</strong>g>s <str<strong>on</strong>g>for</str<strong>on</strong>g> Linux ®<br />

<str<strong>on</strong>g>Compiler</str<strong>on</strong>g> Versi<strong>on</strong> Unsafe Architecture Switches<br />

Intel 7.1 -xK and -xW<br />

Intel 8.0 -xK -xW -xP -xB and -xN<br />

Intel 8.1 xN and -xP<br />

4.10 PathScale <str<strong>on</strong>g>Compiler</str<strong>on</strong>g>s (32-<str<strong>on</strong>g>Bit</str<strong>on</strong>g>) <str<strong>on</strong>g>for</str<strong>on</strong>g> Linux ®<br />

For in<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong> <strong>on</strong> diagnosing problems with the PathScale compiler, please refer to the tuning<br />

document distributed with the PathScale compiler suite.<br />

4.11 Intel <str<strong>on</strong>g>Compiler</str<strong>on</strong>g>s (32-<str<strong>on</strong>g>Bit</str<strong>on</strong>g>) <str<strong>on</strong>g>for</str<strong>on</strong>g> Microsoft ® Windows ®<br />

This secti<strong>on</strong> addresses errors and unexpected results that may be encountered when using 32-bit Intel<br />

compilers <str<strong>on</strong>g>for</str<strong>on</strong>g> Microsoft Windows.<br />

4.11.1 Compilati<strong>on</strong> Errors<br />

Are you using the right ANSI-compliant switch?<br />

Use the -Qansi-alias- switch to compile Fortran programs that do not adhere to ANSI Fortran-type<br />

alias rules.<br />

4.11.2 Compiled and Linked Code Generates Unexpected Results<br />

Are you generating vectorized code?<br />

For some loops, vectorizati<strong>on</strong> can cause a slight difference in results due to the reordering of floatingpoint<br />

operati<strong>on</strong>s. The switches -QxK, -QxW, -arch:SSE, and -arch:SSE2 cause vectorizati<strong>on</strong> of<br />

loops where possible. As a diagnostic step, try compiling without these switches.<br />

Chapter 4 Troubleshooting and Portability Issues 51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!