[cig-commits] r20195 - seismo/3D/SPECFEM3D/trunk

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sat May 19 19:25:15 PDT 2012


Author: dkomati1
Date: 2012-05-19 19:25:14 -0700 (Sat, 19 May 2012)
New Revision: 20195

Modified:
   seismo/3D/SPECFEM3D/trunk/flags.guess
Log:
better flags.guess


Modified: seismo/3D/SPECFEM3D/trunk/flags.guess
===================================================================
--- seismo/3D/SPECFEM3D/trunk/flags.guess	2012-05-20 02:15:19 UTC (rev 20194)
+++ seismo/3D/SPECFEM3D/trunk/flags.guess	2012-05-20 02:25:14 UTC (rev 20195)
@@ -2,6 +2,9 @@
 
 # Attempt to guess suitable flags for the Fortran compiler.
 
+# can add -DUSE_SERIAL_CASCADE_FOR_IOs to the compiler options to make the mesher output mesh data
+# to the disk for one MPI slice after the other, and to make the solver do the same thing when reading the files back from disk.
+
 # Use AC_CANONICAL_BUILD (and package config.guess, etc.) in the future?
 if test x"$UNAME_MS" = x; then
     UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
@@ -12,53 +15,74 @@
 case $FC in
     pgf90|*/pgf90)
         #
-        # Portland pgf90
+        # Beowulf Portland pgf90
         #
         if test x"$FLAGS_CHECK" = x; then
-            FLAGS_CHECK="-fast -Mnobounds -Mneginfo -Mdclchk -Knoieee" # -mcmodel=medium
+            FLAGS_CHECK="-fast -Mnobounds -Mdclchk -Knoieee" # -mcmodel=medium
         fi
         if test x"$FLAGS_NO_CHECK" = x; then
-            FLAGS_NO_CHECK="-fast -Mnobounds -Mneginfo -Mdclchk -Knoieee -Ktrap=none -Minline" # -mcmodel=medium
+            FLAGS_NO_CHECK="-fast -Mnobounds -Mdclchk -Knoieee -Ktrap=none -Minline" # -mcmodel=medium
         fi
         ;;
     ifort|*/ifort)
         #
-        # Intel ifort Fortran90
+        # Intel ifort Fortran90 for Linux
+        # check: http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/index.htm
         #
         if test x"$FLAGS_CHECK" = x; then
-            FLAGS_CHECK="-O3 -traceback -ftrapuv -ftz"
-            
-        # useful for debugging...
-            # for debugging: change -check nobounds to -check all -debug -g -O0 -fp-stack-check -traceback -ftrapuv
-
-            # ifort version 11 or 10.1 with these flags shows good performance
-            # -xSSE4.2 -ftz -funroll-loops -unroll5
-            #FLAGS_CHECK="-O3 -ftz -xS -traceback -ftrapuv -vec-report0 -std95 -implicitnone -check nobounds -static-intel -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage "
-            #FLAGS_CHECK="-O3 -xS -static-intel -r8 -mcmodel=large -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -check nobounds -align sequence -ftrapuv -ftz -traceback"
+            FLAGS_CHECK="-O3 -xSSE4.2 -ftz -funroll-loops -unroll5 -ftz -align sequence -vec-report0 -std95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage -check nobounds" # -mcmodel=medium
         fi
         if test x"$FLAGS_NO_CHECK" = x; then
-        # standard options (leave option -ftz, which is *critical* for performance)
-        # add -Winline to get information about routines that are inlined
-        # add -vec-report2 to get information about loops that are vectorized or not
-            FLAGS_NO_CHECK="-O3 -check nobounds -ftz"
-
+            FLAGS_NO_CHECK="-O3 -xSSE4.2 -ftz -funroll-loops -unroll5 -ftz -align sequence -vec-report0 -std95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage -check nobounds" # -mcmodel=medium
         fi
+        # useful for debugging...
+            # for debugging: change -check nobounds to -check all -debug -g -O0 -fp-stack-check -traceback -ftrapuv
+        #if test x"$FLAGS_CHECK" = x; then
+        #    # without -e95
+        #    FLAGS_CHECK="-O3 -check nobounds -ftz -traceback -ftrapuv -align sequence -vec-report0 -std95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage" # -mcmodel=medium
+        #fi
+        #if test x"$FLAGS_NO_CHECK" = x; then
+        #    # standard options (leave option -ftz, which is *critical* for performance)
+        #    FLAGS_NO_CHECK="-O3 -xP -ftz -align sequence -vec-report0 -std95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage" # -mcmodel=medium
+        #fi
+        #
+        # Intel Nehalem processor architecture, Intel compiler version 10.1
+        #if test x"$FLAGS_CHECK" = x; then
+        #    FLAGS_CHECK="-O2 -ftz -xT -static-intel -implicitnone"
+        #fi
+        #if test x"$FLAGS_NO_CHECK" = x; then
+        #    FLAGS_NO_CHECK="-O2 -ftz -xT -static-intel -implicitnone"
+        #fi
+        #
+        # Intel Nehalem processor architecture, Intel compiler version 11.1
+        #if test x"$FLAGS_CHECK" = x; then
+        #    FLAGS_CHECK="-O3 -xSSE4.2 -ftz -funroll-loops -unroll5"
+        #fi
+        #if test x"$FLAGS_NO_CHECK" = x; then
+        #    FLAGS_NO_CHECK="-O3 -xSSE4.2 -ftz -funroll-loops -unroll5"
+        #fi
+        #
+        #MPI_LIBS = -Vaxlib
         ;;
     gfortran|*/gfortran|f95|*/f95)
         #
         # GNU gfortran
         #
         if test x"$FLAGS_NO_CHECK" = x; then
-            # works with: GNU Fortran (GCC) 4.1.2 20080704        
-            FLAGS_NO_CHECK="-std=gnu -fimplicit-none -frange-check -O2 -pedantic -pedantic-errors -Waliasing -Wampersand -Wline-truncation -Wsurprising -Wunderflow"
-
-        #            FLAGS_NO_CHECK="-std=f95 -fimplicit-none -frange-check -O2 -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow" # -mcmodel=medium
-        # older gfortran syntax
-        #           FLAGS_NO_CHECK="-std=f95 -fimplicit-none -frange-check -O2 -Wunused-labels -Waliasing -Wampersand -Wsurprising -Wline-truncation -Wunderflow" # -mcmodel=medium
+            FLAGS_NO_CHECK="-std=gnu -fimplicit-none -frange-check -O2 -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow" # -mcmodel=medium
         fi
         if test x"$FLAGS_CHECK" = x; then
-            FLAGS_CHECK="\$(FLAGS_NO_CHECK)" # -fbounds-check
+            FLAGS_CHECK="\$(FLAGS_NO_CHECK)"
         fi
+        # useful for debugging... -ffpe-trap=underflow,overflow,zero -fbacktrace -fbounds-check
+        #
+        # older gfortran syntax
+        # note: -std=f95 can lead to problem: undefined reference to `system_'
+        #           FLAGS_NO_CHECK="-std=gnu -fimplicit-none -frange-check -O2 -Wunused-labels -Waliasing -Wampersand -Wsurprising -Wline-truncation -Wunderflow" # -mcmodel=medium -std=f95
+        #fi
+        #if test x"$FLAGS_CHECK" = x; then
+        #    FLAGS_CHECK="\$(FLAGS_NO_CHECK)" # -fbounds-check
+        #fi
         ;;
     g95|*/g95)
         #
@@ -149,6 +173,11 @@
         #
         # for the C compiler when using -q64 for the Fortran compiler
         #
+        # on IBM xlf90 compiler:
+        # when encountering errors: ...relocation truncated to fit: R_PPC_LOCAL24PC...
+        # one should also use additional flags:
+        # CFLAGS = -Wl,-relax
+        #
         if test x"$FLAGS_NO_CHECK" = x; then
 # deleted -qxflag=dvz because it requires handler function __xl_dzx and thus linking will fail 
             FLAGS_NO_CHECK="-O3 -qsave -qstrict -q64 -qtune=auto -qarch=auto -qcache=auto -qfree=f90 -qsuffix=f=f90 -qhalt=w -qlanglvl=90pure -qsuppress=1518-317 -Q -Q+rank,swap_all -Wl,-relax -qunroll=yes"
@@ -165,6 +194,22 @@
             FLAGS_CHECK="\$(FLAGS_NO_CHECK) -g -C -qddim -qfullpath"
         fi
         ;;
+    pathf90|*/pathf90)
+        #
+        # pathscale
+        #
+        # one should also set
+        # 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
+        if test x"$FLAGS_NO_CHECK" = x; then
+            FLAGS_NO_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
+        ;;
+
 esac
 
 case $UNAME_MS in
@@ -183,4 +228,14 @@
 echo FLAGS_NO_CHECK=\"$FLAGS_NO_CHECK\" | sed 's/\$/\\\$/g'
 echo FCENV=\"$FCENV\" | sed 's/\$/\\\$/g'
 
+# Added by IDRIS: set to default values if not passed as arguments
+if [ "X${AR}" == "X" ]; then AR="ar"; fi
+if [ "X${RANLIB}" == "X" ]; then RANLIB="ranlib"; fi
+if [ "X${ARFLAGS}" == "X" ]; then ARFLAGS="cru"; fi
+
+# Added by IDRIS to crosscompile on BlueGene/P
+echo AR=\"$AR\" | sed 's/\$/\\\$/g'
+echo ARFLAGS=\"$ARFLAGS\" | sed 's/\$/\\\$/g'
+echo RANLIB=\"$RANLIB\" | sed 's/\$/\\\$/g'
+
 # end of file



More information about the CIG-COMMITS mailing list