wiki:GnuFortran

Version 12 (modified by skbhate, 17 years ago) ( diff )

--

Build ROMS using gfortran on Win32 Machine

Below is the step by step procedure for a successful compilation of ROMS3.0 on a win32 machine under Cygwin.

  • Cygwin setup for gfortran

In order for gfortran to work properly on Cygwin make sure you have math packages GMP and MPFR installed on your machine. Open a Cygwin shell and type the following commands to confirm you have GMP and MPFR packages.

$ cygcheck -c | grep gmp (If you see what is shown below then you're ok)

gmp 4.2.1-1 OK

libgmp3 4.2.1-1 OK

$ cygcheck -c | grep mpfr (If you see what is shown below then you're ok)

libmpfr1 2.2.1-1 OK

mpfr 2.2.1-1 OK

If cygcheck fails to report the GMP and MPFR package installations, then install these packages using Cygwin Setup. These packages are found under 'Libs' category in package installation list of cygwin setup.

  • Installing gfortran
    • Get the latest gfortran binary for Cygwin. (e.g. gfortran-4.3-Cygwin-i686.tar.bz2)
    • Open a cygwin shell, locate the gfortran tar file, and type the following commands. This will install gfortran in /usr/local/bin and will be included in your search path.

$ tar -xjvf gfortran-4.3-Cygwin-i686.tar.bz2 -C /

$ ln -s /usr/local/gfortran/bin/gfortran.exe /usr/local/bin/gfortran

$ gfortran --version (You should see something as shown below to know that gfortran is working on your system)

GNU Fortran (GCC) 4.3.0 20070512 (experimental) Copyright (C) 2007 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Fortran under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING

  • Building Netcdf library with gfortran support

  • Building ROMS

Note: See TracWiki for help on using the wiki.