[cig-commits] r12515 - in seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta: . DATA setup src

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sun Aug 3 14:51:34 PDT 2008


Author: dkomati1
Date: 2008-08-03 14:51:34 -0700 (Sun, 03 Aug 2008)
New Revision: 12515

Added:
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_ori_v2
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/get_jacobian_discontinuities.f90
Removed:
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/ori_Par_file
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/mpif.h
Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_1second_Ranger_elastic
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_5seconds_Earth_Simulator_elastic
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/Makefile
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/allocate_after_1.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/allocate_after_2.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/meshfem3D.f90
Log:
fixed a few details in version41_beta from two months ago to make it work (a few small things were broken)


Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file	2008-08-03 21:51:34 UTC (rev 12515)
@@ -4,23 +4,23 @@
 SAVE_FORWARD                    = .false.  # save last frame of forward simulation or not
 
 # number of chunks (1,2,3 or 6)
-NCHUNKS                         = 6
+NCHUNKS                         = 1
 
 # angular width of the first chunk (not used if full sphere with six chunks)
 ANGULAR_WIDTH_XI_IN_DEGREES   = 90.d0      # angular size of a chunk
 ANGULAR_WIDTH_ETA_IN_DEGREES  = 90.d0
-CENTER_LATITUDE_IN_DEGREES    = 40.d0
-CENTER_LONGITUDE_IN_DEGREES   = 10.d0
-GAMMA_ROTATION_AZIMUTH        = 20.d0
+CENTER_LATITUDE_IN_DEGREES    = 90.d0
+CENTER_LONGITUDE_IN_DEGREES   =  0.d0
+GAMMA_ROTATION_AZIMUTH        =  0.d0
 
 # number of elements at the surface along the two sides of the first chunk
 # (must be multiple of 16 and 8 * multiple of NPROC below)
-NEX_XI                          = 864 # 144 288 432 576 720 864 1008 1152 1296 1440
-NEX_ETA                         = 864
+NEX_XI                          = 64 # 144 288 432 576 720 864 1008 1152 1296 1440
+NEX_ETA                         = 64
 
 # number of MPI processors along the two sides of the first chunk
-NPROC_XI                        = 18
-NPROC_ETA                       = 18
+NPROC_XI                        = 2
+NPROC_ETA                       = 2
 
 # 1D models with real structure:
 # 1D_isotropic_prem, 1D_transversely_isotropic_prem, 1D_iasp91, 1D_1066a, 1D_ak135, 1D_ref, 1D_ref_iso, 1D_jp3d,1D_sea99

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_1second_Ranger_elastic
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_1second_Ranger_elastic	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_1second_Ranger_elastic	2008-08-03 21:51:34 UTC (rev 12515)
@@ -9,9 +9,9 @@
 # angular width of the first chunk (not used if full sphere with six chunks)
 ANGULAR_WIDTH_XI_IN_DEGREES   = 90.d0      # angular size of a chunk
 ANGULAR_WIDTH_ETA_IN_DEGREES  = 90.d0
-CENTER_LATITUDE_IN_DEGREES    = 40.d0
-CENTER_LONGITUDE_IN_DEGREES   = 10.d0
-GAMMA_ROTATION_AZIMUTH        = 20.d0
+CENTER_LATITUDE_IN_DEGREES    = 90.d0
+CENTER_LONGITUDE_IN_DEGREES   =  0.d0
+GAMMA_ROTATION_AZIMUTH        =  0.d0
 
 # number of elements at the surface along the two sides of the first chunk
 # (must be multiple of 16 and 8 * multiple of NPROC below)

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_5seconds_Earth_Simulator_elastic
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_5seconds_Earth_Simulator_elastic	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_5seconds_Earth_Simulator_elastic	2008-08-03 21:51:34 UTC (rev 12515)
@@ -9,9 +9,9 @@
 # angular width of the first chunk (not used if full sphere with six chunks)
 ANGULAR_WIDTH_XI_IN_DEGREES   = 90.d0      # angular size of a chunk
 ANGULAR_WIDTH_ETA_IN_DEGREES  = 90.d0
-CENTER_LATITUDE_IN_DEGREES    = 40.d0
-CENTER_LONGITUDE_IN_DEGREES   = 10.d0
-GAMMA_ROTATION_AZIMUTH        = 20.d0
+CENTER_LATITUDE_IN_DEGREES    = 90.d0
+CENTER_LONGITUDE_IN_DEGREES   =  0.d0
+GAMMA_ROTATION_AZIMUTH        =  0.d0
 
 # number of elements at the surface along the two sides of the first chunk
 # (must be multiple of 16 and 8 * multiple of NPROC below)

Copied: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_ori_v2 (from rev 12513, seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/ori_Par_file)
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_ori_v2	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/Par_file_ori_v2	2008-08-03 21:51:34 UTC (rev 12515)
@@ -0,0 +1,112 @@
+
+# forward or adjoint simulation
+SIMULATION_TYPE                 = 1
+SAVE_FORWARD                    = .false.  # save last frame of forward simulation or not
+
+# number of chunks (1,2,3 or 6)
+NCHUNKS                         = 6
+
+# angular width of the first chunk (not used if full sphere with six chunks)
+ANGULAR_WIDTH_XI_IN_DEGREES   = 90.d0      # angular size of a chunk
+ANGULAR_WIDTH_ETA_IN_DEGREES  = 90.d0
+CENTER_LATITUDE_IN_DEGREES    = 40.d0
+CENTER_LONGITUDE_IN_DEGREES   = 10.d0
+GAMMA_ROTATION_AZIMUTH        = 20.d0
+
+# number of elements at the surface along the two sides of the first chunk
+# (must be multiple of 16 and 8 * multiple of NPROC below)
+NEX_XI                          = 64 # 96 
+NEX_ETA                         = 64 # 96
+
+# number of MPI processors along the two sides of the first chunk
+NPROC_XI                        = 4
+NPROC_ETA                       = 4
+
+# 1D models with real structure:
+# 1D_isotropic_prem, 1D_transversely_isotropic_prem, 1D_iasp91, 1D_1066a, 1D_ak135, 1D_ref, 1D_ref_iso, 1D_jp3d,1D_sea99
+#
+# 1D models with only one fictitious averaged crustal layer:
+# 1D_isotropic_prem_onecrust, 1D_transversely_isotropic_prem_onecrust, 1D_iasp91_onecrust, 1D_1066a_onecrust, 1D_ak135_onecrust
+#
+# fully 3D models:
+# transversely_isotropic_prem_plus_3D_crust_2.0, 3D_anisotropic, 3D_attenuation,
+# s20rts, s362ani, s362iso, s362wmani, s362ani_prem, s29ea, s29ea,sea99_jp3d1994,sea99,jp3d1994
+MODEL                           = 1D_isotropic_prem
+
+# parameters describing the Earth model
+OCEANS                          = .false.
+ELLIPTICITY                     = .false.
+TOPOGRAPHY                      = .false.
+GRAVITY                         = .false.
+ROTATION                        = .false.
+ATTENUATION                     = .false.
+
+# absorbing boundary conditions for a regional simulation
+ABSORBING_CONDITIONS            = .false.
+
+# record length in minutes
+RECORD_LENGTH_IN_MINUTES        = 30.0d0
+
+# save AVS or OpenDX movies
+MOVIE_SURFACE                   = .false.
+MOVIE_VOLUME                    = .false.
+NTSTEP_BETWEEN_FRAMES           = 100
+HDUR_MOVIE                      = 0.d0
+
+# save movie in volume.  Will save element if center of element is in prescribed volume
+# top/bottom: depth in KM, use MOVIE_TOP = -100 to make sure the surface is stored.
+# west/east: longitude, degrees East [-180/180] top/bottom: latitute, degrees North [-90/90]
+# start/stop: frames will be stored at MOVIE_START + i*NSTEP_BETWEEN_FRAMES, where i=(0,1,2..) and iNSTEP_BETWEEN_FRAMES <= MOVIE_STOP
+# movie_volume_type: 1=strain, 2=time integral of strain, 3=\mu*time integral of strain
+# type 4 saves the trace and deviatoric stress in the whole volume, 5=displacement, 6=velocity
+#MOVIE_COARSE saves movie only at corners of elements
+MOVIE_VOLUME_TYPE               = 2
+MOVIE_COARSE                    = .true.
+MOVIE_TOP_KM                    = -100.0
+MOVIE_BOTTOM_KM                 = 1000.0
+MOVIE_WEST_DEG                  = -90.0
+MOVIE_EAST_DEG                  = 90.0
+MOVIE_NORTH_DEG                 = 90.0
+MOVIE_SOUTH_DEG                 = -90.0
+MOVIE_START                     = 0
+MOVIE_STOP                      = 40000
+
+# save mesh files to check the mesh
+SAVE_MESH_FILES                 = .false.
+
+# restart files (number of runs can be 1, 2 or 3, choose 1 for no restart files)
+NUMBER_OF_RUNS                  = 1
+NUMBER_OF_THIS_RUN              = 1
+
+# path to store the local database files on each node
+LOCAL_PATH                      = not_used_any_more_ignored
+
+# interval at which we output time step info and max of norm of displacement
+NTSTEP_BETWEEN_OUTPUT_INFO      = 1000
+
+# interval in time steps for temporary writing of seismograms
+NTSTEP_BETWEEN_OUTPUT_SEISMOS   = 5000000
+NTSTEP_BETWEEN_READ_ADJSRC      = 1000
+
+# output format for the seismograms (one can use either or all of the three formats)
+OUTPUT_SEISMOS_ASCII_TEXT       = .true.
+OUTPUT_SEISMOS_SAC_ALPHANUM     = .false.
+OUTPUT_SEISMOS_SAC_BINARY       = .false.
+
+# rotate seismograms to Radial-Transverse-Z or use default North-East-Z reference frame
+ROTATE_SEISMOGRAMS_RT           = .false.
+
+# decide if master process writes all the seismograms or if all processes do it in parallel
+WRITE_SEISMOGRAMS_BY_MASTER     = .true.
+
+# save all seismograms in one large combined file instead of one file per seismogram
+# to avoid overloading shared non-local file systems such as GPFS for instance
+SAVE_ALL_SEISMOS_IN_ONE_FILE    = .false.
+USE_BINARY_FOR_LARGE_FILE       = .false.
+
+# flag to impose receivers at the surface or allow them to be buried
+RECEIVERS_CAN_BE_BURIED         = .true.
+
+# print source time function
+PRINT_SOURCE_TIME_FUNCTION      = .false.
+

Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/ori_Par_file
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/ori_Par_file	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/DATA/ori_Par_file	2008-08-03 21:51:34 UTC (rev 12515)
@@ -1,112 +0,0 @@
-
-# forward or adjoint simulation
-SIMULATION_TYPE                 = 1
-SAVE_FORWARD                    = .false.  # save last frame of forward simulation or not
-
-# number of chunks (1,2,3 or 6)
-NCHUNKS                         = 6
-
-# angular width of the first chunk (not used if full sphere with six chunks)
-ANGULAR_WIDTH_XI_IN_DEGREES   = 90.d0      # angular size of a chunk
-ANGULAR_WIDTH_ETA_IN_DEGREES  = 90.d0
-CENTER_LATITUDE_IN_DEGREES    = 40.d0
-CENTER_LONGITUDE_IN_DEGREES   = 10.d0
-GAMMA_ROTATION_AZIMUTH        = 20.d0
-
-# number of elements at the surface along the two sides of the first chunk
-# (must be multiple of 16 and 8 * multiple of NPROC below)
-NEX_XI                          = 64 # 96 
-NEX_ETA                         = 64 # 96
-
-# number of MPI processors along the two sides of the first chunk
-NPROC_XI                        = 4
-NPROC_ETA                       = 4
-
-# 1D models with real structure:
-# 1D_isotropic_prem, 1D_transversely_isotropic_prem, 1D_iasp91, 1D_1066a, 1D_ak135, 1D_ref, 1D_ref_iso, 1D_jp3d,1D_sea99
-#
-# 1D models with only one fictitious averaged crustal layer:
-# 1D_isotropic_prem_onecrust, 1D_transversely_isotropic_prem_onecrust, 1D_iasp91_onecrust, 1D_1066a_onecrust, 1D_ak135_onecrust
-#
-# fully 3D models:
-# transversely_isotropic_prem_plus_3D_crust_2.0, 3D_anisotropic, 3D_attenuation,
-# s20rts, s362ani, s362iso, s362wmani, s362ani_prem, s29ea, s29ea,sea99_jp3d1994,sea99,jp3d1994
-MODEL                           = 1D_isotropic_prem
-
-# parameters describing the Earth model
-OCEANS                          = .false.
-ELLIPTICITY                     = .false.
-TOPOGRAPHY                      = .false.
-GRAVITY                         = .false.
-ROTATION                        = .false.
-ATTENUATION                     = .false.
-
-# absorbing boundary conditions for a regional simulation
-ABSORBING_CONDITIONS            = .false.
-
-# record length in minutes
-RECORD_LENGTH_IN_MINUTES        = 30.0d0
-
-# save AVS or OpenDX movies
-MOVIE_SURFACE                   = .false.
-MOVIE_VOLUME                    = .false.
-NTSTEP_BETWEEN_FRAMES           = 100
-HDUR_MOVIE                      = 0.d0
-
-# save movie in volume.  Will save element if center of element is in prescribed volume
-# top/bottom: depth in KM, use MOVIE_TOP = -100 to make sure the surface is stored.
-# west/east: longitude, degrees East [-180/180] top/bottom: latitute, degrees North [-90/90]
-# start/stop: frames will be stored at MOVIE_START + i*NSTEP_BETWEEN_FRAMES, where i=(0,1,2..) and iNSTEP_BETWEEN_FRAMES <= MOVIE_STOP
-# movie_volume_type: 1=strain, 2=time integral of strain, 3=\mu*time integral of strain
-# type 4 saves the trace and deviatoric stress in the whole volume, 5=displacement, 6=velocity
-#MOVIE_VOLUME_COARSE saves movie only at corners of elements
-MOVIE_VOLUME_TYPE               = 2
-MOVIE_VOLUME_COARSE             = .true.
-MOVIE_TOP_KM                    = -100.0
-MOVIE_BOTTOM_KM                 = 1000.0
-MOVIE_WEST_DEG                  = -90.0
-MOVIE_EAST_DEG                  = 90.0
-MOVIE_NORTH_DEG                 = 90.0
-MOVIE_SOUTH_DEG                 = -90.0
-MOVIE_START                     = 0
-MOVIE_STOP                      = 40000
-
-# save mesh files to check the mesh
-SAVE_MESH_FILES                 = .false.
-
-# restart files (number of runs can be 1, 2 or 3, choose 1 for no restart files)
-NUMBER_OF_RUNS                  = 1
-NUMBER_OF_THIS_RUN              = 1
-
-# path to store the local database files on each node
-LOCAL_PATH                      = not_used_any_more_ignored
-
-# interval at which we output time step info and max of norm of displacement
-NTSTEP_BETWEEN_OUTPUT_INFO      = 1000
-
-# interval in time steps for temporary writing of seismograms
-NTSTEP_BETWEEN_OUTPUT_SEISMOS   = 5000000
-NTSTEP_BETWEEN_READ_ADJSRC      = 1000
-
-# output format for the seismograms (one can use either or all of the three formats)
-OUTPUT_SEISMOS_ASCII_TEXT       = .true.
-OUTPUT_SEISMOS_SAC_ALPHANUM     = .false.
-OUTPUT_SEISMOS_SAC_BINARY       = .false.
-
-# rotate seismograms to Radial-Transverse-Z or use default North-East-Z reference frame
-ROTATE_SEISMOGRAMS_RT           = .false.
-
-# decide if master process writes all the seismograms or if all processes do it in parallel
-WRITE_SEISMOGRAMS_BY_MASTER     = .true.
-
-# save all seismograms in one large combined file instead of one file per seismogram
-# to avoid overloading shared non-local file systems such as GPFS for instance
-SAVE_ALL_SEISMOS_IN_ONE_FILE    = .false.
-USE_BINARY_FOR_LARGE_FILE       = .false.
-
-# flag to impose receivers at the surface or allow them to be buried
-RECEIVERS_CAN_BE_BURIED         = .true.
-
-# print source time function
-PRINT_SOURCE_TIME_FUNCTION      = .false.
-

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/Makefile
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/Makefile	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/Makefile	2008-08-03 21:51:34 UTC (rev 12515)
@@ -32,7 +32,9 @@
 #
 FC = ifort
 MPIFC = mpif90
-FLAGS_NO_CHECK = -O3 -xP -e95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check nobounds -align sequence -assume byterecl -i-dynamic -fpe0 -no-ftz
+FLAGS_NO_CHECK = -O1 -e95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check all -align sequence -assume byterecl -i-dynamic -fpe0 -no-ftz
+#FLAGS_NO_CHECK = -O0 -e95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check nobounds -align sequence -assume byterecl -i-dynamic -fpe0 -no-ftz
+#FLAGS_NO_CHECK = -O3 -xP -e95 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -std95 -check nobounds -align sequence -assume byterecl -i-dynamic -fpe0 -no-ftz
 
 #
 # GNU gfortran
@@ -110,6 +112,7 @@
 	$O/get_event_info.o \
 	$O/get_global.o \
 	$O/get_jacobian_boundaries.o \
+	$O/get_jacobian_discontinuities.o \
 	$O/get_model.o \
 	$O/get_perm_cuthill_mckee.o \
 	$O/get_shape2D.o \
@@ -307,6 +310,9 @@
 $O/get_jacobian_boundaries.o: $(SPECINC)/constants.h $S/get_jacobian_boundaries.f90
 	${FCCOMPILE_CHECK} -c -o $O/get_jacobian_boundaries.o ${FCFLAGS_f90} $S/get_jacobian_boundaries.f90
 
+$O/get_jacobian_discontinuities.o: $(SPECINC)/constants.h $S/get_jacobian_discontinuities.f90
+	${FCCOMPILE_CHECK} -c -o $O/get_jacobian_discontinuities.o ${FCFLAGS_f90} $S/get_jacobian_discontinuities.f90
+
 $O/get_MPI_cutplanes_xi.o: $(SPECINC)/constants.h $S/get_MPI_cutplanes_xi.f90
 	${FCCOMPILE_CHECK} -c -o $O/get_MPI_cutplanes_xi.o ${FCFLAGS_f90} $S/get_MPI_cutplanes_xi.f90
 
@@ -369,7 +375,7 @@
 	${FCCOMPILE_CHECK} -c -o $O/spline_routines.o ${FCFLAGS_f90} $S/spline_routines.f90
 
 $O/create_list_files_chunks.o: $(SPECINC)/constants.h $S/create_list_files_chunks.f90
-	${FCCOMPILE_CHECK} -c -o $O/create_list_files_chunks.o ${FCFLAGS_f90} $S/create_list_files_chunks.f90
+	${MPIFCCOMPILE_CHECK} -c -o $O/create_list_files_chunks.o ${FCFLAGS_f90} $S/create_list_files_chunks.f90
 
 $O/recompute_missing_arrays.o: $(SPECINC)/constants.h $S/recompute_missing_arrays.f90
 	${FCCOMPILE_CHECK} -c -o $O/recompute_missing_arrays.o ${FCFLAGS_f90} $S/recompute_missing_arrays.f90
@@ -441,7 +447,7 @@
 	${FCCOMPILE_CHECK} -c -o $O/recompute_jacobian.o ${FCFLAGS_f90} $S/recompute_jacobian.f90
 
 $O/create_regions_mesh.o: $(SPECINC)/constants.h $S/create_regions_mesh.f90
-	${FCCOMPILE_CHECK} -c -o $O/create_regions_mesh.o ${FCFLAGS_f90} $S/create_regions_mesh.f90
+	${MPIFCCOMPILE_CHECK} -c -o $O/create_regions_mesh.o ${FCFLAGS_f90} $S/create_regions_mesh.f90
 
 $O/create_name_database.o: $(SPECINC)/constants.h $S/create_name_database.f90
 	${FCCOMPILE_CHECK} -c -o $O/create_name_database.o ${FCFLAGS_f90} $S/create_name_database.f90

Deleted: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/mpif.h
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/mpif.h	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/mpif.h	2008-08-03 21:51:34 UTC (rev 12515)
@@ -1,265 +0,0 @@
-! mpif.h.  Generated from /opt/mpich/myrinet/intel//include/mpif.h by configure.
-
-!
-!
-!  (C) 1993 by Argonne National Laboratory and Mississipi State University.
-!      All rights reserved.  See COPYRIGHT in top-level directory.
-!
-!
-! user include file for MPI programs, with no dependencies
-!
-! It really is not possible to make a perfect include file that can
-! be used by both F77 and F90 compilers, but this is close.  We have removed
-! continuation lines (allows free form input in F90); systems whose
-! Fortran compilers support ! instead of just C or * for comments can
-! globally replace a C in the first column with !; the resulting file
-! should work for both Fortran 77 and Fortran 90.
-!
-! If your Fortran compiler supports ! for comments, you can run this
-! through sed with
-!     sed -e 's/^C/\!/g'
-!
-! We have also removed the use of contractions (involving the single quote)
-! character because some users use .F instead of .f files (to invoke the
-! cpp preprocessor) and further, their preprocessor is determined to find
-! matching single quote pairs (and probably double quotes; given the
-! different rules in C and Fortran, this sounds like a disaster).  Rather than
-! take the position that the poor users should get a better system, we
-! have removed the text that caused problems.  Of course, the users SHOULD
-! get a better system...
-!
-! return codes
-      INTEGER MPI_SUCCESS,MPI_ERR_BUFFER,MPI_ERR_COUNT,MPI_ERR_TYPE
-      INTEGER MPI_ERR_TAG,MPI_ERR_COMM,MPI_ERR_RANK,MPI_ERR_ROOT
-      INTEGER MPI_ERR_GROUP
-      INTEGER MPI_ERR_OP,MPI_ERR_TOPOLOGY,MPI_ERR_DIMS,MPI_ERR_ARG
-      INTEGER MPI_ERR_UNKNOWN,MPI_ERR_TRUNCATE,MPI_ERR_OTHER
-      INTEGER MPI_ERR_INTERN,MPI_ERR_IN_STATUS,MPI_ERR_PENDING
-      INTEGER MPI_ERR_REQUEST, MPI_ERR_LASTCODE
-      PARAMETER (MPI_SUCCESS=0,MPI_ERR_BUFFER=1,MPI_ERR_COUNT=2)
-      PARAMETER (MPI_ERR_TYPE=3,MPI_ERR_TAG=4,MPI_ERR_COMM=5)
-      PARAMETER (MPI_ERR_RANK=6,MPI_ERR_ROOT=7,MPI_ERR_GROUP=8)
-      PARAMETER (MPI_ERR_OP=9,MPI_ERR_TOPOLOGY=10,MPI_ERR_DIMS=11)
-      PARAMETER (MPI_ERR_ARG=12,MPI_ERR_UNKNOWN=13)
-      PARAMETER (MPI_ERR_TRUNCATE=14,MPI_ERR_OTHER=15)
-      PARAMETER (MPI_ERR_INTERN=16,MPI_ERR_IN_STATUS=17)
-      PARAMETER (MPI_ERR_PENDING=18,MPI_ERR_REQUEST=19)
-      PARAMETER (MPI_ERR_LASTCODE=1073741823)
-!
-      INTEGER MPI_UNDEFINED
-      parameter (MPI_UNDEFINED = (-32766))
-!
-      INTEGER MPI_GRAPH, MPI_CART
-      PARAMETER (MPI_GRAPH = 1, MPI_CART = 2)
-      INTEGER  MPI_PROC_NULL
-      PARAMETER ( MPI_PROC_NULL = (-1) )
-!
-      INTEGER MPI_BSEND_OVERHEAD
-      PARAMETER ( MPI_BSEND_OVERHEAD = 512 )
-
-      INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR
-      PARAMETER(MPI_SOURCE=2, MPI_TAG=3, MPI_ERROR=4)
-      INTEGER MPI_STATUS_SIZE
-      PARAMETER (MPI_STATUS_SIZE=4)
-      INTEGER MPI_MAX_PROCESSOR_NAME, MPI_MAX_ERROR_STRING
-      PARAMETER (MPI_MAX_PROCESSOR_NAME=256)
-      PARAMETER (MPI_MAX_ERROR_STRING=512)
-      INTEGER MPI_MAX_NAME_STRING
-      PARAMETER (MPI_MAX_NAME_STRING=63)
-      INTEGER MPI_MAX_PORT_NAME
-      PARAMETER (MPI_MAX_PORT_NAME=256)
-!
-      INTEGER MPI_COMM_NULL
-      PARAMETER (MPI_COMM_NULL=0)
-!
-      INTEGER MPI_DATATYPE_NULL
-      PARAMETER (MPI_DATATYPE_NULL = 0)
-
-      INTEGER MPI_ERRHANDLER_NULL
-      PARAMETER (MPI_ERRHANDLER_NULL = 0)
-
-      INTEGER MPI_GROUP_NULL
-      PARAMETER (MPI_GROUP_NULL = 0)
-
-      INTEGER MPI_KEYVAL_INVALID
-      PARAMETER (MPI_KEYVAL_INVALID = 0)
-
-      INTEGER MPI_REQUEST_NULL
-      PARAMETER (MPI_REQUEST_NULL = 0)
-!
-      INTEGER MPI_IDENT, MPI_CONGRUENT, MPI_SIMILAR, MPI_UNEQUAL
-      PARAMETER (MPI_IDENT=0, MPI_CONGRUENT=1, MPI_SIMILAR=2)
-      PARAMETER (MPI_UNEQUAL=3)
-!
-!     MPI_BOTTOM needs to be a known address; here we put it at the
-!     beginning of the common block.  The point-to-point and collective
-!     routines know about MPI_BOTTOM, but MPI_TYPE_STRUCT as yet does not.
-!
-!     MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects
-!     Until the underlying MPI library implements the C version of these
-!     (a null pointer), these are declared as arrays of MPI_STATUS_SIZE
-!
-!     The types MPI_INTEGER1,2,4 and MPI_REAL4,8 are OPTIONAL.
-!     Their values are zero if they are not available.  Note that
-!     using these reduces the portability of code (though may enhance
-!     portability between Crays and other systems)
-!
-      INTEGER MPI_TAG_UB, MPI_HOST, MPI_IO
-      INTEGER MPI_BOTTOM
-      INTEGER MPI_STATUS_IGNORE(MPI_STATUS_SIZE)
-      INTEGER MPI_STATUSES_IGNORE(MPI_STATUS_SIZE)
-      INTEGER MPI_INTEGER, MPI_REAL, MPI_DOUBLE_PRECISION
-      INTEGER MPI_COMPLEX, MPI_DOUBLE_COMPLEX,MPI_LOGICAL
-      INTEGER MPI_CHARACTER, MPI_BYTE, MPI_2INTEGER, MPI_2REAL
-      INTEGER MPI_2DOUBLE_PRECISION, MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX
-      INTEGER MPI_UB, MPI_LB
-      INTEGER MPI_PACKED, MPI_WTIME_IS_GLOBAL
-      INTEGER MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY
-      INTEGER MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND
-      INTEGER MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC
-      INTEGER MPI_MAXLOC
-      INTEGER MPI_OP_NULL
-      INTEGER MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN
-!
-      PARAMETER (MPI_ERRORS_ARE_FATAL=119)
-      PARAMETER (MPI_ERRORS_RETURN=120)
-!
-      PARAMETER (MPI_COMPLEX=23,MPI_DOUBLE_COMPLEX=24,MPI_LOGICAL=25)
-      PARAMETER (MPI_REAL=26,MPI_DOUBLE_PRECISION=27,MPI_INTEGER=28)
-      PARAMETER (MPI_2INTEGER=29,MPI_2COMPLEX=30,MPI_2DOUBLE_COMPLEX=31)
-      PARAMETER (MPI_2REAL=32,MPI_2DOUBLE_PRECISION=33,MPI_CHARACTER=1)
-      PARAMETER (MPI_BYTE=3,MPI_UB=16,MPI_LB=15,MPI_PACKED=14)
-
-      INTEGER MPI_ORDER_C, MPI_ORDER_FORTRAN
-      PARAMETER (MPI_ORDER_C=56, MPI_ORDER_FORTRAN=57)
-      INTEGER MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC
-      INTEGER MPI_DISTRIBUTE_NONE, MPI_DISTRIBUTE_DFLT_DARG
-      PARAMETER (MPI_DISTRIBUTE_BLOCK=121, MPI_DISTRIBUTE_CYCLIC=122)
-      PARAMETER (MPI_DISTRIBUTE_NONE=123)
-      PARAMETER (MPI_DISTRIBUTE_DFLT_DARG=-49767)
-      INTEGER MPI_MAX_INFO_KEY, MPI_MAX_INFO_VAL
-      PARAMETER (MPI_MAX_INFO_KEY=255, MPI_MAX_INFO_VAL=1024)
-      INTEGER MPI_INFO_NULL
-      PARAMETER (MPI_INFO_NULL=0)
-
-!
-! Optional Fortran Types.  Configure attempts to determine these.
-!
-      INTEGER MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4, MPI_INTEGER8
-      INTEGER MPI_INTEGER16
-      INTEGER MPI_REAL4, MPI_REAL8, MPI_REAL16
-      INTEGER MPI_COMPLEX8, MPI_COMPLEX16, MPI_COMPLEX32
-      PARAMETER (MPI_INTEGER1=1,MPI_INTEGER2=4)
-      PARAMETER (MPI_INTEGER4=6)
-      PARAMETER (MPI_INTEGER8=8)
-      PARAMETER (MPI_INTEGER16=0)
-      PARAMETER (MPI_REAL4=10)
-      PARAMETER (MPI_REAL8=11)
-      PARAMETER (MPI_REAL16=12)
-      PARAMETER (MPI_COMPLEX8=23)
-      PARAMETER (MPI_COMPLEX16=24)
-      PARAMETER (MPI_COMPLEX32=0)
-!
-!    This is now handled with either the "pointer" extension or this same
-!    code, appended at the end.
-!      COMMON /MPIPRIV/ MPI_BOTTOM,MPI_STATUS_IGNORE,MPI_STATUSES_IGNORE
-!C
-!C     Without this save, some Fortran implementations may make the common
-!C     dynamic!
-!C
-!C     For a Fortran90 module, we might replace /MPIPRIV/ with a simple
-!C     SAVE MPI_BOTTOM
-!C
-!      SAVE /MPIPRIV/
-!
-      PARAMETER (MPI_MAX=100,MPI_MIN=101,MPI_SUM=102,MPI_PROD=103)
-      PARAMETER (MPI_LAND=104,MPI_BAND=105,MPI_LOR=106,MPI_BOR=107)
-      PARAMETER (MPI_LXOR=108,MPI_BXOR=109,MPI_MINLOC=110)
-      PARAMETER (MPI_MAXLOC=111, MPI_OP_NULL=0)
-!
-      PARAMETER (MPI_GROUP_EMPTY=90,MPI_COMM_WORLD=91,MPI_COMM_SELF=92)
-      PARAMETER (MPI_TAG_UB=80,MPI_HOST=82,MPI_IO=84)
-      PARAMETER (MPI_WTIME_IS_GLOBAL=86)
-!
-      INTEGER MPI_ANY_SOURCE
-      PARAMETER (MPI_ANY_SOURCE = (-2))
-      INTEGER MPI_ANY_TAG
-      PARAMETER (MPI_ANY_TAG = (-1))
-!
-      INTEGER MPI_VERSION, MPI_SUBVERSION
-      PARAMETER (MPI_VERSION    = 1, MPI_SUBVERSION = 2)
-!
-!     There are additional MPI-2 constants
-      INTEGER MPI_ADDRESS_KIND, MPI_OFFSET_KIND
-      PARAMETER (MPI_ADDRESS_KIND=8)
-      PARAMETER (MPI_OFFSET_KIND=8)
-!
-!     All other MPI routines are subroutines
-!     This may cause some Fortran compilers to complain about defined and
-!     not used.  Such compilers should be improved.
-!
-!     Some Fortran compilers will not link programs that contain
-!     external statements to routines that are not provided, even if
-!     the routine is never called.  Remove PMPI_WTIME and PMPI_WTICK
-!     if you have trouble with them.
-!
-      DOUBLE PRECISION MPI_WTIME, MPI_WTICK,PMPI_WTIME,PMPI_WTICK
-      EXTERNAL MPI_WTIME, MPI_WTICK,PMPI_WTIME,PMPI_WTICK
-!
-!     The attribute copy/delete subroutines are symbols that can be passed
-!     to MPI routines
-!
-      EXTERNAL MPI_NULL_COPY_FN, MPI_NULL_DELETE_FN, MPI_DUP_FN
-      COMMON /MPIPRIV/ MPI_BOTTOM,MPI_STATUS_IGNORE,MPI_STATUSES_IGNORE
-!
-!     Without this save, some Fortran implementations may make the common
-!     dynamic!
-!
-!     For a Fortran90 module, we might replace /MPIPRIV/ with a simple
-!     SAVE MPI_BOTTOM
-!
-      SAVE /MPIPRIV/
-!
-!     $Id: mpiof.h.in,v 1.3 1999/08/06 18:33:09 thakur Exp $
-!
-!     Copyright (C) 1997 University of Chicago.
-!     See COPYRIGHT notice in top-level directory.
-!
-!
-!    user include file for Fortran MPI-IO programs
-!
-      INTEGER MPI_MODE_RDONLY, MPI_MODE_RDWR, MPI_MODE_WRONLY
-      INTEGER MPI_MODE_DELETE_ON_CLOSE, MPI_MODE_UNIQUE_OPEN
-      INTEGER MPI_MODE_CREATE, MPI_MODE_EXCL
-      INTEGER MPI_MODE_APPEND, MPI_MODE_SEQUENTIAL
-      PARAMETER (MPI_MODE_RDONLY=2, MPI_MODE_RDWR=8, MPI_MODE_WRONLY=4)
-      PARAMETER (MPI_MODE_CREATE=1, MPI_MODE_DELETE_ON_CLOSE=16)
-      PARAMETER (MPI_MODE_UNIQUE_OPEN=32, MPI_MODE_EXCL=64)
-      PARAMETER (MPI_MODE_APPEND=128, MPI_MODE_SEQUENTIAL=256)
-!
-      INTEGER MPI_FILE_NULL
-      PARAMETER (MPI_FILE_NULL=0)
-!
-      INTEGER MPI_MAX_DATAREP_STRING
-      PARAMETER (MPI_MAX_DATAREP_STRING=128)
-!
-      INTEGER MPI_SEEK_SET, MPI_SEEK_CUR, MPI_SEEK_END
-      PARAMETER (MPI_SEEK_SET=600, MPI_SEEK_CUR=602, MPI_SEEK_END=604)
-!
-      INTEGER MPIO_REQUEST_NULL
-      PARAMETER (MPIO_REQUEST_NULL=0)
-!
-!
-!
-
-
-
-
-
-
-
-!
-!
-!
-!
-!

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/allocate_after_1.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/allocate_after_1.f90	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/allocate_after_1.f90	2008-08-03 21:51:34 UTC (rev 12515)
@@ -1,59 +1,59 @@
 
   allocate(xstore_crust_mantle(NGLOB_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(ystore_crust_mantle(NGLOB_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(zstore_crust_mantle(NGLOB_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
 
   allocate(xstore_outer_core(NGLOB_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
-     
-    
+
+
       call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(ystore_outer_core(NGLOB_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
-     
+
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(zstore_outer_core(NGLOB_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
 
   allocate(xstore_inner_core(NGLOB_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(ystore_inner_core(NGLOB_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(zstore_inner_core(NGLOB_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
@@ -62,165 +62,165 @@
 !---
 
   allocate(xix_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(xiy_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(xiz_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etax_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etay_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etaz_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammax_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammay_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammaz_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
 
   allocate(xix_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(xiy_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(xiz_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etax_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etay_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etaz_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammax_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammay_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammaz_outer_core(NGLLX,NGLLY,NGLLZ,NSPEC_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
 
   allocate(xix_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(xiy_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(xiz_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etax_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etay_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(etaz_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammax_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammay_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
 
   allocate(gammaz_inner_core(NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
      print *,"ABORTING can not allocate in allocate_after_1 ier=",ier
      call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/allocate_after_2.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/allocate_after_2.f90	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/allocate_after_2.f90	2008-08-03 21:51:34 UTC (rev 12515)
@@ -1,6 +1,6 @@
 
   allocate(rmass_ocean_load(NGLOB_CRUST_MANTLE_OCEANS),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
   endif
@@ -8,91 +8,91 @@
 !---
 
   allocate(displ_crust_mantle(NDIM,NGLOB_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
   allocate(veloc_crust_mantle(NDIM,NGLOB_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
   allocate(accel_crust_mantle(NDIM,NGLOB_CRUST_MANTLE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
 
   allocate(displ_outer_core(NGLOB_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
   allocate(veloc_outer_core(NGLOB_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
   allocate(accel_outer_core(NGLOB_OUTER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
 
   allocate(displ_inner_core(NDIM,NGLOB_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
   allocate(veloc_inner_core(NDIM,NGLOB_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
   allocate(accel_inner_core(NDIM,NGLOB_INNER_CORE),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
 
 !---
 
   allocate(R_memory_crust_mantle(5,N_SLS,NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ATTENUAT),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
 
   allocate(R_memory_inner_core(5,N_SLS,NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE_ATTENUATION),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
 
 !---
 
   allocate(epsilondev_crust_mantle(5,NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_STR_OR_ATT),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
 
   allocate(epsilondev_inner_core(5,NGLLX,NGLLY,NGLLZ,NSPEC_INNER_CORE_STR_OR_ATT),stat=ier)
-  if(ier /= 0) then 
+  if(ier /= 0) then
     print *,"ABORTING can not allocate in allocate_after_2 ier=",ier
     call MPI_Abort(MPI_COMM_WORLD,errorcode,ier)
-  endif 
+  endif
 
 

Added: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/get_jacobian_discontinuities.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/get_jacobian_discontinuities.f90	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/get_jacobian_discontinuities.f90	2008-08-03 21:51:34 UTC (rev 12515)
@@ -0,0 +1,207 @@
+!=====================================================================
+!
+!          S p e c f e m 3 D  G l o b e  V e r s i o n  4 . 0
+!          --------------------------------------------------
+!
+!          Main authors: Dimitri Komatitsch and Jeroen Tromp
+!    Seismological Laboratory, California Institute of Technology, USA
+!             and University of Pau / CNRS / INRIA, France
+! (c) California Institute of Technology and University of Pau / CNRS / INRIA
+!                            February 2008
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along
+! with this program; if not, write to the Free Software Foundation, Inc.,
+! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+!
+!=====================================================================
+
+subroutine get_jacobian_discontinuities(myrank,ispec,ix_elem,iy_elem,rmin,rmax,r1,r2,r3,r4,r5,r6,r7,r8, &
+                     xstore,ystore,zstore,dershape2D_bottom, &
+                     ibelm_moho_top,ibelm_moho_bot,ibelm_400_top,ibelm_400_bot,ibelm_670_top,ibelm_670_bot, &
+                     normal_moho,normal_400,normal_670,jacobian2D_moho,jacobian2D_400,jacobian2D_670, &
+                     ispec2D_moho_top,ispec2D_moho_bot,ispec2D_400_top,ispec2D_400_bot,ispec2D_670_top,ispec2D_670_bot, &
+                     NSPEC2D_MOHO,NSPEC2D_400,NSPEC2D_670,r_moho,r_400,r_670, &
+                     is_superbrick,USE_ONE_LAYER_SB,ispec_superbrick,nex_eta_moho,HONOR_1D_SPHERICAL_MOHO)
+
+  implicit none
+
+  include 'constants.h'
+
+  ! input
+  integer myrank, ispec, ix_elem, iy_elem
+  double precision rmin,rmax
+  double precision xstore(NGLLX,NGLLY,NGLLZ)
+  double precision ystore(NGLLX,NGLLY,NGLLZ)
+  double precision zstore(NGLLX,NGLLY,NGLLZ)
+  double precision dershape2D_bottom(NDIM2D,NGNOD2D,NGLLX,NGLLY)
+  integer NSPEC2D_MOHO, NSPEC2D_400, NSPEC2D_670, nex_eta_moho, ispec_superbrick
+  double precision r_moho, r_400, r_670
+  logical :: is_superbrick, USE_ONE_LAYER_SB,HONOR_1D_SPHERICAL_MOHO
+
+  ! output
+  integer ispec2D_moho_top, ispec2D_moho_bot, ispec2D_400_top, ispec2D_400_bot, ispec2D_670_top, ispec2D_670_bot
+  integer,dimension(NSPEC2D_MOHO) :: ibelm_moho_top, ibelm_moho_bot
+  integer,dimension(NSPEC2D_400) :: ibelm_400_top, ibelm_400_bot
+  integer,dimension(NSPEC2D_670) :: ibelm_670_top, ibelm_670_bot
+  real(kind=CUSTOM_REAL) :: normal_moho(NDIM,NGLLX,NGLLY,NSPEC2D_MOHO), jacobian2D_moho(NGLLX,NGLLY,NSPEC2D_MOHO)
+  real(kind=CUSTOM_REAL) :: normal_400(NDIM,NGLLX,NGLLY,NSPEC2D_400), jacobian2D_400(NGLLX,NGLLY,NSPEC2D_400)
+  real(kind=CUSTOM_REAL) :: normal_670(NDIM,NGLLX,NGLLY,NSPEC2D_670), jacobian2D_670(NGLLX,NGLLY,NSPEC2D_670)
+
+  ! local variables
+  double precision, dimension(NGNOD2D) :: xelm2, yelm2, zelm2
+  double precision :: r1, r2, r3, r4, r5, r6, r7, r8
+  double precision :: target_moho_high, target_moho_low, target_400_high, target_400_low, target_670_high, target_670_low
+  integer :: nele_sub_block, ispec_list(16), map_irem_ix_12(8), map_irem_ix_34(8), map_irem_iy_odd(8), map_irem_iy_even(8)
+  integer :: map_isub_ix(4), map_isub_iy(4), map_ix(NSPEC_DOUBLING_SUPERBRICK),  map_iy(NSPEC_DOUBLING_SUPERBRICK)
+  integer :: i, ispec_superbrick_current, isub_block, irem_block, irem_ix, irem_iy, ix,iy,ix_top,iy_top, ispec2D_moho_bot_map
+
+  ! ======================
+
+
+  ! find the coordinates of 9 nodes for the bottom surface element to compute the jacobian if needed
+  xelm2(1)=xstore(1,1,1)
+  yelm2(1)=ystore(1,1,1)
+  zelm2(1)=zstore(1,1,1)
+  xelm2(2)=xstore(NGLLX,1,1)
+  yelm2(2)=ystore(NGLLX,1,1)
+  zelm2(2)=zstore(NGLLX,1,1)
+  xelm2(3)=xstore(NGLLX,NGLLY,1)
+  yelm2(3)=ystore(NGLLX,NGLLY,1)
+  zelm2(3)=zstore(NGLLX,NGLLY,1)
+  xelm2(4)=xstore(1,NGLLY,1)
+  yelm2(4)=ystore(1,NGLLY,1)
+  zelm2(4)=zstore(1,NGLLY,1)
+  xelm2(5)=xstore((NGLLX+1)/2,1,1)
+  yelm2(5)=ystore((NGLLX+1)/2,1,1)
+  zelm2(5)=zstore((NGLLX+1)/2,1,1)
+  xelm2(6)=xstore(NGLLX,(NGLLY+1)/2,1)
+  yelm2(6)=ystore(NGLLX,(NGLLY+1)/2,1)
+  zelm2(6)=zstore(NGLLX,(NGLLY+1)/2,1)
+  xelm2(7)=xstore((NGLLX+1)/2,NGLLY,1)
+  yelm2(7)=ystore((NGLLX+1)/2,NGLLY,1)
+  zelm2(7)=zstore((NGLLX+1)/2,NGLLY,1)
+  xelm2(8)=xstore(1,(NGLLY+1)/2,1)
+  yelm2(8)=ystore(1,(NGLLY+1)/2,1)
+  zelm2(8)=zstore(1,(NGLLY+1)/2,1)
+  xelm2(9)=xstore((NGLLX+1)/2,(NGLLY+1)/2,1)
+  yelm2(9)=ystore((NGLLX+1)/2,(NGLLY+1)/2,1)
+  zelm2(9)=zstore((NGLLX+1)/2,(NGLLY+1)/2,1)
+
+! radii to determine if an element is on the discontinuity or not
+  target_moho_high = r_moho * (ONE + SMALLVAL)
+  target_moho_low = r_moho * (ONE - SMALLVAL)
+  target_400_high = r_400 * (ONE + SMALLVAL)
+  target_400_low = r_400 * (ONE - SMALLVAL)
+  target_670_high = r_670 * (ONE + SMALLVAL)
+  target_670_low = r_670 * (ONE - SMALLVAL)
+
+! setup the mapping array for superbrick case (only invoked for Moho bottom)
+  if (is_superbrick) then
+    map_irem_ix_12=(/2,2,0,1,0,1,0,0/)
+    map_irem_ix_34=(/1,1,0,2,0,2,0,0/)
+    map_irem_iy_odd=(/1,2,0,1,0,2,0,0/)
+    map_irem_iy_even=(/2,1,0,2,0,1,0,0/)
+    if (USE_ONE_LAYER_SB) then
+      nele_sub_block = 7
+      ispec_list=(/1,2,4,6,8,9,11,13,15,16,18,20,22,23,25,27/)
+   else
+      nele_sub_block = 8
+      ispec_list=(/1,2,4,6,9,10,12,14,17,18,20,22,25,26,28,30/)
+    endif
+    map_isub_ix=(/2,2,1,1/)
+    map_isub_iy=(/2,1,2,1/)
+
+    map_ix(1:NSPEC_DOUBLING_SUPERBRICK) = 0
+    map_iy(1:NSPEC_DOUBLING_SUPERBRICK) = 0
+
+    do i = 1, 16
+      ispec_superbrick_current=ispec_list(i)
+      isub_block = ispec_superbrick_current/nele_sub_block + 1
+      irem_block = mod(ispec_superbrick_current,nele_sub_block)
+
+      if (isub_block > 2) then
+        irem_ix = map_irem_ix_34(irem_block)
+      else
+        irem_ix = map_irem_ix_12(irem_block)
+      endif
+      if (mod(isub_block,2) == 0) then
+        irem_iy = map_irem_iy_even(irem_block)
+      else
+        irem_iy = map_irem_iy_odd(irem_block)
+      endif
+      map_ix(ispec_list(i)) = (map_isub_ix(isub_block) - 1) * 2 + irem_ix
+      map_iy(ispec_list(i)) = (map_isub_iy(isub_block) - 1) * 2 + irem_iy
+!      if (ispec_superbrick == 1 .and. myrank == 0) &
+!                 write(*,'(10i4)') i, ispec_list(i), map_ix(ispec_list(i)), map_iy(ispec_list(i))
+    enddo
+  endif
+
+! determine if the elements are on the discontinuity, and calculate the boundary jaocobian if needed
+  if (.not. is_superbrick) then
+
+! Moho top
+    if (.not. SUPPRESS_CRUSTAL_MESH .and. HONOR_1D_SPHERICAL_MOHO .and. &
+               abs(rmin-r_moho)/r_moho < SMALLVAL .and. r1 < target_moho_high .and. r2 < target_moho_high &
+               .and. r3 < target_moho_high .and. r4 < target_moho_high) then
+        ispec2D_moho_top = ispec2D_moho_top + 1
+        ibelm_moho_top(ispec2D_moho_top) = ispec
+        call compute_jacobian_2D(myrank,ispec2D_moho_top,xelm2,yelm2,zelm2,dershape2D_bottom, &
+                   jacobian2D_moho,normal_moho,NGLLX,NGLLY,NSPEC2D_MOHO)
+! 400 top
+  else if (abs(rmin-r_400)/r_400 < SMALLVAL .and. r1 < target_400_high .and. r2 < target_400_high &
+             .and. r3 < target_400_high .and. r4 < target_400_high) then
+    ispec2D_400_top = ispec2D_400_top + 1
+    ibelm_400_top(ispec2D_400_top) = ispec
+    call compute_jacobian_2D(myrank,ispec2D_400_top,xelm2,yelm2,zelm2,dershape2D_bottom, &
+               jacobian2D_400,normal_400,NGLLX,NGLLY,NSPEC2D_400)
+
+! 400 bot
+  else if (abs(rmax-r_400)/r_400 < SMALLVAL .and. r5 > target_400_low .and. r6 > target_400_low &
+             .and. r7 > target_400_low .and. r8 > target_400_low) then
+    ispec2D_400_bot = ispec2D_400_bot + 1
+    ibelm_400_bot(ispec2D_400_bot) = ispec
+
+! 670 top
+  else if (abs(rmin-r_670)/r_670 < SMALLVAL .and. r1 < target_670_high .and. r2 < target_670_high &
+             .and. r3 < target_670_high .and. r4 < target_670_high) then
+    ispec2D_670_top = ispec2D_670_top + 1
+    ibelm_670_top(ispec2D_670_top) = ispec
+    call compute_jacobian_2D(myrank,ispec2D_670_top,xelm2,yelm2,zelm2,dershape2D_bottom, &
+               jacobian2D_670,normal_670,NGLLX,NGLLY,NSPEC2D_670)
+! 670 bot
+  else if (abs(rmax-r_670)/r_670 < SMALLVAL .and. r5 > target_670_low .and. r6 > target_670_low &
+             .and. r7 > target_670_low .and. r8 > target_670_low) then
+    ispec2D_670_bot = ispec2D_670_bot + 1
+    ibelm_670_bot(ispec2D_670_bot) = ispec
+  endif
+
+  else ! superbrick case
+    ! Moho bot (special care should be taken to deal with mapping 2D element indices)
+    if (.not. SUPPRESS_CRUSTAL_MESH .and. HONOR_1D_SPHERICAL_MOHO .and. &
+               abs(rmax-r_moho)/r_moho < SMALLVAL .and. r5 > target_moho_low .and. r6 > target_moho_low &
+               .and. r7 > target_moho_low .and. r8 > target_moho_low) then
+      ispec2D_moho_bot = ispec2D_moho_bot + 1
+      ix=map_ix(ispec_superbrick)
+      iy=map_iy(ispec_superbrick)
+      if (ix == 0 .or. iy == 0) call exit_mpi(myrank, 'Check (ix,iy) on the Moho bot is 0')
+      ix_top = (ix_elem - 1)  + ix
+      iy_top = (iy_elem - 1)  + iy
+      ispec2D_moho_bot_map = (ix_top - 1) * nex_eta_moho + iy_top
+!      if (myrank == 0) write(*,'(10i6)') ix_elem, iy_elem, ispec_superbrick, ix, iy, ix_top, iy_top, ispec2D_moho_bot_map
+      ibelm_moho_bot(ispec2D_moho_bot_map) = ispec
+    endif
+  endif
+
+
+end subroutine get_jacobian_discontinuities
+

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/meshfem3D.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/meshfem3D.f90	2008-08-03 20:39:25 UTC (rev 12514)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/meshfem3D.f90	2008-08-03 21:51:34 UTC (rev 12515)
@@ -639,6 +639,7 @@
 
 ! initialize the MPI communicator and start the NPROCTOT MPI processes.
   call MPI_INIT(ier)
+  if(ier /= 0) stop 'error: cannot start MPI!!!'
 
 ! sizeprocs returns number of processes started (should be equal to NPROCTOT).
 ! myrank is the rank of each process, between 0 and NPROCTOT-1.



More information about the cig-commits mailing list