[cig-commits] r22930 - seismo/3D/SPECFEM3D_GLOBE/trunk

elliott.sales.de.andrade at geodynamics.org elliott.sales.de.andrade at geodynamics.org
Mon Oct 7 14:56:11 PDT 2013


Author: elliott.sales.de.andrade
Date: 2013-10-07 14:56:11 -0700 (Mon, 07 Oct 2013)
New Revision: 22930

Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/flags.guess
Log:
build: Make flags.guess smarter on Cray systems.

The 'ftn' compiler on Cray is really a wrapper around other compilers,
so you need to specify options as if using the underlying compiler.

I tested the compilers available on ARSC and they seemed to work, but I
just made an educated guess as to the correct checks for the Intel and
PathScale compilers.

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/flags.guess
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/flags.guess	2013-10-07 15:14:08 UTC (rev 22929)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/flags.guess	2013-10-07 21:56:11 UTC (rev 22930)
@@ -32,8 +32,40 @@
 ###########################################################################################################################
 ###########################################################################################################################
 
+# First find the "real" compiler
+# e.g., Cray provides a Programming Environment that wraps around compilers,
+# but the command-line options are still compiler-specific.
 case $FC in
-    ftn|*/ftn|crayftn|*/crayftn)
+    ftn|*/ftn)
+        case $PE_ENV in
+            CRAY)
+                my_FC=crayftn
+                ;;
+            GNU)
+                my_FC=gfortran
+                ;;
+            INTEL)
+                my_FC=ifort
+                ;;
+            PATHSCALE)
+                my_FC=pathf90
+                ;;
+            PGI)
+                my_FC=pgf90
+                ;;
+            *)
+                # Unrecognized (this will not set any default flags)
+                my_FC="$FC"
+                ;;
+        esac
+        ;;
+    *)
+        my_FC="$FC"
+        ;;
+esac
+
+case $my_FC in
+    crayftn|*/crayftn)
         #
         # Cray Fortran
         #



More information about the CIG-COMMITS mailing list