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

Diff of /MITgcm/tools/build_options/linux_ia32_g77

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

revision 1.28 by jmc, Tue Sep 6 22:13:26 2011 UTC revision 1.29 by jmc, Thu Sep 8 23:13:20 2011 UTC
# Line 28  NOOPTFILES='' Line 28  NOOPTFILES=''
28    
29  has_sse2=f  has_sse2=f
30  grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1  &&  has_sse2=t  grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1  &&  has_sse2=t
31  if test "x$has_sse2" = xt ; then  
32      FFLAGS="$FFLAGS -Wimplicit -Wunused -mfpmath=sse -msse -msse2"  FFLAGS="$FFLAGS -Wimplicit -Wunused"
 else  
     FFLAGS="$FFLAGS -Wimplicit -Wunused -ffloat-store"  
 fi  
33    
34  if test "x$IEEE" = x ; then     #- with optimisation:  if test "x$IEEE" = x ; then     #- with optimisation:
35       #- note(jmc): on aces, sse & sse2 are faster; -O3 is not always faster than -O2
36        if test "x$has_sse2" = xt ; then
37            FFLAGS="$FFLAGS -mfpmath=sse -msse -msse2"
38        fi
39     #FOPTIM='-O3 -malign-double -funroll-loops'     #FOPTIM='-O3 -malign-double -funroll-loops'
40  #- note(jmc):     # Problems with "-funroll-loops" for some set-up, e.g. tutorial_held_suarez_cs
 # -O3 is not always faster than -O2 ; sse & sse2 are faster ;  
 # Problems with "-funroll-loops" for some set-up, e.g. tutorial_held_suarez_cs  
41      FOPTIM='-O3 -malign-double'      FOPTIM='-O3 -malign-double'
42  else                            #- no optimisation + IEEE :  else                            #- no optimisation + IEEE :
43        if test "x$has_sse2" = xt ; then
44            FFLAGS="$FFLAGS -mfpmath=sse -msse -msse2"
45        else
46            FFLAGS="$FFLAGS -ffloat-store"
47        fi
48      FOPTIM='-O0 -malign-double'      FOPTIM='-O0 -malign-double'
49  fi  fi
50    

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.22