Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Fortran v2.7 for HP-UX 11.0 and 11i Release Note > Chapter 1 HP Fortran v2.7 for HP-UX 11.0 and 11i Release Note

Known Problems and Workarounds

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

These are known problems and workarounds for previous versions of HP Fortran.

  • When very large arrays are declared to be local to a subroutine, the arrays are privatized. This means that the arrays are allocated in stack space.

    Workaround: The default stack size for an OPENMP thread is 8 megabytes. This can be changed by setting the environment variable CPS_STACK_SIZE. For example, setenv CPS_STACK_SIZE 20000000 changes the stack size per thread from 8MB to 20MB.

  • HP Fortran only accepts the !$ALIAS directive, not $ALIAS.

  • A program compiled with " +DA2.0W +check=all +fp_exception" results in a divide by zero trap during a subroutine call.

  • Compiling an array slice assignment at +O0 results in an internal compiler error.

  • The wait system calls in the Fortran compilers generate different statuses when an unpreinstrumented Fortran application is run from CXperf. This is a compiler-specific issue, and not a problem with CXperf. If an application runs normally and returns status=child process terminated normally with a return code of zero, then a run from within CXperf will return *stat_loc or status=child process terminated with a SIG_TRAP. This is expected since the CXperf process interface uses a trapping mechanism to probe the application processes.

  • Dummy arguments in multiple entry routines are not correctly handled by the WDB debugger.

  • Printing a dummy argument that is a CHARACTER in 64-bit wide mode (+DA2.0W) does not work in the WDB debugger.

  • When compiling 64-bit applications, the +ppu switch is enabled by default. To access C routines, use the ALIAS directive to map the C routine name to itself. For example:

    !$HP ALIAS getrusage=`getrusage'

    If the ALIAS directive is not used, `getrusage' is mapped to `getrusage_' in the object file.

  • With +DA2.0W, memory addresses are 64-bit values. This allows common blocks and dynamically allocated memory to exceed 32-bit address limits. This feature is restricted by the available virtual memory on the system where the application is run.

    Common blocks greater than 2GBytes are automatically placed into a huge data segment and initialization is performed at program start-up.

    Workaround: To force smaller common blocks into the huge data segment, use the +hugecommon and +hugesize compiler switches.

    NOTE: When using initialized huge common blocks, large repeat counts are represented compactly to help reduce object file size.
  • When creating 64-bit shared executables (such as when +DA2.OW is specified) the +Z option is on by default. The +Z option (equivalent to +pic=long) is the only PIC option supported for 64-bit executables. If the +z option (equivalent to +pic=short) is specified when creating 64-bit code, it instead maps to +Z.

    Workaround: To not generate position independent code for 64-bit executables, specify the following option:

    -Wl,-noshared

  • Both the +pa and +pal options are ignored when the HP Fortran 90 compiler generates position-independent code (PIC). As a result, the following options cause +pa and +pal to be ignored: +pic=short, +pic=long, +z, and +Z.

  • Mixing the standard Fortran I/O operations with BUFFER IN and BUFFER OUT I/O on the same logical unit number can confuse the input stream (READ) or corrupt the data file (WRITE).

  • SoftBench support is not available.

  • Program optimization using the +O4 option is not available.

  • Using the ON statement at optimization levels 2 and above is restricted. When compiling at optimization level 2 or above, the optimizer makes assumptions about the program that do not take into account the behavior of procedures called by the ON statement. Such procedures must therefore be "well-behaved"; they must meet the following criteria:

    • The ON procedure must not assume that any variable in the interrupted procedure or in its caller has its current value. (The optimizer may have placed the variable in a register to be stored there until after the call to the interrupted procedure is complete.)

    • The ON procedure must not change the value of any variable in the interrupted procedure or in its caller if the effect of the ON procedure is to return program control to the point of interrupt.

    NOTE: These restrictions do not apply if you compile at optimization levels +O0 and +O1.
  • The +DA and +DS compile-line options do not accept 1.0 (or any PA-RISC 1.0 architecture models) as arguments because the HP Fortran compiler no longer supports the PA-RISC 1.0 architecture.

  • Pointer arithmetic on Cray-style pointers has different semantics on Hewlett-Packard machines than on some Cray machines. HP Fortran 90 implements Cray pointers as BYTE pointers, while some Cray machines use word addressing.

  • When +O3 +Oreport +pal is used, the Optimization Report contains extra loops with erroneous line numbers.

    Workaround: To avoid this problem, use +Oinfo in place of +Oreport.

  • If you installed a patch that modified sched.models, you may have received the +DA1.1 code by default.

    Workaround: If this is the case, you will need to specify the +DA2.0 option on each compile so that the compiler will generate code that will gain the benefits of the PA-RISC 2.0 architecture.

  • Large source files occasionally cause internal errors in the HP Fortran compiler.

    Workaround: If this occurs, split the file using fsplit and recompile.

  • The previous versions of Fortran occasionally contained a 'wrong answer' problem that is now caught by a compiler assert function at +O3 +Oparallel.

    Workaround: To avoid this, use +O2 optimization instead of +O3.

Restrictions in HP Fortran

This section lists restrictions you should observe when using the HP Fortran compiler and when using HP Fortran language features in your programs.

+FPI

+FPI will not work when calling any type of runtime libraries or intrinsics.

PA-RISC 1.0 Architecture Not Supported

The HP Fortran compiler does not support the PA-RISC 1.0 architecture. This means that the +DA and +DS compile-line options will not accept the 1.0 argument, and they will not accept the following model numbers (or other PA-RISC 1.0 architecture models) as arguments:

600, 635 645, 800, 808, 815, 822, 825, 832, 834, 835, 840, 842, 845, 850, 852, 855, 860, 865, 870, 890

Refer to the f90(1) man page or to the HP Fortran Programmer's Guide for more information on the +DA and +DS options.

NOTE: The portable argument to the +DA and +DS options creates object code compatible across all PA-RISC 1.1 and 2.0 workstations and servers. It however does not support the PA-RISC 1.0 architecture.

"OUT OF FREE SPACE" Error

The HP Fortran Programmer's Reference states that the IOSTAT= and ERR= specifiers return error 913 (OUT OF FREE SPACE) when the I/O library attempts to use more memory than is available. However, these specifiers do not detect all instances of error 913, especially those caused by memory allocation failures in the I/O library.

NODEPCHK ignored

In this version of the HP Fortran compiler, the NODEPCHK directive is sometimes ignored. The symptom was that programs which use the directive would not parallelize as well as expected.

To parallelize your code, use another directive such as loop_parallel. In loops defined with NODEPCHK, we recommend that you not invoke parallelism.

no_loop_transform

The Parallel Programming Guide for HP-UX Systems inaccurately states, on page 149, that the no_loop_transform directive inhibits parallelization. no_loop_transform does not inhibit parallelization.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1979-2003 Hewlett-Packard Development Company, L.P.