UK Logo High Performance Computing November 23, 2009
Home News System Status User Policies Account Info Hardware Software Documentation FAQs Search
UKy HPC Frequently-Asked Questions

Frequently-Asked Questions related to:

For questions about this faq, please contact: help-hpc@uky.edu


FAQ Revised: Tuesday 13 June 2006 15:51:04

Table of Contents

1. General
2. Fortran90
3. C/C++
4. Third-party Libs
5. MPI

1. General

1.1. How can I increase the memory limit for 32-bit apps ?

On HPUX 11, you have these options that you can use to increase memory above the default memory limit of 0.9GB for 32-bit apps using the HP compilers:

  • compile/link with -Wl, -N to get up to 2GB of memory for 32-bit apps.

  • compile/link in 64-bit mode using +DD64 (HPUX C/C++). This will create 64-bit apps in wide mode to get you all the memory you could ever possibly need (joke). Your memory limit will not be imposed by the HP compiler, but other system constraints. In general, you'll be able to access multi-gigabytes of memory.

  • For gcc/g++ use the -mlp64 compile flag for a 64-bit compile.


1.2. Is there a Fortran 77 compiler on the current machine?

No . HP Fortran 77 has been superceded by HP Fortran 90. Use the Fortran 90 compiler and related commands.

1.3. How do I compile with OpenMP extensions?

Use the +Oopenmp +Oparallel compiler flags. For more info, see:



1.4. Why does my C/f90 program link in 32-bit, but not 64-bit?

taken from man f90

+[no]ppu Postpend [do not postpend] underscores at the end of definitions of and references to externally visible symbols (+ppu). The default is +noppu for PA-RISC 32-bit object files and +ppu for PA-RISC 64-bit object files. The default is +ppu for IPF 32-bit and 64-bit object files.

In 32-bit mode, the (PA-RISC) f90 object symbols do NOT have underscores at the end. So, no additional flags are necessary to link with a C main prog.

As noted above, in 64-bit mode the (PA-RISC) f90 object names DO have underscores at the end by default. So, the linker cannot resolve the call from C as the names do not match (unless you put the underscore on the name in the C code, in which case they will). As noted above, for Itanium (IPF), the default is +ppu for both.

The solution is to compile the f90 modules with the +noppu flag for the f90 64-bit compile (noppu - "no post-pend underscore") so that the names match and are resolved by the linker.


2. Fortran90

2.1. Where can I find HP Fortran 90 documentation?

HP's programming language documentation can be found at: the HP documentation website .

2.2. Is HP's Fortran 90 compatible with Fortran 77 ?

Yes. HP's f90 's calling sequence is compatible with the old f77 compiler, for f77 style arguments. f90 can compile f77 programs.

2.3. Can you mix and match HP's f90 and f77 ?

An f77 compiled routine can not call an f90 compiled routine if:

  • any dummy argument is assumed shape
  • any dummy argument has the POINTER or TARGET attribute
  • the called procedure is a MODULE
  • the called procedure has optional dummy arguments
  • the called function returns:
    • an array valued result
    • a POINTER
    • a character type whose length is a non-constant length other than (*) ( CHARACTER*5 and CHARACTER*(*) are okay)


This is generally moot, as the f77 compiler has been superceded and is not available on the HP Superdome cluster.

2.4. What types of user-selectable optimizations are available with HP compilers ?

HP compilers perform a range of selectable optimizations that can be specified using command-line options.

  • Basic scalar optimizations improve performance at the basic block and program unit level.
  • Advanced scalar optimizations are primarily intended to maximize data cache usage.
  • Parallelization


For specific information on each of the various user-selectable optimization options, see the Parallel Programming Guide for HP-UX Systems in HP's HP-UX documentation list at the HP documentation website .

2.5. What are the typical f90 compiler flags to use ?

The typical f90 compiler flags that are used are:

  • +Odataprefetch
      +Odataprefetch causes the optimizer to insert instructions within innermost loops to explicitly prefetch data from memory into the data cache. Data prefetch instructions will be inserted only for data structures referenced within innermost loops using simple loop varying addresses - that is, in a simple arithmetic progression. This option is only effective at optimization level 2 or higher. It is only available for PA-RISC 2.0 targets.

      Use this option for applications that have high data cache miss overhead.

      The default is +Onodataprefetch.
  • +O2
      For information on +O2 (as well as the other four optimization levels on HP compilers), see the Parallel Programming Guide for HP-UX Systems in HP's HP-UX documentation list at the HP documentation website .
  • +DA2.0
      +DA generates object code for a particular version of the PA-RISC architecture. By default, the compiler generates code for the machine model you are compiling on. With this option, you can override the default, causing the compiler to generate code for the machine on which the program will execute rather than for the machine on which it is compiled. For best performance, use +DA with the model number or architecture of the machine on which you plan to execute the program.

      The +DA option also specifies the appropriate search path for HP-UX math libraries. If your program calls mathematical functions, +DA2.0 links in the PA2.0 version of the math library.

      NOTE: You must specify +DD64 to generate 64-bit code. With +DD64, 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.

      For more information about using math libraries, see the HP-UX Floating-Point Guide in HP's HP-UX documentation list at the HP documentation website.
  • +DS2.0
      +DS2.0 specifies an instruction scheduling algorithm that performs instruction scheduling for a representative system.

      If you do not use this option, the compiler uses the argument specified with the +DA. If you use neither +DS nor +DA, the default instruction scheduling is for the system on which you are compiling.


For more information on optimization options, see the HP Fortran 90 Programmer's Guide in HP's HP-UX documentation list at the HP documentation website.

2.6. Using +Oautopar, how do I fix the parallel library unresolved externals?

When using +O3 +Oautopar and getting linker mesgs like:

/usr/ccs/bin/ld: Unsatisfied symbols:
   __MP_Barrier_Then_Slaves_Wait (first referenced in congrad.o) (code)
   __MP_Barrier (first referenced in average.o) (code)
   __MP_Parallel_Region_Thread (first referenced in average.o) (code)
   __MP_Barrier_First_Master_Waits (first referenced in congrad.o) (code)

make sure to include the +Oparallel_intrinsics flag.


3. C/C++

3.1. Where can I find HP C/C++ documentation?

HP's programming language documentation can be found at the HP documentation website .


4. Third-party Libs

4.1. Are the NAG libraries available?

The NAG libraries are not available.

4.2. My PETSC link fails with: Not a valid library (invalid magic number). Possibly a 64-bit PA archive library (Mismatched ABI).

Both hpux64 (64-bit) and hpux (32-bit) versions of the PETSC library are installed. Make sure PETSC_ARCH is set properly The 64-bit compile option (+DD64) is required for programs linking with hpux64.

4.3. My Makefile for compiling and linking my PETSC job fails; it can't find /opt/local/apps/petsc/bmake/${PETSC_ARCH}/base

As of PETSC 2.1.1, the file structure was changed. Replace include ${PETSC_DIR}/bmake/${PETSC_ARCH}/base with include ${PETSC_DIR}/bmake/common/base in your Makefile.

4.4. Why can't I link netcdf or HDF libraries with my 64-bit program (compiled with +DD64)?

Those libraries are not currently available as 64-bit libraries on this machine.


5. MPI

5.1. How do I compile an executable file in order to run an MPI application ?

See the following page .


FAQ generated by: makefaq