Fixing compile-time problems
The following sections discuss common problems you might encounter while compiling and how to avoid them.
Duplicating extensions from other systems
Some ported programs may cause compilation problems because they rely on extensions that exist on other systems. XL Fortran supports many extensions like these, but some require compiler options to turn them on. See Portability and migration for a list of these options and Porting programs to XL Fortran for a general discussion of porting.
Isolating problems with individual compilation units
If you find that a particular compilation unit requires specific option settings to compile properly, you may find it more convenient to apply the settings in the source file through an @PROCESS directive. Depending on the arrangement of your files, this approach may be simpler than recompiling different files with different command-line options.
Compiling with threadsafe commands
Threadsafe invocation commands like xlf_r or xlf90_r, for example, use different search paths and call different modules than the non threadsafe invocations. Your programs should account for the different usages. Programs that compile and run successfully for one environment may produce unexpected results when compiled and run for a different use. The configuration file, xlf.cfg, shows the paths, libraries, and so on for each invocation command. (See Editing the default configuration file for an explanation of its contents.)
Running out of machine resources
1501-229 Compilation ended because of lack of space.
1517-011 Compilation ended. No more system resources available.
1501-053 (S) Too much initialized data.
1501-511. Compilation failed for file [filename].
You may need to increase the system page space and recompile your program. See the man page information man 8 mkswap swapon for more information about page space.
- Increase the size of the filesystem that holds the /tmp directory.
- Set the TMPDIR environment variable to a filesystem with a lot of free space.
- For very large arrays, initialize the array at run time rather than statically (at compile time).
Compilation failure because of internal alias table overflow
At an optimization level of -O2 or higher, XL Fortran compiler computes alias information to ensure that the optimizer preserves the semantics of the application. Alias computation might be an expensive process in terms of space usage, depending on the object definitions and language constructs used in an application. In rare occasions, the internal alias table might overflow, which causes the compilation to fail. Such overflow might occur when a module defines or uses derived-type objects that contain a large number of ultimate components, and passes the objects as dummy arguments to a large number of procedures that are defined in the same module. Partitioning the set of module procedures and placing each partition in a separate module might resolve the overflow problem.