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

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Tue Aug 5 06:15:26 PDT 2008


Author: dkomati1
Date: 2008-08-05 06:15:26 -0700 (Tue, 05 Aug 2008)
New Revision: 12525

Modified:
   seismo/3D/SPECFEM3D/trunk/flags.guess
Log:
copied flags.guess from SPECFEM3D_GLOBE because the one we had here was obsolete


Modified: seismo/3D/SPECFEM3D/trunk/flags.guess
===================================================================
--- seismo/3D/SPECFEM3D/trunk/flags.guess	2008-08-05 13:14:21 UTC (rev 12524)
+++ seismo/3D/SPECFEM3D/trunk/flags.guess	2008-08-05 13:15:26 UTC (rev 12525)
@@ -9,101 +9,75 @@
     UNAME_MS="${UNAME_MACHINE}:${UNAME_SYSTEM}"
 fi
 
-case $UNAME_MS in
-    i*86:Linux | x86_64:Linux)
-        ################ PC Linux #################
-        case $FC in
-            pgf90|*/pgf90)
+case $FC in
+    pgf90|*/pgf90)
+        #
+        # Beowulf Portland pgf90
+        #
+        if test x"$FLAGS_CHECK" = x; then
+            FLAGS_CHECK="-fast -Mnobounds -Mneginfo -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
+        fi
+        ;;
+    ifort|*/ifort)
+        #
+        # Intel ifort Fortran90 for Linux
+        #
+        if test x"$FLAGS_CHECK" = x; then
+            FLAGS_CHECK="-O3 -diag-disable vec -xP -e95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check nobounds -align sequence -assume byterecl -ftrapuv -fpe0 -no-ftz -traceback" # -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 -diag-disable vec -e95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check nobounds -align sequence -assume byterecl -fpe3 -ftz" # -mcmodel=medium
+            # Pangu at Caltech
+            #FLAGS_NO_CHECK = $(IFORT_PROF) -O3 -static -ip -xP -diag-disable vec -Wl,--allow-multiple-definition -fpe3 -ftz -L $$IFORT_ROOT/lib -limf -lirc
+            # debug with range checking
+            #FLAGS_NO_CHECK = -O0 -static -e95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check all
+        fi
+        #MPI_LIBS = -Vaxlib
+        ;;
+    gfortran|*/gfortran|f95|*/f95)
+        #
+        # GNU gfortran
+        #
+        if test x"$FLAGS_NO_CHECK" = x; then
+            FLAGS_NO_CHECK="-std=gnu -fimplicit-none -frange-check -O3 -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow -fno-trapping-math" # -mcmodel=medium
+# older gfortran syntax
+#           FLAGS_NO_CHECK="-std=gnu -fimplicit-none -frange-check -O3 -Wunused-labels -Waliasing -Wampersand -Wsurprising -Wline-truncation -Wunderflow -fno-trapping-math" # -mcmodel=medium
+        fi
+        if test x"$FLAGS_CHECK" = x; then
+            FLAGS_CHECK="\$(FLAGS_NO_CHECK)" # -fbounds-check
+        fi
+        ;;
+    g95|*/g95)
+        #
+        # g95 (free f95 compiler from http://www.g95.org)
+        #
+        if test x"$FLAGS_CHECK" = x; then
+            FLAGS_CHECK="-O"
+        fi
+        if test x"$FLAGS_NO_CHECK" = x; then
+            FLAGS_NO_CHECK="-O"
+        fi
+        ;;
+    f90|*/f90)
+        case $UNAME_MS in
+            i*86:Linux | x86_64:Linux)
+                ################ PC Linux #################
                 #
-                # Beowulf Portland pgf90
-                #
-                if test x"$FLAGS_CHECK" = x; then
-                    FLAGS_CHECK="-fast -Mnobounds -Mneginfo -Mdclchk -Knoieee"
-                fi
-                if test x"$FLAGS_NO_CHECK" = x; then
-                    FLAGS_NO_CHECK="-fast -Mnobounds -Mneginfo -Mdclchk -Knoieee -Minline"
-                fi
-                ;;
-            ifort|*/ifort)
-                #
-                # Intel ifort Fortran90 for Linux
-                #
-                if test x"$FLAGS_CHECK" = x; then
-                    FLAGS_CHECK="\$(FLAGS_NO_CHECK)"
-                fi
-                if test x"$FLAGS_NO_CHECK" = x; then
-                    # standard options
-                    FLAGS_NO_CHECK="-O3 -e95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check nobounds -assume byterecl"
-                    # Pangu at Caltech
-                    #FLAGS_NO_CHECK = -O3 -static -ip -xP -Wl,--allow-multiple-definition -tpp7 -implicitnone -std95 -e95 -warn truncated_source -warn argument_checking -warn unused -warn declarations -check nobounds -assume byterecl
-                    # debug with range checking
-                    #FLAGS_NO_CHECK = -O3 -implicitnone -std95 -e95 -warn truncated_source -warn argument_checking -warn unused -warn declarations -check bounds
-                fi
-                #MPI_LIBS = -Vaxlib
-                ;;
-            gfortran|*/gfortran)
-                #
-                # GNU gfortran
-                #
-                if test x"$FLAGS_NO_CHECK" = x; then
-                    FLAGS_NO_CHECK="-std=gnu -fimplicit-none -frange-check -O3 -Wunused-labels -Waliasing -Wampersand -Wsurprising -Wline-truncation -Wunderflow"
-                fi
-                if test x"$FLAGS_CHECK" = x; then
-##############                    FLAGS_CHECK="\$(FLAGS_NO_CHECK) -fbounds-check"
-                    FLAGS_CHECK="\$(FLAGS_NO_CHECK)"
-                fi
-                ;;
-            f95|*/f95)
-                #
-                # GNU gfortran
-                #
-                if test x"$FLAGS_NO_CHECK" = x; then
-                    FLAGS_NO_CHECK="-std=gnu -fimplicit-none -frange-check -O3 -Wunused-labels -Waliasing -Wampersand -Wsurprising -Wline-truncation -Wunderflow"
-                fi
-                if test x"$FLAGS_CHECK" = x; then
-##############                    FLAGS_CHECK="\$(FLAGS_NO_CHECK) -fbounds-check"
-                    FLAGS_CHECK="\$(FLAGS_NO_CHECK)"
-                fi
-                ;;
-            g95|*/g95)
-                #
-                # g95 (free f95 compiler from http://www.g95.org)
-                #
-                if test x"$FLAGS_CHECK" = x; then
-                    FLAGS_CHECK="-O"
-                fi
-                if test x"$FLAGS_NO_CHECK" = x; then
-                    FLAGS_NO_CHECK="-O"
-                fi
-                ;;
-            f90|*/f90)
-                #
                 # AbSoft
                 #
                 if test x"$FLAGS_CHECK" = x; then
-                    FLAGS_CHECK="-W132 -s -O2 -cpu:p7 -v -YDEALLOC=ALL"
+                    FLAGS_CHECK="-W132 -s -O3 -cpu:p7 -v -YDEALLOC=ALL"
                 fi
                 if test x"$FLAGS_NO_CHECK" = x; then
                     FLAGS_NO_CHECK="\$(FLAGS_CHECK)"
                 fi
                 ;;
-            lf95|*/lf95)
-                #
-                # Lahey f90
-                #
-                if test x"$FLAGS_CHECK" = x; then
-                    FLAGS_CHECK="--warn --wo --tpp --f95 --dal -O --chk"
-                fi
-                if test x"$FLAGS_NO_CHECK" = x; then
-                    FLAGS_NO_CHECK="--warn --wo --tpp --f95 --dal -O"
-                fi
-                ;;
-        esac
-        ;;
-    *:IRIX*)
-        ################ SGI Irix #################
-        case $FC in
-            f90|*/f90)
+            *:IRIX*)
+                ################ SGI Irix #################
                 if test x"$MPIFC" = x; then
                     MPIFC=$FC
                     if test x"$MPILIBS" = x; then
@@ -117,16 +91,8 @@
                     FLAGS_NO_CHECK="-ansi -u -64 -O3 -OPT:Olimit=0 -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -r10000 -mips4"
                 fi
                 ;;
-        esac
-        ##
-        ##  CAUTION: always define setenv TRAP_FPE OFF on SGI before compiling
-        ##
-        FCENV="TRAP_FPE=OFF"
-        ;;
-    alpha:OSF1)
-        ################## Compaq Dec Alpha #################
-        case $FC in
-            f90|*/f90)
+            alpha:OSF1)
+                ################## Compaq Dec Alpha #################
                 if test x"$MPIFC" = x; then
                     MPIFC=$FC
                     if test x"$MPILIBS" = x; then
@@ -140,17 +106,13 @@
                     FLAGS_NO_CHECK="-fast -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check nounderflow"
                 fi
                 ;;
-        esac
-        ;;
-    SX-*:SUPER-UX | ES:ESOS)
-        ################## Earth Simulator and NEC SX-5 ##################
-        case $FC in
-            f90|*/f90)
+            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=5000000 expand=6 fullmsg vecthreshold=20 -s\" -pi auto line=100 exp=swap_all,rank"
+                    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
                 if test x"$FLAGS_NO_CHECK" = x; then
                     FLAGS_NO_CHECK="\$(FLAGS_CHECK)"
@@ -158,35 +120,62 @@
                 ;;
         esac
         ;;
-    *:AIX)
-        ######## IBM ######
-        case $FC in
-            mpxlf*|*/mpxlf*)
-                if test x"$MPIFC" = x; then
-                    MPIFC=$FC
-                fi
-                ;;
-        esac
-        case $FC in
-            *xlf*|*/*xlf*)
-                #
-                # do NOT remove option -qsave otherwise the IBM compiler allocates the
-                # arrays in the stack and the code crashes if the stack size is too
-                # small (which is often the case)
-                #
-                if test x"$FLAGS_CHECK" = x; then
-                    FLAGS_CHECK="-O3 -qsave -qnostrict -qarch=auto -qtune=auto -qcache=auto -qfree=f90 -Q -qsuffix=f=f90 -qhalt=w"
-                # on MareNostrum at the Barcelona SuperComputing Center (Spain) use
-                # -qtune=ppc970 -qarch=ppc64v instead of -qarch=auto -qtune=auto
-                fi
-                if test x"$FLAGS_NO_CHECK" = x; then
-                    FLAGS_NO_CHECK="\$(FLAGS_CHECK)"
-                fi
-                ;;
-        esac
+    lf95|*/lf95)
+        #
+        # Lahey f90
+        #
+        if test x"$FLAGS_CHECK" = x; then
+            FLAGS_CHECK="--warn --wo --tpp --f95 --dal -O --chk"
+        fi
+        if test x"$FLAGS_NO_CHECK" = x; then
+            FLAGS_NO_CHECK="--warn --wo --tpp --f95 --dal -O"
+        fi
         ;;
+    ######## IBM ######
+    mpxlf*|*/mpxlf*)
+        if test x"$MPIFC" = x; then
+            MPIFC=$FC
+        fi
+        ;;
+    *xlf*|*/*xlf*)
+        #
+        # do NOT remove option -qsave otherwise the IBM compiler allocates the
+        # arrays in the stack and the code crashes if the stack size is too
+        # small (which is often the case)
+        #
+        # on IBM with xlf one should also set
+        #
+        # CC = xlc_r
+        # CFLAGS = -O3 -q64
+        #
+        # or
+        #
+        # CC = gcc
+        # CFLAGS = -O3 -m64
+        #
+        # for the C compiler when using -q64 for the Fortran compiler
+        #
+        if test x"$FLAGS_NO_CHECK" = x; then
+            FLAGS_NO_CHECK="-O3 -qsave -qstrict -q64 -qtune=auto -qarch=auto -qcache=auto -qfree=f90 -Q -qsuffix=f=f90 -qhalt=w -qlanglvl=2003pure -qflttrap=overflow:zerodivide:invalid:enable -qsigtrap -qinitauto=7FBFFFFF"
+        # on MareNostrum at the Barcelona SuperComputing Center (Spain) use
+        # -qtune=ppc970 -qarch=ppc64v instead of -qtune=auto -qarch=auto
+        fi
+        if test x"$FLAGS_CHECK" = x; then
+            FLAGS_CHECK="\$(FLAGS_NO_CHECK) -C -qddim -qfloat=nans -qfullpath"
+        fi
+        ;;
 esac
 
+case $UNAME_MS in
+    *:IRIX*)
+        ################ SGI Irix #################
+        ##
+        ##  CAUTION: always define setenv TRAP_FPE OFF on SGI before compiling
+        ##
+        FCENV="TRAP_FPE=OFF"
+        ;;
+esac
+
 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