Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Installation

gducrozet edited this page Jan 29, 2019 · 12 revisions

Source Code

Code development uses Git for version control. If you wish to contribute to code development, it is advised to clone this Git repository and use the same version control tool.

Linux/Unix environment

A Makefile is provided with the source code for compiling HOS-ocean in Linux/Unix environment. The GNU Fortran compiler gfortran shall be used. Other Fortran compilers may be used with small adjustments of compiler options, libraries...

Makefile makes use of executable makedepf90 to extract automatic dependencies. To make it available, if you have ubuntu installed, you can install it from apt-get repositories from terminal itself i.e. sudo apt-get install makedepf90. Otherwise, you can follow the steps:

  • Download the source files
  • Unzip to a given folder
  • Go to the folder with a Terminal. Compile and install the code with the following commands

sudo ./configure

sudo make

sudo make install

  • Check if the installation carried on correctly by opening a new terminal and look for the command makedepf90

Intel Fortran compiler (ifort)

Intel Fortran compiler ifort have been tested and may be used with the following adjustment (due to non-standard random number generation). In file initial_condition.f90 a USE statement has to be added at the beginning of module:

USE IFPORT, only:RAND

Windows environment

Intel Fortran compiler (ifort)

Intel Fortran compiler ifort have been tested and may be used with the following adjustment (due to non-standard random number generation). In file initial_condition.f90 a USE statement has to be added at the beginning of module:

USE IFPORT, only:RAND

Microsoft Visual Studio

To compile a Fortran project with Visual Studio, you first have to create a Visual studio project and to add all the source files to the project (all the files in the "source" folder (except the benchmark folder which has to be used separately)). Compiling HOS-ocean in Windows environment with Microsoft Visual Studio has been done with the x64 Platform and an extended 'Stack Reserve Size' and 'Stack Commit Size'(> Configuration Properties > Linker > System).

External libraries

Different external libraries are needed for the compilation of HOS-ocean

  • FFTW 3.3.4: available here
  • LAPACK: available here

Linux/Unix users

The location of the compiled libraries have to be specified in the Makefile under the following flag (default is libraries located in /usr/local/lib/)

LIBDIR=/usr/local/lib/

Windows users and other platforms

The Intel Math Kernel Library needs to be used in a sequential mode. (> Configuration Properties > Fortran > Libraries)

Analytics