Installing FVCOM

From FVCOM Wiki

(Redirected from Installation)
Jump to: navigation, search


Recommended Environment

This page describes the installation and execution of FVCOM on your system. FVCOM has been successfully ported to a wide range of environments. The preferred environment is Linux. A niche group have successfully used OS X on 10.4-10.7 which is more or less like linux except that you can also do other productive things. Windows installations are possible but are against better judgement. If you absolute must use it because you live in a dictatorship that does not allow any of the other options, it is recommended that you download and install the latest version of cygwin ( Cygwin is a bash shell/Unix emulation program and contains many of the tools such as tar, gzip/gunzip, and cpp which will be useful for installation and compilation of FVCOM. Also, cygwin gives Windows a decent interface with which to setup and run the model. Note that it requires basic familiarity with Unix commands. The FVCOM development team does not use Windows to run FVCOM and thus if you have trouble you should seek help elsewhere or use an operating system that is suitable for scientific work. If you are successful in building on windows, please write up your installation/run process and we will add it to this Wiki.


Users have built FVCOM with gcc/ifort, icc/ifort, pgcc/pgf90, xlc/xlf90, gcc/gfortran compilers with the majority of the users using ifort for fortran and either gcc or icc to compile the c programs. Note that performance is intrinsically linked to the fortran compiler since FVCOM uses only a few C programs and their performance is not important. At present the gfortran compiler underperforms intel on intel systems and Portland Group (PG) on both intel and AMD systems. However, the gfortran compiler has been improving quickly and at some point may catch up to the commercial offerings. In using a mixed compiler approach (e.g. gcc + ifort), make sure that you are building the C/F90 programs for the same architecture (32 / 64) and that you include any necessary trailing underscore options to handle name mangling. At present, ifort and gcc seem to play fairly nicely together. Pathscale and NAG provide options as well but we have not heard of anyone using these successfully.

Acquiring FVCOM

FVCOM can be obtained from the FVCOM community website through the code repository portal. Note that this section of the website is password protected. Usernames and passwords will be provided after the user agreement form has been signed. Once in the repository, read the package definitions and choose the appropriate version for your research needs. Download the gzipped tar file directly to your computer. This tar file will contain the source code, a makefile, and the test problems described NEEDLINK.

Extracting the tarfile

FVCOM directory structure
FVCOM directory structure

Extract the tarfile (FVCOM***.tgz) with the following command:

gunzip –c FVCOMxxx | tar xvf -

This will produce the top level directory: FVCOMxxx where xxx indicates the version number. This will create the directory structure shown in the figure to the right.

Compiling METIS

This is only necessary for users intending to use the explicit MPI parallelization. The METIS graph partitioning libraries are used to perform the domain decomposition portion of the FVCOM parallelization. These library routines are coded in the c language and must be compiled separately from the main coding. To compile the libraries, edit the makefile in the METIS source directory to point to your c compiler. It is advisable to use a c compiler from the same vendor as your intended Fortran compiler. In addition, make sure you are compiling the libraries using the same architecture (currently 32 or 64 bit) This will help avoid compatibility problems when linking the libraries and the FVCOM code. To compile the libraries, use “make”. A successful build will produce the file libmetis.a which will be linked during the FVCOM build. Note that if you do not intend to use FVCOM in a multiprocessor environment, it is not necessary to build these libraries.

Personal tools