[cig-commits] r19210 - seismo/2D/SPECFEM2D/trunk/src/specfem2D
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Wed Nov 16 08:12:11 PST 2011
Author: dkomati1
Date: 2011-11-16 08:12:11 -0800 (Wed, 16 Nov 2011)
New Revision: 19210
Modified:
seismo/2D/SPECFEM2D/trunk/src/specfem2D/initialize_simulation.F90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
Log:
fixed a problem detected by "valgrind"
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/initialize_simulation.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/initialize_simulation.F90 2011-11-16 12:55:25 UTC (rev 19209)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/initialize_simulation.F90 2011-11-16 16:12:11 UTC (rev 19210)
@@ -45,7 +45,7 @@
subroutine initialize_simulation(nproc,myrank,NUMBER_OF_PASSES, &
- ninterface_acoustic,ninterface_elastic,ninterface_poroelastic,PERFORM_CUTHILL_MCKEE)
+ ninterface_acoustic,ninterface_elastic,ninterface_poroelastic)
implicit none
include "constants.h"
@@ -56,9 +56,6 @@
integer :: nproc,myrank,NUMBER_OF_PASSES
integer :: ninterface_acoustic, ninterface_elastic,ninterface_poroelastic
-! perform inverse Cuthill-McKee (1969) permutation for mesh numbering
- logical :: PERFORM_CUTHILL_MCKEE
-
! local parameters
integer :: ier
character(len=256) :: prname
@@ -82,23 +79,10 @@
else
NUMBER_OF_PASSES = 1
endif
-
#else
nproc = 1
myrank = 0
- !ier = 0
- !ninterface_acoustic = 0
- !ninterface_elastic = 0
- !ninterface_poroelastic = 0
- !iproc = 0
- !ispec_inner = 0
- !ispec_outer = 0
-
- if(PERFORM_CUTHILL_MCKEE) then
- NUMBER_OF_PASSES = 2
- else
- NUMBER_OF_PASSES = 1
- endif
+ NUMBER_OF_PASSES = 1 ! assign dummy value for now, will be changed later if needed
#endif
ninterface_acoustic = 0
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90 2011-11-16 12:55:25 UTC (rev 19209)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90 2011-11-16 16:12:11 UTC (rev 19210)
@@ -876,11 +876,6 @@
! latter usually much faster but prone to artefacts)
logical :: save_everywhere = .false.
-
-!>NOISE_TOMOGRAPHY
-
-!! DK DK for periodic conditions: detect common points between left and right edges
-
!***********************************************************************
!
! i n i t i a l i z a t i o n p h a s e
@@ -891,12 +886,12 @@
call force_ftz()
call initialize_simulation(nproc,myrank,NUMBER_OF_PASSES, &
- ninterface_acoustic,ninterface_elastic,ninterface_poroelastic,PERFORM_CUTHILL_MCKEE)
+ ninterface_acoustic,ninterface_elastic,ninterface_poroelastic)
- ! reduction of cache misses inner/outer in two passes
- do ipass = 1,NUMBER_OF_PASSES
-
! starts reading in Database file
+ ! it is necessary to duplicate this call before the loop on ipass = 1,NUMBER_OF_PASSES
+ ! because we need to read the value of logical flag PERFORM_CUTHILL_MCKEE
+ ipass = 1
call read_databases_init(myrank,ipass, &
simulation_title,SIMULATION_TYPE,NOISE_TOMOGRAPHY,SAVE_FORWARD,npgeo, &
gnuplot,interpol,NTSTEP_BETWEEN_OUTPUT_INFO, &
@@ -911,6 +906,32 @@
POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0, &
ADD_PERIODIC_CONDITIONS,PERIODIC_horiz_dist,PERIODIC_DETECT_TOL)
+#ifndef USE_MPI
+ if(PERFORM_CUTHILL_MCKEE) then
+ NUMBER_OF_PASSES = 2
+ else
+ NUMBER_OF_PASSES = 1
+ endif
+#endif
+
+ ! reduction of cache misses inner/outer in two passes
+ do ipass = 1,NUMBER_OF_PASSES
+
+ ! starts reading in Database file
+ if(ipass > 1) call read_databases_init(myrank,ipass, &
+ simulation_title,SIMULATION_TYPE,NOISE_TOMOGRAPHY,SAVE_FORWARD,npgeo, &
+ gnuplot,interpol,NTSTEP_BETWEEN_OUTPUT_INFO, &
+ output_postscript_snapshot,output_color_image,colors,numbers, &
+ meshvect,modelvect,boundvect,cutsnaps,subsamp_postscript,sizemax_arrows, &
+ anglerec,initialfield,add_Bielak_conditions, &
+ seismotype,imagetype,assign_external_model,READ_EXTERNAL_SEP_FILE, &
+ output_grid,output_energy,output_wavefield_snapshot,TURN_ATTENUATION_ON, &
+ TURN_VISCATTENUATION_ON,Q0,freq0,p_sv, &
+ NSTEP,deltat,NTSTEP_BETWEEN_OUTPUT_SEISMO,NSOURCES, &
+ factor_subsample_image,USE_SNAPSHOT_NUMBER_IN_FILENAME,DRAW_WATER_CONSTANT_BLUE_IN_JPG,US_LETTER, &
+ POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0, &
+ ADD_PERIODIC_CONDITIONS,PERIODIC_horiz_dist,PERIODIC_DETECT_TOL)
+
!
!--- source information
!
More information about the CIG-COMMITS
mailing list