Download Chapter 3 Compilation and installation

Transcript
3.2. COMPILATION
57
comps
physics
COHERENS V2.5
program directory tree
source
comps
code
sediments
source
comps
biology
source
examples
V2.5
cones
setups
.....
ptests
data
eclwf−xlf
linux−gfort
tutorial
osf−dig
scr
utils
decomp
Figure 3.1: COHERENS file directory tree
3.2
Compilation
To compile the COHERENS source code, the following tools are essential
• FORTRAN 90 compiler
• C-preprocessor, usually cpp
• a compiled MPI library which is needed (only) for simulations in parallel
mode. Note that MPI is not supported by all compilers.
• a compiled netCDF library (version 3.6 or higher) which is needed (only)
to read and write data in portable netCDF format.
Compilation is performed with the Unix/Linux make utility. The rules for
making the executable file coherens are defined in the file Makefile located
in the comps directory. Contrary to COHERENS V1 this file is given in a
portable format, i.e. independent of the type of compiler or operating system.
Makefile reads input from a series of additional files:
• objects.cmp: defines macros with a listing of objects (*.o) files.