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.

Related In<strong>for</strong>mation: See “Environment Variables <strong>for</strong> National Language Support”<br />

on page 13.<br />

The C library routine setlocale is defined in the <strong>AIX</strong> Technical Reference: Base<br />

Operating System and Extensions Volume 1.<br />

Setting Run-Time Options<br />

Internal switches in an <strong>XL</strong> <strong>Fortran</strong> program control run-time behavior, similar to<br />

the way compiler options control compile-time behavior. You can set the run-time<br />

options through either environment variables or a procedure call within the<br />

program. You can specify all <strong>XL</strong> <strong>Fortran</strong> run-time option settings by using one of<br />

two environment variables: <strong>XL</strong>FRTEOPTS and <strong>XL</strong>SMPOPTS.<br />

The <strong>XL</strong>FRTEOPTS Environment Variable<br />

The <strong>XL</strong>FRTEOPTS environment variable allows you to specify options that affect<br />

I/O, EOF error-handling, and the specification of random-number generators. You<br />

can declare <strong>XL</strong>FRTEOPTS by using the following ksh command <strong>for</strong>mat:<br />

:<br />

►►<br />

<strong>XL</strong>FRTEOPTS= ▼ runtime_option_name = option_setting<br />

" "<br />

►◄<br />

You can specify option names and settings in uppercase or lowercase. You can add<br />

blanks be<strong>for</strong>e and after the colons and equal signs to improve readability.<br />

However, if the <strong>XL</strong>FRTEOPTS option string contains imbedded blanks, you must<br />

enclose the entire option string in double quotation marks (").<br />

The environment variable is checked when the program first encounters one of the<br />

following conditions:<br />

v An I/O statement is executed.<br />

v The RANDOM_SEED procedure is executed.<br />

v An ALLOCATE statement needs to issue a run-time error message.<br />

v A DEALLOCATE statement needs to issue a run-time error message.<br />

v The multi-threaded implementation of the MATMUL procedure is executed.<br />

Changing the <strong>XL</strong>FRTEOPTS environment variable during the execution of a<br />

program has no effect on the program.<br />

The SETRTEOPTS procedure (which is defined in the <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong><br />

<strong>for</strong> <strong>AIX</strong> Language Reference) accepts a single-string argument that contains the same<br />

name-value pairs as the <strong>XL</strong>FRTEOPTS environment variable. It overrides the<br />

environment variable and can be used to change settings during the execution of a<br />

program. The new settings remain in effect <strong>for</strong> the rest of the program unless<br />

changed by another call to SETRTEOPTS. Only the settings that you specified in<br />

the procedure call are changed.<br />

You can specify the following run-time options with the <strong>XL</strong>FRTEOPTS<br />

environment variable or the SETRTEOPTS procedure:<br />

buffering={enable | disable_preconn | disable_all}<br />

Determines whether the <strong>XL</strong> <strong>Fortran</strong> run-time library per<strong>for</strong>ms buffering <strong>for</strong><br />

I/O operations.<br />

The library reads data from, or writes data to the file system in chunks <strong>for</strong><br />

READ or WRITE statements, instead of piece by piece. The major benefit of<br />

buffering is per<strong>for</strong>mance improvement.<br />

Editing, Compiling, Linking, and Running <strong>XL</strong> <strong>Fortran</strong> Programs 51

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

Saved successfully!

Ooh no, something went wrong!