makefile

From WikiROMS
Revision as of 16:21, 12 November 2006 by Arango (talk | contribs)
Jump to navigationJump to search

ROMS has a single makefile located in the top-level directory. Its generic structure facilitates the compiling of ROMS with other coupled models. The user usually needs to check/modify few definitions in the makefile before compiling a particular applications to specify primarily Fortran compiler, parallel options, and 64-bit floating-point number precision.

User Changes to makefile

As a user, you need to check and perhaps edit the makefile to set the values of the following definitions:

DEBUG :=
MPI :=
MPIF90 :=
OPENMP :=
ARPACK :=
LARGE :=
FORT ?=

See Gmake#Top_Level_Makefile and Gmake#Conditionals for more details.

Compiler-dependent Changes

Also as a user, you need to be aware of the files in the Compilers directory. The top-level makefile will be including one of these files, based on combining the result of uname -s with the value of FORTRAN. For instance, it might be including Darwin-gfortran.mk if you are on a Mac and using the gfortran compiler. You need to make sure this file exists and has the correct values for the compiler options and for finding the NetCDF library. The file should contain pointers to both the NetCDF library and include files. If the library is different for 32-bit and 64-bit options, that needs to be taken care of as well. See Gmake#Conditionals for an example.