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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

-qarch Option<br />

Syntax<br />

-qarch=architecture<br />

Controls which instructions the compiler can generate. Changing the default can<br />

improve per<strong>for</strong>mance but might produce code that can only be run on specific<br />

machines.<br />

In general, the -qarch option allows you to target a specific architecture <strong>for</strong> the<br />

compilation. For any given -qarch setting, the compiler defaults to a specific,<br />

matching -qtune setting, which can provide additional per<strong>for</strong>mance improvements.<br />

The resulting code may not run on other architectures, but it will provide the best<br />

per<strong>for</strong>mance <strong>for</strong> the selected architecture. To generate code that can run on more<br />

than one architecture, specify a -qarch suboption, such as com, ppc, or ppc64, that<br />

supports a group of architectures; doing this will generate code that runs on all<br />

supported architectures, PowerPC, or 64–bit PowerPC architectures, respectively.<br />

When a -qarch suboption is specified with a group argument, you can specify<br />

-qtune as either auto, or provide a specific architecture in the group. In the case of<br />

-qtune=auto, the compiler will generate code that runs on all architectures in the<br />

group specified by the -qarch suboption, but select instruction sequences that have<br />

best per<strong>for</strong>mance on the architecture of the machine used to compile. Alternatively<br />

you can target a specific architecture <strong>for</strong> tuning per<strong>for</strong>mance.<br />

Arguments<br />

The choices <strong>for</strong> architecture are:<br />

auto<br />

com<br />

pwr<br />

pwr2<br />

Automatically detects the specific architecture of the compiling machine. It<br />

assumes that the execution environment will be the same as the<br />

compilation environment.<br />

You can run the executable file that the compiler generated on any<br />

hardware plat<strong>for</strong>m supported by the compiler, because the file contains<br />

only instructions that are common to all machines. This choice is the<br />

default if you specify -q32.<br />

If you specify the -q64 and -qarch=com options together, the target<br />

plat<strong>for</strong>m is 64-bit, and the -qarch option is silently upgraded to ppc64grsq.<br />

The instruction set will be restricted to those instructions common to all<br />

64-bit machines. See “Using <strong>XL</strong> <strong>Fortran</strong> in a 64-Bit Environment” on page<br />

279 <strong>for</strong> details. Also, the rndsngl suboption of the -qfloat option is<br />

automatically turned on and cannot be turned off. While this yields better<br />

per<strong>for</strong>mance on PowerPC systems, you may get slightly different results<br />

than if you compile with -qarch=com and -q32.<br />

You can run the executable file on any POWER or POWER2 hardware<br />

plat<strong>for</strong>m. Because executable files <strong>for</strong> these plat<strong>for</strong>ms may contain<br />

instructions that are not available on PowerPC systems, they may be<br />

incompatible with those newer systems, or they may run more slowly<br />

because missing instructions are emulated through software traps.<br />

You can run the executable file on any POWER2 hardware plat<strong>for</strong>m.<br />

Because executable files <strong>for</strong> these plat<strong>for</strong>ms may contain instructions that<br />

are not available on POWER and PowerPC (including POWER3) systems,<br />

they may be incompatible with those systems.<br />

Note that pwrx is a synonym <strong>for</strong> pwr2, but pwr2 is preferable.<br />

<strong>XL</strong> <strong>Fortran</strong> Compiler-Option Reference 127

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

Saved successfully!

Ooh no, something went wrong!