XHome > Resources > Notes > Compiler

Compiler

Each compiler compiles the CASL algorithm software differently. Below is a list of details that could be useful for successful compiling.

Portland Group Compiler

Saving variable values in subroutines

The compiler command pgf90 needs the flag -Msave so that values of variables in subroutines are saved until the subroutine is called again. Jurgen Theiss, 28 September 2006

Flushing the buffer

When writing to standard output the buffer needs to be flushed. This is done by inserting the call call flush(6) at the appropriate place below the command to write to standard output, which is write(*, ...). If this call is not inserted, the buffer will be flushed and its contents written to standard output not until the programme terminates. For an example, search for "flush(6)" in ftp://ftp.casl.org.uk/cs/chan/sources/chancs.F. Jurgen Theiss, 28 September 2006

GNU Compiler Collection (GCC)

g77 and gfortran

In new versions of the GNU Compiler Collection (GNU) g77 is replaced with gfortran. This change affects ftp://ftp.casl.org.uk/cs/bin-sh/gfc. It compiles perfectly if g77 is replaced with gfortran and libg2c.a with libgcc.a. David Dritschel, 9 April 2007

© 2006 Vortex Dynamics Research Group, University of St. Andrews, Scotland, UK & Theiss Research, La Jolla, California, USA