24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

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.

v<br />

v<br />

If your primary concern is execution per<strong>for</strong>mance, you may see some speedup if<br />

you specify the appropriate -qarch suboption and perhaps also specify the<br />

-qtune and -qcache options. In this case, you may need to produce different<br />

versions of the executable file <strong>for</strong> different machines, which might complicate<br />

configuration management. You will need to test the per<strong>for</strong>mance gain to see if<br />

the additional ef<strong>for</strong>t is justified.<br />

It is usually better to target a specific architecture so your program can take<br />

advantage of the targeted machine’s characteristics. For example, specifying<br />

-qarch=pwr4 when targeting a POWER4 machine will benefit those programs<br />

that are floating-point intensive or have integer multiplies. On PowerPC<br />

systems, programs that process mainly unpromoted single-precision variables<br />

are more efficient when you specify -qarch=ppc. On POWER2 and POWER3<br />

systems, programs that process mainly double-precision variables (or<br />

single-precision variables promoted to double by one of the -qautodbl options)<br />

become more efficient with -qarch=pwr2, -qarch=pwr3, -qarch=pwr4 and<br />

-qarch=pwr5. The -qautodbl=dblpad4 option will improve POWER and<br />

POWER2, but not POWER3, POWER4, and POWER5, which are PowerPC<br />

processors.<br />

Other Considerations<br />

The PowerPC instruction set includes two optional instruction groups that may be<br />

implemented by a particular hardware plat<strong>for</strong>m, but are not required. These two<br />

groups are the graphics instruction group and the sqrt instruction group. Code<br />

compiled with specific -qarch options (all of which refer to specific PowerPC<br />

machines) will run on any equivalent PowerPC machine that has an identical<br />

instruction group. The following table illustrates the instruction groups that are<br />

included <strong>for</strong> the various PowerPC machines.<br />

Table 14. Instruction groups <strong>for</strong> PowerPC plat<strong>for</strong>ms<br />

Processor Graphics group sqrt group 64-bit<br />

601 no no no<br />

603 yes no no<br />

604 yes no no<br />

ppc no no no<br />

ppcgr yes no no<br />

ppc64 no no yes<br />

ppc64gr yes no yes<br />

ppc64grsq yes yes yes<br />

rs64a no no yes<br />

rs64b yes yes yes<br />

rs64c yes yes yes<br />

pwr3 yes yes yes<br />

pwr4 yes yes yes<br />

pwr5 yes yes yes<br />

ppc970 yes yes yes<br />

If you compile code using the -qarch=pwr3 option, the code will run on an RS64B<br />

hardware plat<strong>for</strong>m but may not run on an RS64A plat<strong>for</strong>m because the instruction<br />

groups are not identical. Similarily, code compiled with the -qarch=603 option will<br />

run on a POWER3 machine, but may not run on a RS64A machine.<br />

130 <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> : User’s <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!