Changes between Version 4 and Version 5 of WorkingGroups/TAM/InstallationsMacInstosh/InstallMacGfortran
- Timestamp:
- 2009-09-15T16:16:22+02:00 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkingGroups/TAM/InstallationsMacInstosh/InstallMacGfortran
v4 v5 1 1 2 hello world 2 == Installing the gfortran compiler == 3 4 gfortran 4.2.3 available on the site [http://r.research.att.com/tools/] 5 6 7 == Generating NETCDF modules and library == 8 The following script is executed in the directory netcdf-3.6.1. 9 gcc-4.0 comes from the XCode (Mac OS X 10.5.8). 10 Flags avoid conflicts between C and Fortran during the library compilation. 11 12 3 13 {{{ 4 hello world 14 #!/bin/sh 15 16 export FC=gfortran 17 export F90=gfortran 18 export F77=gfortran 19 20 export FFLAGS='-O3 -ff2c' 21 export F90FLAGS='-O3 -ff2c' 22 23 export CC=gcc-4.0 24 export CPPFLAGS='-Df2cFortran' 25 26 ./configure --prefix=/usr/local/netcdf-3.6.1/gfortran 27 5 28 }}} 29 30 -- Compiling NEMO -- 31 Config file in NEMO/build/config : 32 The debugging option has to be -dwarf-2 (and not -g). 33 The optimizing option -O3 is ok too. 34 35 36 {{{ 37 NETCDF_INCLUDE=/usr/local/netcdf-3.6.1/gfortran/include 38 NETCDF_LIB=-L/usr/local/netcdf-3.6.1/gfortran/lib -lnetcdf 39 CPP=cpp 40 CPPFLAGS=-traditional -P 41 AR=ar 42 ARFLAGS=cvr 43 FC=gfortran 44 FCFLAGS= -c -gdwarf-2 -fdefault-real-8 -ffree-line-length-none -I$(NETCDF_INCLUDE) -I$(NEMOLIB) 45 FCFLAGSF90= -c -gdwarf-2 -fdefault-real-8 -ffree-line-length-none -I$(NETCDF_INCLUDE) -I$(NEMOLIB) 46 LDFLAGS= -gdwarf-2 -free-line-length-none -o 47 LDNOMPI=$(FC) 48 #-g -Wall -Wimplicit-none -Wuninitialized -fbounds-check -ftrace=frame -fpointer=invalid 49 50 CPPKEYS_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