Editing the default configuration file

The configuration file specifies information that the compiler uses when you invoke it. XL Fortran provides the configuration files /opt/IBM/xlf/15.1.3/etc/xlf.cfg.nn, for the AIX® versions that the compiler supports. .nn indicates which operating system version the configuration file is for. For example, /opt/IBM/xlf/15.1.3/etc/xlf.cfg.72 is the configuration file for AIX version 7.2 and by default, the compiler will use this file on AIX version 7.2.

If you want many users to be able to choose among several sets of compiler options, you may want to add new named stanzas to the configuration file and to create new commands that are links to existing commands. For example, you could specify something similar to the following to create a link to the command:

ln -s /opt/IBM/xlf/15.1.3/bin/xlf95 /home/username/bin/my_xlf95

When you run the compiler under another name, it uses whatever options, libraries, and so on, that are listed in the corresponding stanza.

Notes:
  • The configuration file contains other named stanzas to which you may want to link.
  • If you make any changes to the configuration file and then move or copy your makefiles to another system, you will also need to copy the changed configuration file.
  • Installing a compiler update or program temporary fix (PTF) or an upgrade may overwrite the configuration files under the /opt/IBM/xlf/15.1.3/etc/ directory. The installation will save the old version of the configuration files under the /lpp/save.config/ directory. You will need to compare the saved files and the newly installed files to determine if you need to recover configuration data.
  • If you upgrade the operating system and if you made modifications in the configuration file for the lower operating system version, you will need to compare the configuration file for the lower OS version with the configuration file for the higher OS version after the upgrade to determine if you need to recover configuration data. For more information on operating system migration, please refer to the Operating system migration section in the XL Fortran Installation Guide.
  • You cannot use tabs as separator characters in the configuration file. If you modify the configuration file, make sure that you use spaces for any indentation.
  • The xlf_r, xlf90_r, xlf95_r, xlf2003_r, and xlf2008_r commands support the operating system default thread interface: that is, the POSIX1003.1-1996 standard for AIX Version 6.1 and higher levels of the AIX operating system.
  • If you are mixing Message-Passing Interface (MPI) and threaded programming, use the appropriate stanza in the xlf.cfg file to link in the proper libraries and to set the correct default behavior:
    mpxlf_r
    Specifies xlf_r behavior when mixing MPI and threaded programming. You access this stanza by specifying the mpxlf_r command.
    mpxlf_r7
    Specifies xlf_r7 behavior when mixing MPI and threaded programming. You access this stanza by specifying the mpxlf_r command with the -d7 option. The level of POSIX pthreads API support is Draft 7.
    mpxlf90_r
    Specifies xlf90_r behavior when mixing MPI and threaded programming. You access this stanza by specifying the mpxlf90_r command.
    mpxlf90_r7
    Specifies xlf90_r7 behavior when mixing MPI and threaded programming. You access this stanza by specifying the mpxlf90_r command with the -d7 option. The level of POSIX pthreads API support is Draft 7.
    mpxlf95_r
    Specifies xlf95_r behavior when mixing MPI and threaded programming. You access this stanza by specifying the mpxlf95_r command.
    mpxlf95_r7
    Specifies xlf95_r7 behavior when mixing MPI and threaded programming. You access this stanza by specifying the mpxlf95_r7 command with the -d7 option. The level of POSIX pthreads API support is Draft 7.
    mpxlf2003_r
    Specifies xlf2003_r behavior when mixing MPI and threaded programming. You access this stanza by specifying the mpxlf2003_r command.
    mpxlf2008_r
    Specifies xlf2008_r behavior when mixing MPI and threaded programming. You access this stanza by specifying the mpxlf2008_r command.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us