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.

Rules<br />

v If you specify -qsmp more than once, the previous settings of all suboptions are<br />

preserved, unless overridden by the subsequent suboption setting. The compiler<br />

does not override previous suboptions that you specify. The same is true <strong>for</strong> the<br />

version of -qsmp without suboptions; the default options are saved.<br />

v<br />

v<br />

v<br />

v<br />

v<br />

v<br />

v<br />

Specifying the omp suboption always implies noauto, unless you specify -qsmp<br />

or -qsmp=auto on the command line.<br />

Specifying the noomp suboption always implies auto.<br />

The omp and noomp suboptions only appear in the compiler listing if you<br />

explicitly set them.<br />

If -qsmp is specified without any suboptions, -qsmp=opt becomes the default<br />

setting. If -qsmp is specified after the -qsmp=noopt suboption has been set, the<br />

-qsmp=noopt setting will always be ignored.<br />

If the option -qsmp with no suboptions follows the suboption-qsmp=noopt on a<br />

command line, the -qsmp=opt and -qsmp=auto options are enabled.<br />

Specifying the -qsmp=noopt suboption implies that -qsmp=noauto. It also<br />

implies -qnoopt. This option overrides per<strong>for</strong>mance options such as -O2, -O3,<br />

-qhot, anywhere on the command line unless -qsmp appears after -qsmp=noopt.<br />

Object files generated with the -qsmp=opt option can be linked with object files<br />

generated with -qsmp=noopt. The visibility within the debugger of the variables<br />

in each object file will not be affected by linking.<br />

Restrictions<br />

The -qsmp=noopt suboption may affect the per<strong>for</strong>mance of the program.<br />

Within the same -qsmp specification, you cannot specify the omp suboption be<strong>for</strong>e<br />

or after certain suboptions. The compiler issues warning messages if you attempt<br />

to specify them with omp:<br />

auto<br />

This suboption controls automatic parallelization, but omp turns off<br />

automatic parallelization.<br />

nested_par<br />

Note that the implementation of the nested_par suboption does not<br />

comply with the OpenMP <strong>Fortran</strong> API. If you specify this suboption, the<br />

run-time library uses the same threads <strong>for</strong> the nested PARALLEL DO and<br />

PARALLEL SECTIONS constructs that it used <strong>for</strong> the enclosing<br />

PARALLEL constructs.<br />

rec_locks<br />

This suboption specifies a behaviour <strong>for</strong> CRITICAL constructs that is<br />

inconsistent with the OpenMP <strong>Fortran</strong> API.<br />

schedule=affinity=n<br />

The affinity scheduling type does not appear in the OpenMP <strong>Fortran</strong> API<br />

standard.<br />

Examples<br />

The -qsmp=noopt suboption overrides per<strong>for</strong>mance optimization options<br />

anywhere on the command line unless -qsmp appears after -qsmp=noopt. The<br />

following examples illustrate that all optimization options that appear after<br />

-qsmp=noopt are processed according to the normal rules of scope and<br />

precedence.<br />

Example 1<br />

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

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

Saved successfully!

Ooh no, something went wrong!