next up previous contents
Next: C Compiler Up: LNF Programming Environment Previous: LNF Programming Environment

Fortran77 Compiler

The FORTRAN77 compiler on the HP and DEC machines looks very similar in terms of functionality as compared to other UNIX system. However, an awarness of the default compiler options is important. In some cases, a program will fail or produce wrong results if you have compiled it with an excessive level of optimization. When developing a code, it is recommended to use the default optmization level until the program is stable. Once this stage has been completed, you may experiment different optimization levels to improve the performance. Before starting any serious production ensure that the results obtained during the tests are consistent whith those obtained using different optimization levels.

Using two different platforms you must use different options. On each system you have different options, please refer to man pages to get more details:

man f77

Here is an example how to compile a simple program program on our UNIX systems, in the two cases HP and DEC :

-O
To increase optimization
-g
Generate additional information needed by the symbolic debugger xdb. This option is incompatible with optimization.
+ppu
To add a trailing to external routines. This is needed if you wish to make calls to the CERN program library; it must be used only on HP
-K
To generate static code. Static is a code where local variable are saved after routine invocation. Note that the VAX compilers automatically save local variables; this is not the default case with HP-UX

-O
To increase optimization
-g
Generate additional information needed by the symbolic debugger xdb. This option is incompatible with optimization
-static
Causes all local variables to be statically allocated. Like -K on HP


next up previous contents
Next: C Compiler Up: LNF Programming Environment Previous: LNF Programming Environment



Massimo CARBONI
Wed Feb 14 19:03:34 WET 1996