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.

Fixing Installation or System Environment Problems<br />

If individual users or all users on a particular machine have difficulty running the<br />

compiler, there may be a problem in the system environment. Here are some<br />

common problems and solutions:<br />

xlf90: not found<br />

xlf90_r: not found<br />

xlf90_r7: not found<br />

xlf95: not found<br />

xlf95_r: not found<br />

xlf95_r7: not found<br />

xlf: not found<br />

xlf_r: not found<br />

xlf_r7: not found<br />

f77: not found<br />

<strong>for</strong>t77: not found<br />

f90: not found<br />

f95: not found<br />

Symptom: The shell cannot locate the command to<br />

execute the compiler.<br />

Solution: Make sure that your PATH environment<br />

variable includes the directory /usr/bin. If the compiler<br />

is properly installed, the commands you need to<br />

execute it are in this directory.<br />

Could not load program program<br />

Error was: not enough space<br />

Killed<br />

Symptom: The system cannot execute the compiler or<br />

an application program at all.<br />

Solution: Set the storage limits <strong>for</strong> stack and data to<br />

“unlimited” <strong>for</strong> users who experience this problem. For<br />

example, as superuser you can set both your hard and<br />

soft limits with these ksh commands:<br />

ulimit -s unlimited<br />

ulimit -d unlimited<br />

Because non-superusers are not completely free to give<br />

themselves unlimited limits, if you are a superuser you<br />

may find it more convenient to edit the file<br />

/etc/security/limits to give all users unlimited stack and<br />

data segments (by entering -1 <strong>for</strong> these fields).<br />

If the storage problem is in an <strong>XL</strong>F-compiled program,<br />

using the -qsave or -qsmallstack option might prevent<br />

the program from exceeding the stack limit.<br />

Explanation: The compiler allocates large internal data<br />

areas that may exceed the storage limits <strong>for</strong> a user.<br />

<strong>XL</strong>F-compiled programs place more data on the stack<br />

by default than in previous versions, also possibly<br />

exceeding the storage limit. Because it is difficult to<br />

determine precise values <strong>for</strong> the necessary limits, we<br />

recommend making them unlimited.<br />

Could not load program program<br />

Could not load library library_name.a<br />

[object_name]<br />

Error was: no such file or directory<br />

Solution: Make sure the <strong>XL</strong> <strong>Fortran</strong> libraries are<br />

installed in /usr/lib, or set the LIBPATH environment<br />

variable to include the directory where libxlf90.a is<br />

installed if it is in a different directory. See<br />

“LIBPATH:Setting Library Search Paths” on page 14 <strong>for</strong><br />

details of this environment variable.<br />

Symptom: Messages from the compiler or an <strong>XL</strong><br />

<strong>Fortran</strong> application program are displayed in the wrong<br />

language.<br />

Solution: Set the appropriate national language<br />

environment. You can set the national language <strong>for</strong><br />

each user with the command smit chlang.<br />

Alternatively, each user can set one or more of the<br />

environment variables LANG, NLSPATH,<br />

LC_MESSAGES, LC_TIME, and LC_ALL. If you are<br />

not familiar with the purposes of these variables,<br />

“Environment Variables <strong>for</strong> National Language<br />

Support” on page 13 provides details.<br />

Symptom: A compilation fails with an I/O error.<br />

Solution: Increase the size of the /tmp filesystem, or<br />

set the environment variable TMPDIR to the path of a<br />

filesystem that has more free space.<br />

Explanation: The object file may have grown too large<br />

<strong>for</strong> the filesystem that holds it. The cause could be a<br />

very large compilation unit or initialization of all or<br />

part of a large array in a declaration.<br />

Symptom: There are too many individual makefiles<br />

and compilation scripts to easily maintain or track.<br />

Solution: Add stanzas to the configuration file, and<br />

create links to the compiler by using the names of these<br />

stanzas. By running the compiler with different<br />

command names, you can provide consistent groups of<br />

compiler options and other configuration settings to<br />

many users.<br />

Fixing Compile-Time Problems<br />

The following sections discuss common problems you might encounter while<br />

compiling and how to avoid them.<br />

Problem Determination and Debugging 373

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

Saved successfully!

Ooh no, something went wrong!