HP Fortran Programmer's Guide (B3908-90031; September 2011)

Compiling and linking
Special-purpose compilations
Chapter 2 95
Creating demand-loadable executables
By default, the loader loads the entire code for an executable program into virtual memory. For very large
programs, this can increase startup time. You can override this default by causing the linker to mark your
program demand load. A demand-loadable program is loaded into memory a page at a time, as it is
accessed.
Use the +demand_load option to make your program demand loadable, as follows:
$ f90 +demand_load prog.f90
The f90 command passes this option to the linker, which marks the executable program demand load.
Demand loading allows a program to start up faster because page loading can be spread across the execution
of the program. The disadvantage of demand loading is that it can degrade performance throughout
execution.
Creating shared executables
By default, the linker marks an executable program as shared. A shared executable is shareable by all
processes that use the program. The first process to run the program loads its code into virtual memory. If
the program is already loaded by another process, then a process shares the code with the other process.
You can override this default with the +noshared option, 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.f90 as 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.0W option (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.