HP Fortran v2.9 for HP-UX 11i v2 Release Note*5991-0697*
HP Fortran for HP-UX v2.9
What’s in This Version
Chapter 114
Then compile with:
/opt/fortran90/bin/f90 foo.f -lunalign +noppu
If you need to drop the +noppu, then add an alias directive as follows:
!$HP$ALIAS allow_unaligned_data_access=’allow_unaligned_data_access’
PROGRAM bs30
INTEGER*2 i2(10)
INTEGER*4 i4
EQUIVALENCE (i2(2), i4)
DATA I4 /z’FFFF0000’/
i4=12
call allow_unaligned_data_access()
print *,i4
END
Then compile with:
/opt/fortran90/bin/f90 foo.f -lunalign
NOTE Nothing new is required to use the aforementioned -lunalign runtime fix
approach; however, you do need the latest patch for the +allow_unaligned
compile flag.
If the misaligned data might be passed to routines which are not compiled with
+allow_unaligned (for example, Fortran runtime IO and F90 libraries), then having the call
will allow the runtime fixes to happen which will prevent bus errors in your application.
To realize optimum performance, try and measure the following two options:
1. Compile with +allow_unaligned and insert the call to allow_unaligned_data_access()
2. Only insert the call to allow_unaligned_data_access()
Option #1 may perform faster with very few references to misaligned data and a handler is
invoked for these misaligned references. #2 may perform faster with many references.
Full OpenMP v2.0
HP Fortran now supports full OpenMP v2.0. OpenMP is a portable, scalable model that gives
shared-memory parallel programmers a simple and flexible interface for developing parallel
applications on platforms ranging from the desktop to the supercomputer.