Setting up floating installation

You may want to install the most recent compiler version and keep the prior version on one system. If there are problems with the most recent version, you can easily switch to the prior one. Following is an example of how to set up the floating installation feature for this purpose. Assume that your system will have two versions of the compiler, both floating install enabled. In this case, 3.6.1 is the prior version, and 3.6.2 or 3.7 is the more recent version.

To setup floating installation, complete the following steps:

1.Copy the prior version to another directory.

$ cp -rp /opt/fortran90 /opt/fortran90.3.6.1

2.Use swinstall to install the new version (3.6.2 or 3.7 in this case).

3.To use 3.6.1, invoke as,

$ /opt/fortran90.3.6.1/bin/f90

In this case, the compiler is picked up from /opt/fortran90.3.6.1/lbin/. To use 3.6.2 or 3.7 whichever is installed latest, invoke as default,

$ f90

or

$ /opt/fortran90/bin/f90

Floating Installation can also work with:

Alternate path, for example,

<alternate-path>/opt/fortran90.3.6.1/

Extended float path, that is, if the Fortran driver is invoked from <float-path>/bin/f90, the compiler is picked up from the relative <float-path>/lbin/path. As this is not a recommended usage, the compiler uses Fortran and other libraries, linker and other files located in default paths.

The precedence of various environment variables that control the Fortran driver to pick up the Fortran compiler is in the following order:

F90ROOT

SDKROOT

ST_F90COM[64]

NOTE: To use floating installation, do not set the following environment variables:

F90ROOT

SDKROOT

ST_F90COM[64]

66 Compiling and linking

Page 66
Image 66
HP UX Fortran Software manual Setting up floating installation, Alternate-path/opt/fortran90.3.6.1