/[MITgcm]/MITgcm/tools/build_options/linux_ia32_gfortran
ViewVC logotype

Annotation of /MITgcm/tools/build_options/linux_ia32_gfortran

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Sun Oct 16 06:35:31 2005 UTC (18 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57y_post, checkpoint57y_pre, checkpoint58, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint58a_post, checkpoint57z_post, checkpoint58b_post
Changes since 1.2: +5 -4 lines
 o two gfortran updates:
   1) fix the gfortran optfile so that it works better with the version
      of gfortran as shipped w/ FC4 and
   2) create an MPI version that works with the very-easy-to-use FC4
      version of LAM ('sudo yum install lam')

1 edhill 1.1 #!/bin/bash
2     #
3 edhill 1.3 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia32_gfortran,v 1.2 2005/06/17 22:38:18 edhill Exp $
4 edhill 1.1 # $Name: $
5     #
6    
7 edhill 1.2 # Tested with gcc-gfortran v4.0.x as shipped with Fedora Core 4.
8     # It fixes the ' \' versus ' &' terminator problem but some
9     # namelist problems remain. The biggest seems to be the inability
10     # of current gfortran versions to support namelist syntax such as:
11     #
12     # fields(1,1) = 'UVELSLT ','VVELSLT ','WVELSLT ',
13     #
14     # which results in run-time errors.
15 edhill 1.1
16    
17     FC=gfortran
18     CC=gcc
19 edhill 1.2 DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DNML_TERMINATOR'
20 edhill 1.1 CPP='cpp -traditional -P'
21     NOOPTFLAGS='-O0'
22    
23     if test "x$IEEE" = x ; then
24     # No need for IEEE-754
25 edhill 1.3 # "warning: -Wuninitialized is not supported without -O"
26     FFLAGS='-Wunused'
27 edhill 1.1 FOPTIM='-O3 -malign-double -funroll-loops'
28     else
29     # Try to follow IEEE-754
30     has_sse2=f
31     grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1 && has_sse2=t
32     if test "x$has_sse2" = xt ; then
33 edhill 1.3 FFLAGS='-Wunused -mfpmath=sse -msse -msse2'
34 edhill 1.1 else
35 edhill 1.3 FFLAGS='-Wunused -ffloat-store'
36 edhill 1.1 fi
37     # echo 'FFLAGS="'$FFLAGS'"'
38     FOPTIM='-O0 -malign-double'
39     fi
40    
41     if test -d /usr/include/netcdf-3 ; then
42     INCLUDES='-I/usr/include/netcdf-3'
43     LIBS='-L/usr/lib/netcdf-3'
44     elif test -d /usr/include/netcdf ; then
45     INCLUDES='-I/usr/include/netcdf'
46     elif test -d /usr/local/netcdf ; then
47     INCLUDES='-I/usr/local/netcdf/include'
48     LIBS='-L/usr/local/netcdf/lib'
49     fi
50    

  ViewVC Help
Powered by ViewVC 1.1.22