UK National HPC Service

Computer Services for Academic Research Logo
Home | Helpdesk | Machine Status | Search | Apply
 

Porting Codes 3

Non-standard Fortran Extensions

When writing codes in Fortran, some subroutines and functions may be used which are not part of the Fortran standard, but have been added to a particular compiler implementation in order to aid the programmer. Such functions are frequently aids to interact with the operating system such as a flush subroutine to force the flushing of file buffers or a getarg subroutine to get command line arguments. Other routines may be available which implement numeric functions that are not part of the Fortran standard such as asind to return the arcsine of an angle in degrees, or which provide other useful functionality such as a qsort routine to implement the quick sort algorithm.

Many of the extensions are common across a variety of machines and compilers, but in some cases errors will be generated when compiling a code as some routines may not be available on the machine and compiler to which the code is being ported. The easiest way to find non-standard unsupported extensions is to compile the code and wait to see if there are any error messages at link time.

On the Altix machine the Intel compilers come with a portability library which contains a large number of extensions. For the version 7.1 compiler, the code is linked with the portability library by adding the compiler flag -Vaxlib but with the version 8.0 compiler the portability library is linked in by default. There are PDF manuals available on the Altix in the directories:-

  • Version 7.1 compiler
  • /opt/Modules/cmplrs/intel/7.1/compiler70/docs/for_lib.pdf
  • Version 8.0 compiler
  • /opt/Modules/cmplrs/intel/8.0/doc/for_lib.pdf

Page maintained by This page last updated: Tuesday, 17-Aug-2004 15:32:54 BST