/[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.1 - (hide annotations) (download)
Thu Apr 28 18:01:19 2005 UTC (19 years ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57h_done, checkpoint57h_pre, checkpoint57h_post
 o add gfortran optfile with comments about NAMELIST failures
   - tested with Fedora Core 4-test-2

1 edhill 1.1 #!/bin/bash
2     #
3     # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia32_g77,v 1.17 2005/03/25 21:35:28 heimbach Exp $
4     # $Name: $
5     #
6    
7     # This was tested with gcc-gfortran v4.0.0 as shipped in Fedora Core
8     # 4-test-2. MITgcm successfully compiled but the gfortran-built
9     # mitgcmuv binary failed to read the "eedata" file. The gfortran
10     # docs make it clear that there are known NAMELIST bugs in curreent
11     # versions of gfortran and that users should turn to g77 if their
12     # code encounters these bugs. Later versions of gfortran will
13     # supposedly fix the NAMELIST implementation.
14    
15    
16     FC=gfortran
17     CC=gcc
18     DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4'
19     CPP='cpp -traditional -P'
20     NOOPTFLAGS='-O0'
21    
22     if test "x$IEEE" = x ; then
23     # No need for IEEE-754
24     FFLAGS='-Wimplicit -Wunused -Wuninitialized'
25     FOPTIM='-O3 -malign-double -funroll-loops'
26     else
27     # Try to follow IEEE-754
28     has_sse2=f
29     grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1 && has_sse2=t
30     if test "x$has_sse2" = xt ; then
31     FFLAGS='-Wimplicit -Wunused -mfpmath=sse -msse -msse2'
32     else
33     FFLAGS='-Wimplicit -Wunused -ffloat-store'
34     fi
35     # echo 'FFLAGS="'$FFLAGS'"'
36     FOPTIM='-O0 -malign-double'
37     fi
38    
39     if test -d /usr/include/netcdf-3 ; then
40     INCLUDES='-I/usr/include/netcdf-3'
41     LIBS='-L/usr/lib/netcdf-3'
42     elif test -d /usr/include/netcdf ; then
43     INCLUDES='-I/usr/include/netcdf'
44     elif test -d /usr/local/netcdf ; then
45     INCLUDES='-I/usr/local/netcdf/include'
46     LIBS='-L/usr/local/netcdf/lib'
47     fi
48    

  ViewVC Help
Powered by ViewVC 1.1.22