Compiling and Linking

From WikiROMS
Revision as of 02:03, 3 November 2006 by Kate (talk | contribs) (first draft)
(change visibility) (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Gnu make

To compile ROMS, first check to make sure that you have Gnu make on your system. Typing "make -v" or "gmamke -v" should bring up a message such as:

GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

You want to have at least version 3.77. If you don't have a fairly modern Gnu make, it is freely available and quite portable.

NetCDF

You will also need to have the Netcdf library installed on your system. Tell ROMS how to find it according to the directions in makefile.

User Changes

There are several user-defined switches in makefile, as described there.

Compiling

Check over your cppdefs.h one last time, then you should cd to the top-level ROMS directory. From here, type "make" or "gmake" (I create an alias so as to be typing "make" on all systems). It should now be compiling and linking for you. The final executable will be called oceanS, oceanG, oceanM, or oceanO for serial, debug, MPI, or OpenMP code, respectively.