The current build system is here: http://dev.edgcm.columbia.edu/browser/GCM/modelII/trunk/ This page of documentation may be out of date. View the Makefile.README in the trunk folder for more instructions that might be more up-to-date.
All development is done on a MacBook (Intel) running OS X 10.5. This is the primary environment for running and testing EdGCM at GISS. PPC builds are done on this same MacBook (with platform target options for PPC). Windows is run in Parallels.
Binary models produced by the instructions below can be placed in the Applications/Model/ folder. On windows it must be named modelII 8x10x9 1.0.7.exe. On OS X it must be named either modelII_intel.exe or modelII_ppc.exe. Future simulations will use one of these. Currently running simulations will use whatever existed there at the time the play button was pressed.
source /opt/intel/fc/10.1.008/bin/ifortvars.sh export COMPILER=intel
then
make -f Makefile.ifort
The output is modelII_intel.exe
Most development is done on an OS X Intel box. The compiler supports compiling to the PPC target. The model is compiled to only PPC target and when run on Mac Intel box it is run through Rosetta. The following environment variables are used to achieve this:
export SDK="/Developer/SDKs/MacOSX10.4.0.sdk" export ABSOFT=/Users/mankoff/local/Applications/Absoft.ppc export ABSOFT_AS="as -arch ppc" export ABSOFT_LINKER="c++ -isysroot ${SDK} -Wl,-syslibroot,${SDK} -arch ppc" export PATH=$ABSOFT/bin:$PATH export MANPATH=$ABSOFT/man:$MANPATH export MACOSX_DEPLOYMENT_TARGET=10.4 export COMPILER=Absoft
The command to compile is run in the source directory (browser:GCM/modelII/trunk) and is
make -f Makefile.Mac.PPC
The output is the executable modelII_ppc.exe
This platform is no longer used as a development platform, although you should still be able to run EdGCM on a PPC machine. If you want to compile on PPC, you should look in the modelII/trunk/ folder and browse back in time to 2006 or early 2007.
The windows development environment is Windows XP, Absoft Pro Fortran 8.0, running in Parallels. The source code is the same as for the OS X version with the exception of 1 file: UTILmacDBL.f and UTILwinDBL.f, and the makefile is now Makefile.win.
Assuming Absoft 8.2 is installed in C:\Absoft82 ModelII can be built as follows:
Navigate to Start Menu > Run > "cmd" (not "command")
ABSOFT=C:\Absoft82 PATH=C:\Absoft82\BIN;%PATH% LIB=C:\Absoft82\LIB;%LIB% INCLUDE=C:\Absoft82\CINCLUDE;%INCLUDE%
Set up a share folder between Mac and Windows. This can be done easily through Parallels, or at the DOS prompt: net use y: \\.psf\GISS\GCM\modelII\trunk
Navigate to the build directory:
y: cd GCM\modelII\trunk
Build the model:
amake -f Makefile.win
The result should be a file called "model.exe". If not, make sure you can build correctly in OS X. Debug. Email for help.
Makefile.win.gui is the GUI Makefile for using with the Absoft 8.2 IDE. I prefer the command line.
This platform is not officially supported. There is a Makefile.gfortran in the source directory which works at the time of this writing. You'll need to edit RANVAX.f and setpath.f to remove some "_"'s.
See http://forums.edgcm.columbia.edu/ for comments and user suggestions on building with CygWin
You cannot run EdGCM on Linux but you can run Model II. The following instructions are thanks to Patrick Lee