GENIE Compiling

=Apple OSX and g95=


 * POWERPC, 1.5GHZ Powerbook
 * OSX Tiger 10.4.7, Xcode 2.4

Genie compiles with g95, gcc and g++
 * g95 0.90-1 (Fink download)
 * gcc 4 (Xcode, probably)
 * g++ 4 (Xcode, probably)

Need to exclude biogem (code from cvs early October 2006)
In genie-main makefile MODULE_NAMES = igcm3 \ slabocean \ slabseaice \ fixedocean \ fixedseaice \ goldstein \ embm \ seaice \ fixedatmos \ land \ fixedland \ fixedicesheet \ fixedchem \ ichem \ atchem
 * 1)               biogem \
 * 2)               ichem

genie-main/genie_ini_wrappers.f90: Lines 262+: ! call initialise_biogenie(t0,go_dt,go_lin,go_lout, & ! and all the arguments...

genie-main/genie_loop_wrappers.f90: Lines 676+ and 725:

! call biogenie( & ! and all the arguments...

! call rest_biogem(go_lout,'.'//go_ext)

genie-main/genie.F: Line 1688:

c call end_biogenie(go_sfcatm)

In order to work with netcdf (v3.6.1 compiled from source with g96, gcc and g++)
You must compile netcdf with identical compilers to those used for genie. You may need to edit the netcdf configure script to make sure it finds the right compilers. Netcdf binaries downloaded via fin are therefore unlikely to work.

Then in genie-main makefile.arc comment out two flags:
 * 1) FFLAGS += -fno-second-underscore
 * 2) LDFLAGS += -static

Alternatively, if you can work out how to do it, compile netcdf with -fno-second-underscore. I couldn't fathom where to put that in.

jules@jamstec.go.jp, 30th October 2006.

Compilation error with NetCDF version 4
If you are using identical compilers for genie and netcdf, but still get a compilation error message associated with netcdf (e.g. This module file was generated for a different platform or by an incompatible compiler or compiler release. It cannot be read), there may be a compatibility issue with your netcdf version. Switching from NetCDF version 4 (RHES4) to v3.6.1 has bypassed this problem (using Red Hat/ifort/icc), although the reason for this is not known.

k.i.c.oliver@open.ac.uk, 21st November 2006