New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
WorkingGroups/TAM/InstallationsMacInstosh/InstallMacGfortran (diff) – NEMO

Changes between Version 4 and Version 5 of WorkingGroups/TAM/InstallationsMacInstosh/InstallMacGfortran


Ignore:
Timestamp:
2009-09-15T16:16:22+02:00 (15 years ago)
Author:
chauvin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkingGroups/TAM/InstallationsMacInstosh/InstallMacGfortran

    v4 v5  
    11 
    2 hello world 
     2== Installing the gfortran compiler == 
     3 
     4gfortran 4.2.3 available on the site [http://r.research.att.com/tools/] 
     5 
     6 
     7== Generating NETCDF modules and library == 
     8The following script is executed in the directory netcdf-3.6.1. 
     9gcc-4.0 comes from the XCode (Mac OS X 10.5.8). 
     10Flags avoid conflicts between C and Fortran during the library compilation. 
     11 
     12 
    313{{{ 
    4 hello world 
     14#!/bin/sh 
     15 
     16export FC=gfortran 
     17export F90=gfortran 
     18export F77=gfortran 
     19 
     20export FFLAGS='-O3 -ff2c' 
     21export F90FLAGS='-O3 -ff2c' 
     22 
     23export CC=gcc-4.0 
     24export CPPFLAGS='-Df2cFortran' 
     25 
     26./configure --prefix=/usr/local/netcdf-3.6.1/gfortran 
     27 
    528}}} 
     29 
     30-- Compiling NEMO -- 
     31Config file in NEMO/build/config : 
     32The debugging option has to be -dwarf-2 (and not -g).  
     33The optimizing option -O3 is ok too. 
     34 
     35 
     36{{{ 
     37NETCDF_INCLUDE=/usr/local/netcdf-3.6.1/gfortran/include 
     38NETCDF_LIB=-L/usr/local/netcdf-3.6.1/gfortran/lib -lnetcdf 
     39CPP=cpp 
     40CPPFLAGS=-traditional -P 
     41AR=ar  
     42ARFLAGS=cvr 
     43FC=gfortran 
     44FCFLAGS=  -c -gdwarf-2 -fdefault-real-8 -ffree-line-length-none -I$(NETCDF_INCLUDE) -I$(NEMOLIB) 
     45FCFLAGSF90=  -c -gdwarf-2  -fdefault-real-8 -ffree-line-length-none -I$(NETCDF_INCLUDE) -I$(NEMOLIB) 
     46LDFLAGS=  -gdwarf-2  -free-line-length-none -o  
     47LDNOMPI=$(FC) 
     48#-g -Wall -Wimplicit-none -Wuninitialized -fbounds-check -ftrace=frame -fpointer=invalid 
     49 
     50CPPKEYS_ARCH=-DNC_DOUBLE \ 
     51-DNOIARGCPROTO \ 
     52-Dkey_tau_daily_monthly_files \ 
     53-Dkey_dtasst_monthly_files \ 
     54-Dkey_flx_forced_daily_monthly_files 
     55 
     56}}} 
     57 
     58