[cig-commits] r22389 - seismo/3D/SPECFEM3D_GLOBE/trunk
elliott.sales.de.andrade at geodynamics.org
elliott.sales.de.andrade at geodynamics.org
Thu Jun 20 15:03:37 PDT 2013
Author: elliott.sales.de.andrade
Date: 2013-06-20 15:03:37 -0700 (Thu, 20 Jun 2013)
New Revision: 22389
Modified:
seismo/3D/SPECFEM3D_GLOBE/trunk/flags.guess
Log:
Simplify flags.guess logic a little bit.
Only check if enviroment variables are set by the user at the end,
instead of repeatedly within the case statement.
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/flags.guess
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/flags.guess 2013-06-20 22:03:24 UTC (rev 22388)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/flags.guess 2013-06-20 22:03:37 UTC (rev 22389)
@@ -17,20 +17,16 @@
#
# Cray Fortran
#
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-O3 -Onoaggress -Oipa0 -hfp2 -Ovector3 -Oscalar3 -Ocache2 -Ounroll2 -Ofusion2" # turn on optimization; -Oaggress -Oipa4 would make it even more aggressive
+ DEF_FFLAGS="-O3 -Onoaggress -Oipa0 -hfp2 -Ovector3 -Oscalar3 -Ocache2 -Ounroll2 -Ofusion2" # turn on optimization; -Oaggress -Oipa4 would make it even more aggressive
# -eC -eD -ec -en -eI -ea -g -G0 # turn on full debugging and range checking
- fi
;;
pgf95|*/pgf95|pgf90|*/pgf90)
#
# Portland PGI
#
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-fast -Mnobounds -Minline -Mneginfo -Mdclchk -Knoieee -Minform=warn -Mdaz -Mflushz" # -mcmodel=medium
+ DEF_FFLAGS="-fast -Mnobounds -Minline -Mneginfo -Mdclchk -Knoieee -Minform=warn -Mdaz -Mflushz" # -mcmodel=medium
# -Mbounds
# -fastsse -tp amd64e -Msmart
- fi
;;
ifort|*/ifort)
#
@@ -41,9 +37,7 @@
# parallel file systems like SFS 3.2 / Lustre 1.8. If omitted
# I/O throughput lingers at 2.5 MB/s, with it it can increase to ~44 MB/s
# However it does not make much of a difference on NFS mounted volumes or with SFS 3.1.1 / Lustre 1.6.7.1
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-O3 -check nobounds -xHost -ftz -assume buffered_io -assume byterecl -align sequence -vec-report0 -std03 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage" # -mcmodel=medium -shared-intel
- fi
+ DEF_FFLAGS="-O3 -check nobounds -xHost -ftz -assume buffered_io -assume byterecl -align sequence -vec-report0 -std03 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage" # -mcmodel=medium -shared-intel
# useful for debugging...
# for debugging: change -O3 -check nobounds to -check all -debug -g -O0 -fp-stack-check -traceback -ftrapuv
#
@@ -52,18 +46,14 @@
#
# GNU gfortran
#
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-std=f2003 -fimplicit-none -frange-check -O2 -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow " # -mcmodel=medium
- fi
+ DEF_FFLAGS="-std=f2003 -fimplicit-none -frange-check -O2 -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow " # -mcmodel=medium
# useful for debugging... -ffpe-trap=overflow,zero -fbacktrace -fbounds-check
;;
g95|*/g95)
#
# g95 (free f95 compiler from http://www.g95.org)
#
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-O"
- fi
+ DEF_FFLAGS="-O"
;;
f90|*/f90)
case $UNAME_MS in
@@ -71,31 +61,19 @@
#
# AbSoft
#
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-W132 -s -O3 -cpu:p7 -v -YDEALLOC=ALL"
- fi
+ DEF_FFLAGS="-W132 -s -O3 -cpu:p7 -v -YDEALLOC=ALL"
;;
*:IRIX*)
################ SGI Irix #################
- if test x"$MPIFC" = x; then
- MPIFC=$FC
- if test x"$MPILIBS" = x; then
- MPILIBS="-lmpi -lfastm -lfpe"
- fi
- fi
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-ansi -u -64 -O3 -OPT:Olimit=0 -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -r10000 -mips4"
+ DEF_MPIFC=$FC
+ DEF_MPILIBS="-lmpi -lfastm -lfpe"
+ DEF_FFLAGS="-ansi -u -64 -O3 -OPT:Olimit=0 -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -r10000 -mips4"
# -check_bounds
- fi
;;
SX-*:SUPER-UX | ES:ESOS)
################## NEC SX ##################
- if test x"$MPIFC" = x; then
- MPIFC=$FC
- fi
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-C hopt -R2 -Wf\" -L nostdout noinclist mrgmsg noeject -msg b -pvctl loopcnt=14000000 expand=10 fullmsg vecthreshold=20 -s\" -pi auto line=100 exp=swap_all,rank"
- fi
+ DEF_MPIFC=$FC
+ DEF_FFLAGS="-C hopt -R2 -Wf\" -L nostdout noinclist mrgmsg noeject -msg b -pvctl loopcnt=14000000 expand=10 fullmsg vecthreshold=20 -s\" -pi auto line=100 exp=swap_all,rank"
;;
esac
;;
@@ -103,16 +81,12 @@
#
# Lahey f90
#
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="--warn --wo --tpp --f95 --dal -O"
+ DEF_FFLAGS="--warn --wo --tpp --f95 --dal -O"
# --chk
- fi
;;
######## IBM ######
mpxlf*|*/mpxlf*)
- if test x"$MPIFC" = x; then
- MPIFC=$FC
- fi
+ DEF_MPIFC=$FC
;;
*xlf*|*/*xlf*)
#
@@ -141,16 +115,14 @@
# one should also use additional flags:
# CFLAGS = -Wl,-relax
#
- if test x"$FLAGS_CHECK" = x; then
# deleted -qxflag=dvz because it requires handler function __xl_dzx and thus linking will fail
- FLAGS_CHECK="-O4 -qnostrict -qsimd=auto -qassert=contig -qhot -q64 -qtune=auto -qarch=auto -qcache=auto -qfree=f90 -qsuffix=f=f90 -qhalt=w -qlanglvl=2003std -g -qsuppress=1518-234 -qsuppress=1518-317 -qsuppress=1518-318 -qsuppress=1500-036 -Q -Q+rank,swap_all -Wl,-relax"
+ DEF_FFLAGS="-O4 -qnostrict -qsimd=auto -qassert=contig -qhot -q64 -qtune=auto -qarch=auto -qcache=auto -qfree=f90 -qsuffix=f=f90 -qhalt=w -qlanglvl=2003std -g -qsuppress=1518-234 -qsuppress=1518-317 -qsuppress=1518-318 -qsuppress=1500-036 -Q -Q+rank,swap_all -Wl,-relax"
# Options -qreport -qsource -qlist create a *.lst file containing detailed information about vectorization.
# On IBM BlueGene at IDRIS (France) use:
# -qtune=auto -qarch=450d -qsave instead of -qtune=auto -qarch=auto
#
# to debug with IBM xlf, one can add this: -g -O0 -C -qddim -qfullpath -qflttrap=overflow:zerodivide:invalid:enable -qfloat=nans -qinitauto=7FBFFFFF
#
- fi
;;
pathf90|*/pathf90)
#
@@ -160,9 +132,7 @@
# CC = pathcc
# CFLAGS = -O2
#
- if test x"$FLAGS_CHECK" = x; then
- FLAGS_CHECK="-O3 -OPT:Ofast -fno-math-errno -ffast-math -LNO:fusion=2 -LNO:simd=2 -LNO:simd_verbose=ON -msse3 -march=auto -fno-second-underscore -align64"
- fi
+ DEF_FFLAGS="-O3 -OPT:Ofast -fno-math-errno -ffast-math -LNO:fusion=2 -LNO:simd=2 -LNO:simd_verbose=ON -msse3 -march=auto -fno-second-underscore -align64"
;;
esac
@@ -177,6 +147,16 @@
;;
esac
+if test "x$FLAGS_CHECK" = "x"; then
+ FLAGS_CHECK="$DEF_FFLAGS"
+fi
+if test "x$MPIFC" = "x"; then
+ MPIFC="$DEF_MPIFC"
+ if test "x$MPILIBS" = "x"; then
+ MPILIBS="$DEF_MPILIBS"
+ fi
+fi
+
echo MPIFC=\"$MPIFC\" | sed 's/\$/\\\$/g'
echo MPILIBS=\"$MPILIBS\" | sed 's/\$/\\\$/g'
echo FLAGS_CHECK=\"$FLAGS_CHECK\" | sed 's/\$/\\\$/g'
More information about the CIG-COMMITS
mailing list