SOPALE

Sopale Nested

Processing SOPALE Output

Printing

MOZART

TMM (Thermo-mechanical Model)

old SOPALE documentation

Geodynamics home page

Fortran on p690.ucis.dal.ca

xlf FORTRAN version 8.1

  • The default
  • Has bugs

xlf FORTRAN version 10.1

Is not the default. In order to use the 10.1 compiler:

  $ which xlf
  $ PATH=/usr/xlf-10.1/usr/bin:${PATH}
  $ which xlf

Slide #19 of Mr. Bunn's suggests using xlf90 with -q64.

Compile Flags

I have not yet got a definitive set of flags for the xlf FORTRAN 10.1 compiler. However, here are results to date.

Quoting from the Language reference, p 696 (pdf page 716)

Use -qfloat=nomaf to ensure compatibility with the IEEE standard for floating point arithmetic (IEEE 754-1985).

Use the -qstrict compiler option for strict conformance to the IEEE standard for floating-point arithmetic on programs compiled with an optimization level of -O3 or higher, -qhot, -qipa, ­qpdf, or -qsmp.

from the compiler manual, p 153 (pdf page 169), we get this:

strictnmaf | nostrictnmaf Turns off floating-point transformations that are used to introduce negative MAF instructions, as these transformations do not preserve the sign of a zero value. By default, the compiler enables these types of transformations. To ensure strict semantics, specify both -qstrict and -qfloat=strictnmaf.

a) 64 bit code *will* produce difference results than 32 bit code, even with strict IEEE compliance, because of the much larger factors involved in the bit rounding. It isn't unusual to see differences even on the same machine when compiled between 32 and 64 bit.

b) Different architectures also product different results while still conforming to IEEE rules, but the differences between architectures like POWER and say SPARC or AMD64 are typically minor and in the final digit, however this can compound over huge iterative runs so I'd be interested in knowing how much of a difference you are seeing.

Mr. Bunn's slide show says :

Compiler options for performance
-O3 -qarch=pwr5 -qtune=pwr5 (use these at minimum)

We might want to use pwr4 for the p690. Be warned though, I haven't yet tried the pwr4 setting. "auto" is safe.

The default for -qhalt is s (-qhalt=s). The compiler will only stop if there are severe errors; as opposed to (normal) errors, or warnings. Using -qhalt=e, the compiler will stop if there are compile errors. This setting should be used wherever possible. (IMHO)

To summarize:

  COMPILEFLAGS = -O3 -qstrict -Q -qarch=auto -qtune=auto \
  -qfloat=nomaf -q$(BITS) $(FLAGS64) -qhalt=e

where BITS=32 or 64, and $(FLAGS64)=-qwarn64 if BITS=64, otherwise blank.

Link Flags

When linking, use both COMPILEFLAGS and LINKFLAGS. We have been using:

  LINKFLAGS = -bmaxdata:0x80000000 -b$(BITS) -bhalt:0 -bnoquiet

Attempts using -bmaxdata:0xc0000000 (32 bit mode) and not specfiying a value (64 bit mode) have met with remarks from AIX about not enough memory.

Manuals

For manuals, see the directory /usr/xlf-10.1/usr/lpp/xlf/doc/en_US/pdf

Some are here:


This page was last modified on Sunday, 05-Jun-2011 10:45:46 ADT
Comments to geodynam at dal dot ca