Sunday, 4 September 2011

How to install gfortran and PLATON on OS X (Snow Leopard)

This is a short guide on how to install a fortran compiler and PLATON on OS X Snow Leopard (probably works as well for Lion).

gfortran

Download gfortran from sourceforge download gfortran-snwleo-intel-bin.tar.gz, unzip:
gunzip gfortran-snleo-intel-bin.tar.gz

and install using

sudo tar -xvf gfortran-snleo-intel-bin.tar -C /

Further detail on how to install on other platforms/OS X versions, see here.

PLATON

This requires Xcode to properly install and compile PLATON.

From here, get platon.f and xdrvr.c and compile (sometimes with errors) using:

gfortran -o platon platon.f xdrvr.c -L/usr/X11R6/lib -lX11

gfortran -c platon.f gfortran -o platon platon.o xdrvr.c -L/usr/X11R6/lib -lX11

For the validation module, check.def has to be downloaded and an environment variable has to be set in .bash_profile:

export CHECKDEF=/usr/local/lib/check.def

or wherever you chose to put it.

No comments:

Post a Comment