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

Diff of /MITgcm/tools/build_options/linux_amd64_gfortran

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

revision 1.4 by jmc, Wed Mar 25 15:17:47 2009 UTC revision 1.7 by jmc, Wed Apr 15 22:45:29 2009 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  #  
3  #  $Header$  #  $Header$
4  #  $Name$  #  $Name$
 #  
5    
6  #  Tested with gcc-gfortran v4.0.x as shipped with Fedora Core 4.  
7  #  It fixes the ' \' versus ' &' terminator problem but some  #  Tested with gcc-gfortran v4.1.x as shipped with Fedora Core 6,7,8
8  #  namelist problems remain.  The biggest seems to be the inability  #         with gcc-gfortran v4.3.x as shipped with Fedora Core 9,10
9  #  of current gfortran versions to support namelist syntax such as:  #  It fixes the ' \' versus ' &' terminator ;
10  #  #  with older versions (v4.0): namelist problems with syntax such as:
11  #     fields(1,1) = 'UVELSLT ','VVELSLT ','WVELSLT ',  #     fields(1,1) = 'UVELSLT ','VVELSLT ','WVELSLT ',
12  #  #      which results in run-time errors.)
 #  which results in run-time errors.  
13    
14    # OpenMP : Tested on dickens with gcc-gfortran v4.3.2 as shipped with FC 10
15    #-------
16    # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
17    #    and generally, needs to increase the thread stack-size:
18    #   -  sh,bash:
19    #     > export OMP_NUM_THREADS=2
20    #     > export GOMP_STACKSIZE=400m
21    #   - csh,tcsh:
22    #     > setenv OMP_NUM_THREADS 2
23    #     > setenv GOMP_STACKSIZE 400m
24    #-------
25    
26  FC=gfortran  FC=gfortran
27  F90C=gfortran  F90C=gfortran
# Line 21  DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR Line 30  DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR
30  CPP='cpp  -traditional -P'  CPP='cpp  -traditional -P'
31  NOOPTFLAGS='-O0'  NOOPTFLAGS='-O0'
32  EXTENDED_SRC_FLAG='-ffixed-line-length-132'  EXTENDED_SRC_FLAG='-ffixed-line-length-132'
33    OMPFLAG='-fopenmp'
34    
35  if test "x$DEVEL" != x ; then  if test "x$DEVEL" != x ; then
36      FFLAGS='-g -Wall -W -ffpe-trap=invalid,zero,overflow -fbounds-check'      FFLAGS='-g -Wall -W -ffpe-trap=invalid,zero,overflow -fbounds-check'
# Line 36  if test "x$IEEE" = x ; then Line 46  if test "x$IEEE" = x ; then
46      FOPTIM='-O3 -funroll-loops'      FOPTIM='-O3 -funroll-loops'
47  else  else
48      #  Try to follow IEEE-754      #  Try to follow IEEE-754
49        # these may also be useful, but require specific gfortran versions:
50        # -Wnonstd-intrinsics  for gfortran <= 4.3
51        # -Wintrinsics-std     for gfortran >= 4.4
52        # -Wno-tabs            for gfortran >= 4.3
53        FFLAGS="$FFLAGS -Waliasing -Wampersand -Wsurprising -Wline-truncation"
54    #   to get plenty of warnings :
55    #   FFLAGS="$FFLAGS -Wconversion -Wimplicit-interface -Wunused-labels"
56      FOPTIM='-O0'      FOPTIM='-O0'
57    #   for automatic testing with testreport (but no relation with IEEE arithmetic):
58        FOPTIM="$FOPTIM -g -ffpe-trap=invalid,zero,overflow -fbounds-check"
59  fi  fi
60  F90FLAGS=$FFLAGS  F90FLAGS=$FFLAGS
61  F90OPTIM=$FOPTIM  F90OPTIM=$FOPTIM

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22