[cig-commits] r18715 - in seismo/3D/FAULT_SOURCE/branches/new_fault_db: . DATA START_UP decompose_mesh_SCOTCH

percygalvez at geodynamics.org percygalvez at geodynamics.org
Fri Jul 8 06:11:43 PDT 2011


Author: percygalvez
Date: 2011-07-08 06:11:42 -0700 (Fri, 08 Jul 2011)
New Revision: 18715

Added:
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/DATA/Par_file.in
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/START_UP/flags.guess
Modified:
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/README_SPECFEM3D_FAULT
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/fault_scotch.f90
Log:
Adding files for ./configure and decompose_mesh_MESH

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/DATA/Par_file.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/DATA/Par_file.in	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/DATA/Par_file.in	2011-07-08 13:11:42 UTC (rev 18715)
@@ -0,0 +1,53 @@
+
+# forward or adjoint simulation
+SIMULATION_TYPE                 = 1   # 1 = forward, 2 = adjoint, 3 = both simultaneously
+SAVE_FORWARD                    = .false.
+
+# UTM projection parameters
+UTM_PROJECTION_ZONE             = 11
+SUPPRESS_UTM_PROJECTION         = .true.
+
+# number of MPI processors 
+NPROC                           = 100 
+
+# time step parameters
+NSTEP                           = 62000
+DT                              = 0.00325d0
+
+# parameters describing the model
+OCEANS                          = .false.
+ATTENUATION                     = .false.
+USE_OLSEN_ATTENUATION           = .false.
+ANISOTROPY                      = .false.
+
+# absorbing boundary conditions for a regional simulation
+ABSORBING_CONDITIONS            = .true.
+ABSORB_FREE_SURFACE             = .false.
+# save AVS or OpenDX movies
+MOVIE_SURFACE                   = .true.
+MOVIE_VOLUME                    = .false.
+NTSTEP_BETWEEN_FRAMES           = 16500
+CREATE_SHAKEMAP                 = .false.
+SAVE_DISPLACEMENT               = .true.
+USE_HIGHRES_FOR_MOVIES          = .false.
+HDUR_MOVIE                      = 0.0
+
+# save AVS or OpenDX mesh files to check the mesh
+SAVE_MESH_FILES                 = .false.
+
+# path to store the local database file on each node
+LOCAL_PATH                      = /cluster/work/erdw/gpercy 
+
+# interval at which we output time step info and max of norm of displacement
+NTSTEP_BETWEEN_OUTPUT_INFO      = 500
+
+# interval in time steps for writing of seismograms
+NTSTEP_BETWEEN_OUTPUT_SEISMOS   = 10000
+
+# print source time function
+PRINT_SOURCE_TIME_FUNCTION      = .false.
+
+## Here defined tags that will be taken for faults.
+## which friction laws .
+
+

Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/README_SPECFEM3D_FAULT
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/README_SPECFEM3D_FAULT	2011-07-08 09:06:10 UTC (rev 18714)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/README_SPECFEM3D_FAULT	2011-07-08 13:11:42 UTC (rev 18715)
@@ -79,7 +79,13 @@
 II. RUNNING A SIMULATION
 -------------------------
 
-1. Create a mesh with CUBIT: 
+1. Copy the input files to the work directory:
+
+	>> cd ~/SPECFEM3D
+     	>> cp -r EXAMPLES/splay_faults/DATA  ./
+
+
+2. Create a mesh with CUBIT: 
   (If you have not installed CUBIT yet skip this step and use the mesh files included 
   with the examples.)
 
@@ -100,7 +106,7 @@
   The CUBIT graphics window should show the mesh (e.g. EXAMPLES/splay_faults/splay_faults.jpg)
 
 
-2. Partition the mesh with the domain decomposition software SCOTCH.
+3. Partition the mesh with the domain decomposition software SCOTCH.
 
 	>> cd ~/SPECFEM3D/decompose_mesh_SCOTH
 	>> ./xdecompose_mesh_SCOTCH 'nproc' ../CUBIT/MESH/ ../DATABASES_MPI/ 
@@ -113,12 +119,6 @@
   and specify the path accordingly when executing xdecompose_mesh_SCOTCH.
 
 
-3. Copy the input files to the work directory:
-
-	>> cd ~/SPECFEM3D
-     	>> cp -r EXAMPLES/splay_faults/DATA  ./
-
-
 4. Edit the file DATA/Par_file: 
 
    	LOCAL_PATH = should be the path to DATABASES_MPI

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/START_UP/flags.guess
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/START_UP/flags.guess	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/START_UP/flags.guess	2011-07-08 13:11:42 UTC (rev 18715)
@@ -0,0 +1,178 @@
+#!/bin/sh
+
+# Attempt to guess suitable flags for the Fortran compiler.
+
+# 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
+    UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+    UNAME_MS="${UNAME_MACHINE}:${UNAME_SYSTEM}"
+fi
+
+case $FC in
+    pgf90|*/pgf90)
+        #
+        # 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
+        #
+        if test x"$FLAGS_CHECK" = x; then
+            #FLAGS_CHECK="-O3 -vec-report0 -e95 -std95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage -check nobounds -align sequence -assume byterecl -fpe0 -ftz -traceback -ftrapuv" # -mcmodel=medium
+
+            # ifort v 10.1 with these flags shows best performance (NOTE : for non-dual intel processors -xT should be switch to -xW)
+            FLAGS_CHECK="-O2 -ftz -xW -fpe0 -ftz -traceback -ftrapuv -vec-report0 -std95 -implicitnone -check nobounds  -assume byterecl  -static-intel -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage "
+            #FLAGS_CHECK="-O2 -xT -static-intel -r8 -mcmodel=large -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -check nobounds -align sequence -assume byterecl -ftrapuv -fpe0 -ftz -traceback"
+        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-report3 to get information about loops that are vectorized or not
+            #FLAGS_NO_CHECK="-O3 -xP -vec-report0 -e95 -std95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage -check nobounds -align sequence -assume byterecl -fpe3 -ftz" # -mcmodel=medium
+
+            # ifort v 10.1 with these flags shows best performance
+            FLAGS_NO_CHECK="-O2 -ftz -xW -fpe3 -ftz -vec-report0 -std95 -implicitnone -check nobounds  -assume byterecl  -static-intel -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage "
+            #FLAGS_NO_CHECK="-O2 -xT -static-intel -r8 -mcmodel=large -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -check nobounds -align sequence -assume byterecl -ftrapuv -fpe0 -ftz -traceback"
+        fi
+        ;;
+    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 -O3 -pedantic -pedantic-errors -Waliasing -Wampersand -Wline-truncation -Wsurprising -Wunderflow -fno-trapping-math"
+
+        #            FLAGS_NO_CHECK="-std=f95 -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=f95 -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 #################
+                #
+                # AbSoft
+                #
+                if test x"$FLAGS_CHECK" = x; then
+                    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
+                ;;
+            *: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="\$(FLAGS_NO_CHECK) -check_bounds"
+                fi
+                if test x"$FLAGS_NO_CHECK" = x; then
+                    FLAGS_NO_CHECK="-ansi -u -64 -O3 -OPT:Olimit=0 -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -r10000 -mips4"
+                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
+                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 -qsuffix=f=f90 -qhalt=w -qlanglvl=2003pure -qflttrap=overflow:zerodivide:invalid:enable -qsigtrap -qinitauto=7FBFFFFF -Q -Q+rank,swap_all"
+        # 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'
+echo FLAGS_NO_CHECK=\"$FLAGS_NO_CHECK\" | sed 's/\$/\\\$/g'
+echo FCENV=\"$FCENV\" | sed 's/\$/\\\$/g'
+
+# end of file

Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/fault_scotch.f90
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/fault_scotch.f90	2011-07-08 09:06:10 UTC (rev 18714)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/decompose_mesh_SCOTCH/fault_scotch.f90	2011-07-08 13:11:42 UTC (rev 18715)
@@ -29,12 +29,12 @@
   character(len=256),intent(in) :: localpath_name    
   integer :: nbfaults, iflt, ier 
 
-  open(101,file='../DATA/FAULT/Par_file_faults.in',status='old',action='read',iostat=ier)
+  open(101,file='../DATA/FAULT/Par_file_faults',status='old',action='read',iostat=ier)
   if (ier==0) then 
     read(101,*) nbfaults
   else
     nbfaults = 0
-    print *, 'Par_file.in not found: assume no faults'
+    print *, 'Par_file_faults not found: assume no faults'
   endif
   close(101)
 
@@ -88,11 +88,9 @@
  ! Note: element ids start at 1, not 0. Check that in cubit2specfem3d.py
   do e=1,f%nspec
     read(101,*) f%ispec1(e),f%inodes1(:,e)
-!      print*, f%ispec1(e),f%inodes1(:,e) !TEST
   enddo
   do e=1,f%nspec
     read(101,*) f%ispec2(e),f%inodes2(:,e)
-!      print*, f%ispec2(e),f%inodes2(:,e) !TEST
   enddo
  ! If we ever figure out how to export "ifaces" from CUBIT:
   !allocate(f%iface1(f%nspec))



More information about the CIG-COMMITS mailing list