RFM Installation

13JUL18

Contents

System Requirements

It should be possible to install the RFM on any machine with a Fortran compiler, although the examples here are restricted to Unix/Linux systems.

RFM v5.0 is written in FORTRAN2003 and any generic Fortran compiler should work (gfortran, ifort). Since it uses dynamic array allocation the memory requirements are set during run time. See RFM Memory Size for details.

Unpacking the RFM tar file

The source code is distributed as a compressed (with gzip) tar file. To unpack the code, place the tar file (eg named rfm_v5.01.tar.gz) into an empty directory and type
tar -xzf rfm_v5.01.tar.gz
For RFM v5.0 this expands to produce a single program module (rfm.f90) plus around 350 other *.f90 files containing either subroutines or data modules, plus one makefile.

Compiling the RFM v5

The RFM v5 compilation is a bit more complicated than the old Fortran77 code since Fortran90 requires the creation of intermediate *.mod files (basically containing information on interfaces between different modules) and so requires compiling in a particular order to ensure that the *.mod files of eg called subroutines exist.

You could just use the sledge-hammer approach (and I have a certain sympathy with that): just repeatedly type something like

gfortran *.f90 -o rfm
which will initially create a large number of warnings about missing modules but, after about 8 or 9 goes, will eventually be satisfied that everything is in order and create an executable called rfm

A more sophisticated approach is to use the makefile provided in the delivery and just type

make

The provided makefile uses a specific compiler (gfortran) and compilation switches (-fbounds-check -Wall), and you'll probably have your own preferences, in which case edit the relevant lines in the makefile

# 'makefile' for RFM created by IDL program make.pro
# To create/update RFM executable: just type 'make'
# To clean up (by deleting all .o,.mod files): type 'make clean'

# Edit next 2 lines to change compiler and options
F90 = gfortran
FLAGS = -fbounds-check -Wall
# if you don''t need any flags, just change to: FLAGS = '

# change anything beyond this point and you're on your own!
...
The IDL program used to generate the makefile relies on a very specific code structure within each module so is unlikely to be of much use to anyone else, but if you're interested it's:
make.pro

Making Local Modifications

There is a CHARACTER*11 variable VIDHDR set at the start of the executable code in the main program module rfm.f90, which is written as part of the
output file headers. To allow traceability between spectra generated by different versions of the RFM code, any local modifications to the RFM code should be reflected in this field. E.g., to represent a local Oxford modification 13 to the standard version '5.01', I might use is:
VIDHDR = '5.01_OXF_13'
But of course it's up to you to decide how to represent this information in VIDHDR

Queries & Bug Reports

A list of all reported bugs (and fixes) is maintained on [HERE], and the descriptions of each Driver Table Section and Flag also include any related bugs.

Any queries or reports on possible new bugs should be emailed to: anu.dudhia@physics.ox.ac.uk