#!/bin/bash # # $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_ia32_gfortran,v 1.1 2005/04/28 18:01:19 edhill Exp $ # $Name: $ # # This was tested with gcc-gfortran v4.0.0 as shipped in Fedora Core # 4-test-2. MITgcm successfully compiled but the gfortran-built # mitgcmuv binary failed to read the "eedata" file. The gfortran # docs make it clear that there are known NAMELIST bugs in curreent # versions of gfortran and that users should turn to g77 if their # code encounters these bugs. Later versions of gfortran will # supposedly fix the NAMELIST implementation. FC=gfortran CC=gcc DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4' CPP='cpp -traditional -P' NOOPTFLAGS='-O0' if test "x$IEEE" = x ; then # No need for IEEE-754 FFLAGS='-Wimplicit -Wunused -Wuninitialized' FOPTIM='-O3 -malign-double -funroll-loops' else # Try to follow IEEE-754 has_sse2=f grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1 && has_sse2=t if test "x$has_sse2" = xt ; then FFLAGS='-Wimplicit -Wunused -mfpmath=sse -msse -msse2' else FFLAGS='-Wimplicit -Wunused -ffloat-store' fi # echo 'FFLAGS="'$FFLAGS'"' FOPTIM='-O0 -malign-double' fi if test -d /usr/include/netcdf-3 ; then INCLUDES='-I/usr/include/netcdf-3' LIBS='-L/usr/lib/netcdf-3' elif test -d /usr/include/netcdf ; then INCLUDES='-I/usr/include/netcdf' elif test -d /usr/local/netcdf ; then INCLUDES='-I/usr/local/netcdf/include' LIBS='-L/usr/local/netcdf/lib' fi