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

elliott.sales.de.andrade at geodynamics.org elliott.sales.de.andrade at geodynamics.org
Tue Jun 25 19:00:25 PDT 2013


Author: elliott.sales.de.andrade
Date: 2013-06-25 19:00:24 -0700 (Tue, 25 Jun 2013)
New Revision: 22424

Modified:
   seismo/3D/SPECFEM3D/trunk/flags.guess
Log:
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/trunk/flags.guess
===================================================================
--- seismo/3D/SPECFEM3D/trunk/flags.guess	2013-06-25 23:09:02 UTC (rev 22423)
+++ seismo/3D/SPECFEM3D/trunk/flags.guess	2013-06-26 02:00:24 UTC (rev 22424)
@@ -5,8 +5,40 @@
 # 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.
 
+# 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