HP Fortran Programmer Guide (766160-001, March 2014)

You can override this default with the +nosharedoption, which causes the linker to mark the
executable as unshared, making the program’s code nonshareable. The following command line
causes the linker to mark prog.f90as unshared:
$ f90 +noshared prog.f90
In some circumstances, it may help to debug a program or to improve its runtime performance by
making it nonshareable. In general, however, it is not desirable because nonshareable executables
place greater demands on memory resources.
Compiling in 64-bit mode
Compiling HP Fortran programs with the +DA2.0Woption (PA-RISC only; for Itanium, use +DD64)
causes f90 to produce 64-bit executable programs. You should consider compiling in 64-bit mode
if your program does any of the following:
Accesses a large shared memory (greater than 1.75 gigabytes) or large data spaces (greater
than 1 gigabyte or, if using EXEC_MAGIC, greater than 1.9 gigabytes)
Uses large data elements—greater than 32-bit words
Provides objects or libraries that might be used in a 64-bit application
There are no HP Fortran language differences between 32-bit and 64-bit programs. Recompiling
should suffice to convert a 32-bit Fortran program to run as a 64-bit program.
However, the C language has some differences in data type sizes. If your Fortran program calls
functions written in C and is compiled in 64-bit mode, the size differences may require promoting
the data items that are passed to or from the C functions. See Table on page 181 and Table on
page 181 for the size differences between Fortran and C data types when compiled in 64-bit
mode.
NOTE: If your program does not need to run in 64-bit mode, there is no benefit to compiling it
in 64-bit mode. In fact, the executable program may run slower than if compiled in 32-bit mode.
Using environment variables
Environment variables are variables that are defined in the operating environment of the system
and are available to various system components. For example, when you run a program, the shell
looks at the PATHvariable to determine where the program is located. Table 2-15 lists and briefly
describes the environment variables that control the way HP Fortran programs are compiled, linked,
and run.
Table 24 HP Fortran environment variables
DescriptionEnvironment variable
Specifies the alternate root for Fortran compiler and its
libraries.
F90ROOT
Specifies the path of 32-bit or 64-bit f90compiler
respectively in case of non-standard compiler path.
ST_F90COM[64]
Specifies a list of command-line options that f90inserts in
the command line that invokes the HP Fortran compiler.
HP_F90OPTS
Specifies a list of directories that the linker is to search for
libraries.
LPATH
Specifies the desired number of processors to be used to
run HP Fortran programs that have been compiled for
parallel execution.
MP_NUMBER_OF_THREADS
Compiling in 64-bit mode 63