[cig-commits] r22287 - in seismo/3D/SPECFEM3D_GLOBE/branches/undo_att: . src/compute_optimized_dumping_undo_att src/shared src/specfem3D
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Fri Jun 14 15:45:52 PDT 2013
Author: dkomati1
Date: 2013-06-14 15:45:52 -0700 (Fri, 14 Jun 2013)
New Revision: 22287
Modified:
seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att.F90
seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att_changed_from_forward.F90
seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/compute_optimized_dumping_undo_att.F90
seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/rules.mk
seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/read_compute_parameters.F90
seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/specfem3D.F90
Log:
committed compute_optimized_dumping_undo_att.F90;
also renamed NT_500 to NT_DUMP
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att.F90 2013-06-14 22:24:18 UTC (rev 22286)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att.F90 2013-06-14 22:45:52 UTC (rev 22287)
@@ -61,12 +61,12 @@
if(CUSTOM_REAL == SIZE_REAL) then
time = sngl((dble(NSTEP-it)*DT-t0)*scale_t_inv)
if(UNDO_ATT_WITH_STORE)then
- time = sngl((dble(NSTEP-(iteration_on_subset*NT_500-it_of_this_subset+1))*DT-t0)*scale_t_inv)
+ time = sngl((dble(NSTEP-(iteration_on_subset*NT_DUMP-it_of_this_subset+1))*DT-t0)*scale_t_inv)
endif
else
time = (dble(NSTEP-it)*DT-t0)*scale_t_inv
if(UNDO_ATT_WITH_STORE)then
- time = (dble(NSTEP-(iteration_on_subset*NT_500-it_of_this_subset+1))*DT-t0)*scale_t_inv
+ time = (dble(NSTEP-(iteration_on_subset*NT_DUMP-it_of_this_subset+1))*DT-t0)*scale_t_inv
endif
endif
@@ -571,7 +571,7 @@
call compute_add_sources_backward(myrank,NSOURCES,NSTEP, &
b_accel_crust_mantle,sourcearrays, &
DT,t0,tshift_cmt,hdur_gaussian,ibool_crust_mantle, &
- islice_selected_source,ispec_selected_source,iteration_on_subset*NT_500-it_of_this_subset+1, &
+ islice_selected_source,ispec_selected_source,iteration_on_subset*NT_DUMP-it_of_this_subset+1, &
hdur,xi_source,eta_source,gamma_source,nu_source)
else
call compute_add_sources_backward(myrank,NSOURCES,NSTEP, &
@@ -1013,12 +1013,12 @@
if(seismo_current == NTSTEP_BETWEEN_OUTPUT_SEISMOS .or. it == it_end) then
if (SIMULATION_TYPE == 1 .or. SIMULATION_TYPE == 3) then
do irec_local = 1,nrec_local
- do i = 1,seismo_current/NT_500
- do j = 1,NT_500/2
+ do i = 1,seismo_current/NT_DUMP
+ do j = 1,NT_DUMP/2
do k = 1,3
- seismograms_temp(k) = seismograms(k,irec_local,(i-1)*NT_500 + j)
- seismograms(k,irec_local,(i-1)*NT_500 + j) = seismograms(k,irec_local,(i-1)*NT_500 + (NT_500-j+1))
- seismograms(k,irec_local,(i-1)*NT_500 + (NT_500-j+1)) = seismograms_temp(k)
+ seismograms_temp(k) = seismograms(k,irec_local,(i-1)*NT_DUMP + j)
+ seismograms(k,irec_local,(i-1)*NT_DUMP + j) = seismograms(k,irec_local,(i-1)*NT_DUMP + (NT_DUMP-j+1))
+ seismograms(k,irec_local,(i-1)*NT_DUMP + (NT_DUMP-j+1)) = seismograms_temp(k)
enddo
enddo
enddo
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att_changed_from_forward.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att_changed_from_forward.F90 2013-06-14 22:24:18 UTC (rev 22286)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att_changed_from_forward.F90 2013-06-14 22:45:52 UTC (rev 22287)
@@ -446,7 +446,7 @@
call compute_add_sources(myrank,NSOURCES, &
b_accel_crust_mantle,sourcearrays, &
DT,t0,tshift_cmt,hdur_gaussian,ibool_crust_mantle, &
- islice_selected_source,ispec_selected_source,NSTEP-(iteration_on_subset*NT_500-it_of_this_subset), &
+ islice_selected_source,ispec_selected_source,NSTEP-(iteration_on_subset*NT_DUMP-it_of_this_subset), &
hdur,xi_source,eta_source,gamma_source,nu_source)
if(.not. UNDO_ATT_WITH_STORE)then
@@ -796,12 +796,12 @@
if(UNDO_ATT_WITH_STORE)then
if(seismo_current == NTSTEP_BETWEEN_OUTPUT_SEISMOS .or. it == it_end) then
do irec_local = 1,nrec_local
- do i = 1,seismo_current/NT_500
- do j = 1,NT_500/2
+ do i = 1,seismo_current/NT_DUMP
+ do j = 1,NT_DUMP/2
do k = 1,3
- seismograms_temp(k) = seismograms(k,irec_local,(i-1)*NT_500 + j)
- seismograms(k,irec_local,(i-1)*NT_500 + j) = seismograms(k,irec_local,(i-1)*NT_500 + (NT_500-j+1))
- seismograms(k,irec_local,(i-1)*NT_500 + (NT_500-j+1)) = seismograms_temp(k)
+ seismograms_temp(k) = seismograms(k,irec_local,(i-1)*NT_DUMP + j)
+ seismograms(k,irec_local,(i-1)*NT_DUMP + j) = seismograms(k,irec_local,(i-1)*NT_DUMP + (NT_DUMP-j+1))
+ seismograms(k,irec_local,(i-1)*NT_DUMP + (NT_DUMP-j+1)) = seismograms_temp(k)
enddo
enddo
enddo
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/compute_optimized_dumping_undo_att.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/compute_optimized_dumping_undo_att.F90 2013-06-14 22:24:18 UTC (rev 22286)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/compute_optimized_dumping_undo_att.F90 2013-06-14 22:45:52 UTC (rev 22287)
@@ -103,7 +103,7 @@
integer, dimension(MAX_NUM_REGIONS,NB_SQUARE_CORNERS) :: NGLOB1D_RADIAL_CORNER
integer, dimension(MAX_NUM_REGIONS) :: NGLOB1D_RADIAL_TEMP
- integer :: NT_500_optimal_to_use,number_of_dumpings_to_do
+ integer :: NT_DUMP_optimal_to_use,number_of_dumpings_to_do
double precision :: gigabytes_avail_per_core,percentage_to_use_per_core,what_we_can_use_in_GB,size_to_store_at_each_time_step, &
disk_size_of_each_dumping
@@ -184,14 +184,6 @@
print *,'total points per slice = ',sum(nglob)
print *
print *,'number of time steps = ',NSTEP
- print *,'time-stepping of the solver will be: ',DT
- print *
- if(MOVIE_SURFACE .or. MOVIE_VOLUME) then
- print *,'MOVIE_VOLUME :',MOVIE_VOLUME
- print *,'MOVIE_SURFACE:',MOVIE_SURFACE
- print *,'Saving movie frames every',NTSTEP_BETWEEN_FRAMES
- print *
- endif
print *,'approximate static memory needed by the solver:'
print *,'----------------------------------------------'
@@ -220,7 +212,8 @@
print *,' = ',static_memory_size*dble(NPROCTOT)/1099511627776.d0,' TiB'
print *
- print *,'How much memory (in GB) is installed on your machine per CPU core (of GPU card)?'
+ print *,'How much memory (in GB) is installed on your machine per CPU core?'
+ print *,' (or per GPU card or per INTEL MIC Phi board)?'
print *,' (beware, this value MUST be given per core, i.e. per MPI thread, i.e. per MPI rank, NOT per node)'
read(*,*) gigabytes_avail_per_core
@@ -228,8 +221,8 @@
if(gigabytes_avail_per_core > 32.d0) stop 'more than 32 GB per core does not seem realistic; exiting...'
print *
- print *,'What percentage of this total do you allow us to use, keeping in mind that you need to leave'
- print *,'some memory available for the GNU/Linux system to run?'
+ print *,'What percentage of this total do you allow us to use, keeping in mind that you'
+ print *,'need to leave some memory available for the GNU/Linux system to run?'
print *,' (a typical value is 90%; 92% to 95% is probably OK too; 85% is very safe)'
read(*,*) percentage_to_use_per_core
@@ -245,13 +238,12 @@
print *,'without undoing of attenuation you are using ',static_memory_size,' GB per core'
if(static_memory_size >= gigabytes_avail_per_core) &
- stop 'you are using more than what you told us is installed!!! there is an error'
+ stop 'you are using more memory than what you told us is installed!!! there is an error'
if(static_memory_size >= what_we_can_use_in_GB) &
- stop 'you are using more than what you allow us to use!!! there is an error'
+ stop 'you are using more memory than what you allowed us to use!!! there is an error'
! compute the size to store in memory at each time step
-
size_to_store_at_each_time_step = 0
! displ_crust_mantle
@@ -267,15 +259,20 @@
size_to_store_at_each_time_step = size_to_store_at_each_time_step / 1.d9
print *
- print *,'each time step to store to memory to undo attenuation requires storing ',size_to_store_at_each_time_step,' GB per core'
+ print *,'each time step to store in memory to undo attenuation requires storing ',size_to_store_at_each_time_step,' GB per core'
print *
- print *,'the optimal value for NT_500 in setup/constants.h is thus:'
- NT_500_optimal_to_use = int((what_we_can_use_in_GB - static_memory_size) / size_to_store_at_each_time_step)
- print *,'NT_500 = ',NT_500_optimal_to_use
- print *,'thus please edit that file, put this value in it and recompile the whole code with "make clean ; make all"'
+ print *,'*******************************************************************************'
+ print *,'the optimal value to put in setup/constants.h is thus:'
+ NT_DUMP_optimal_to_use = int((what_we_can_use_in_GB - static_memory_size) / size_to_store_at_each_time_step)
+ print *
+ print *,'NT_DUMP = ',NT_DUMP_optimal_to_use
+ print *
+ print *,'thus please edit that file, put this value in it and recompile the whole code'
+ print *,'with "make clean ; make all"'
+ print *,'*******************************************************************************'
-! compute the size to dump to disk
+! compute the size of files to dump to disk
disk_size_of_each_dumping = 0
! displ_crust_mantle, veloc_crust_mantle, accel_crust_mantle
@@ -288,8 +285,7 @@
disk_size_of_each_dumping = disk_size_of_each_dumping + 3.d0*NGLOB(IREGION_OUTER_CORE)*dble(CUSTOM_REAL)
! A_array_rotation,B_array_rotation
- if (ROTATION) &
- disk_size_of_each_dumping = disk_size_of_each_dumping + &
+ if (ROTATION) disk_size_of_each_dumping = disk_size_of_each_dumping + &
dble(NGLLX)*dble(NGLLY)*dble(NGLLZ)*NSPEC_OUTER_CORE_ROTATION*2.d0*dble(CUSTOM_REAL)
if (ATTENUATION) then
@@ -306,24 +302,27 @@
disk_size_of_each_dumping = disk_size_of_each_dumping / 1.d9
!! DK DK this formula could be made more precise here; currently in some cases it can probably be off by +1 or -1
- number_of_dumpings_to_do = nint(NSTEP / dble(NT_500_optimal_to_use))
+ number_of_dumpings_to_do = nint(NSTEP / dble(NT_DUMP_optimal_to_use))
print *
print *,'we will need to save a total of ',number_of_dumpings_to_do,' dumpings (restart files) to disk'
print *
- print *,'each dumping to store to disk to undo attenuation requires storing ',disk_size_of_each_dumping,' GB per core'
+ print *,'each dumping on the disk to undo attenuation requires storing ',disk_size_of_each_dumping,' GB per core'
print *
- print *,'ALL dumpings require storing ',disk_size_of_each_dumping*number_of_dumpings_to_do,' GB per core'
+ print *,'ALL dumpings on the disk require storing ',disk_size_of_each_dumping*number_of_dumpings_to_do,' GB per core'
print *
- print *,'each dumping to store to disk to undo attenuation requires storing ',disk_size_of_each_dumping*NPROCTOT, &
+ print *,'each dumping on the disk requires storing ',disk_size_of_each_dumping*NPROCTOT, &
' GB for all cores'
print *
- print *,'ALL dumpings require storing (WITHOUT epsilondev) ',disk_size_of_each_dumping*number_of_dumpings_to_do*NPROCTOT, &
- ' GB for all cores'
+ print *,'*******************************************************************************'
+ print *,'ALL dumpings on the disk require storing (WITHOUT epsilondev) ', &
+ disk_size_of_each_dumping*number_of_dumpings_to_do*NPROCTOT,' GB for all cores'
+ print *,'*******************************************************************************'
+ print *
! convert back from GB
disk_size_of_each_dumping = disk_size_of_each_dumping * 1.d9
@@ -339,16 +338,20 @@
! convert to GB
disk_size_of_each_dumping = disk_size_of_each_dumping / 1.d9
+!! DK DK remove this tomorrow if Zhinan confirms that it is OK to do so
+!! DK DK remove this tomorrow if Zhinan confirms that it is OK to do so
+!! DK DK remove this tomorrow if Zhinan confirms that it is OK to do so
+!! DK DK remove this tomorrow if Zhinan confirms that it is OK to do so
print *
- print *,'ALL dumpings require storing (WITH epsilondev) ',disk_size_of_each_dumping*number_of_dumpings_to_do*NPROCTOT, &
- ' GB for all cores'
+ print *,'ALL dumpings on the disk require storing (WITH epsilondev) ', &
+ disk_size_of_each_dumping*number_of_dumpings_to_do*NPROCTOT,' GB to disk for all cores'
-#ifdef UNDO_ATT
+#ifndef UNDO_ATT
print *
- print *,'******************************************************************************************'
- print *,'BEWARE, -DUNDO_ATT not used to compile the code, and thus undoing is currently turned off,'
- print *,'i.e. the above estimates are currently NOT USED.'
- print *,'******************************************************************************************'
+ print *,'*******************************************************************************'
+ print *,'BEWARE, -DUNDO_ATT not used to compile the code, and thus undoing is currently'
+ print *,'turned off, i.e. the above estimates are currently NOT USED.'
+ print *,'*******************************************************************************'
print *
#endif
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/rules.mk
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/rules.mk 2013-06-14 22:24:18 UTC (rev 22286)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/rules.mk 2013-06-14 22:45:52 UTC (rev 22287)
@@ -29,7 +29,6 @@
compute_optimized_dumping_undo_att_TARGETS = \
$E/xcompute_optimized_dumping_undo_att \
- ${OUTPUT}/values_from_mesher.h \
$(EMPTY_MACRO)
compute_optimized_dumping_undo_att_OBJECTS = \
@@ -57,17 +56,6 @@
#######################################
####
-#### Mesher header file
-####
-
-${OUTPUT}/values_from_mesher.h: $E/xcompute_optimized_dumping_undo_att $B/DATA/Par_file
- @-rm -f $@
- $E/xcompute_optimized_dumping_undo_att
- @test -f $@
-
-#######################################
-
-####
#### rules for executables
####
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/read_compute_parameters.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/read_compute_parameters.F90 2013-06-14 22:24:18 UTC (rev 22286)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/read_compute_parameters.F90 2013-06-14 22:45:52 UTC (rev 22287)
@@ -227,9 +227,9 @@
! compute total number of time steps, rounded to next multiple of 100
NSTEP = 100 * (int(RECORD_LENGTH_IN_MINUTES * 60.d0 / (100.d0*DT)) + 1)
-!! DK DK UNDO_ATT make sure NSTEP is a multiple of NT_500
+!! DK DK UNDO_ATT make sure NSTEP is a multiple of NT_DUMP
#ifdef UNDO_ATT
- if(mod(NSTEP,NT_500) /= 0) NSTEP = (NSTEP/NT_500 + 1)*NT_500
+ if(mod(NSTEP,NT_DUMP) /= 0) NSTEP = (NSTEP/NT_DUMP + 1)*NT_DUMP
#endif
! if doing benchmark runs to measure scaling of the code for a limited number of time steps only
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/specfem3D.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/specfem3D.F90 2013-06-14 22:24:18 UTC (rev 22286)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/specfem3D.F90 2013-06-14 22:45:52 UTC (rev 22287)
@@ -2184,8 +2184,8 @@
!
!Old part of Dimitri
!! DK DK it = 0
-!! DK DK do iteration_on_subset = 1, NSTEP / NT_500
-!! DK DK do it_of_this_subset = 1, NT_500
+!! DK DK do iteration_on_subset = 1, NSTEP / NT_DUMP
+!! DK DK do it_of_this_subset = 1, NT_DUMP
!! DK DK
!! DK DK it = it + 1
!! DK DK! if(myrank == 0) print *,'doing time step ',it
@@ -2218,7 +2218,7 @@
!New part of ZN
if(SIMULATION_TYPE == 1)then
it = 0
- do iteration_on_subset = 1, NSTEP / NT_500
+ do iteration_on_subset = 1, NSTEP / NT_DUMP
if(SAVE_FORWARD)then
call save_forward_arrays_undoatt(myrank,SIMULATION_TYPE,SAVE_FORWARD,NUMBER_OF_RUNS, &
displ_crust_mantle,veloc_crust_mantle,accel_crust_mantle, &
@@ -2229,7 +2229,7 @@
A_array_rotation,B_array_rotation,LOCAL_PATH,iteration_on_subset)
endif
- do it_of_this_subset = 1, NT_500
+ do it_of_this_subset = 1, NT_DUMP
it = it + 1
@@ -2247,9 +2247,9 @@
!ZN !ZN we need to be careful to arrange this part
it = 0
- do iteration_on_subset = 1, NSTEP / NT_500
+ do iteration_on_subset = 1, NSTEP / NT_DUMP
- do it_of_this_subset = 1, NT_500
+ do it_of_this_subset = 1, NT_DUMP
it = it + 1
@@ -2273,18 +2273,18 @@
UNDO_ATT_WITH_STORE = .true.
#endif
- allocate(displ_crust_mantle_store_as_bwf(NDIM,NGLOB_CRUST_MANTLE,NT_500),stat=ier)
+ allocate(displ_crust_mantle_store_as_bwf(NDIM,NGLOB_CRUST_MANTLE,NT_DUMP),stat=ier)
if( ier /= 0 ) call exit_MPI(myrank,'error allocating displ_crust_mantle_store_as_bwf')
- allocate(displ_outer_core_store_store_as_bwf(NGLOB_OUTER_CORE,NT_500),stat=ier)
+ allocate(displ_outer_core_store_store_as_bwf(NGLOB_OUTER_CORE,NT_DUMP),stat=ier)
if( ier /= 0 ) call exit_MPI(myrank,'error allocating displ_outer_core_store_store_as_bwf')
- allocate(accel_outer_core_store_store_as_bwf(NGLOB_OUTER_CORE,NT_500),stat=ier)
+ allocate(accel_outer_core_store_store_as_bwf(NGLOB_OUTER_CORE,NT_DUMP),stat=ier)
if( ier /= 0 ) call exit_MPI(myrank,'error allocating displ_outer_core_store_store_as_bwf')
- allocate(displ_inner_core_store_as_bwf(NDIM,NGLOB_INNER_CORE,NT_500),stat=ier)
+ allocate(displ_inner_core_store_as_bwf(NDIM,NGLOB_INNER_CORE,NT_DUMP),stat=ier)
if( ier /= 0 ) call exit_MPI(myrank,'error allocating displ_inner_core_store_as_bwf')
it = 0
- do iteration_on_subset = 1, NSTEP / NT_500
+ do iteration_on_subset = 1, NSTEP / NT_DUMP
call read_forward_arrays_undoatt(myrank, &
b_displ_crust_mantle,b_veloc_crust_mantle,b_accel_crust_mantle, &
@@ -2292,12 +2292,12 @@
b_displ_outer_core,b_veloc_outer_core,b_accel_outer_core, &
b_R_memory_crust_mantle,b_R_memory_inner_core, &
b_epsilondev_crust_mantle,b_epsilondev_inner_core, &
- b_A_array_rotation,b_B_array_rotation,LOCAL_PATH, NSTEP/NT_500-iteration_on_subset+1)
+ b_A_array_rotation,b_B_array_rotation,LOCAL_PATH, NSTEP/NT_DUMP-iteration_on_subset+1)
it_temp = it
seismo_current_temp = seismo_current
- do it_of_this_subset = 1, NT_500
+ do it_of_this_subset = 1, NT_DUMP
it = it + 1
seismo_current = seismo_current + 1
@@ -2313,21 +2313,21 @@
it = it_temp
seismo_current = seismo_current_temp
- do it_of_this_subset = 1, NT_500
+ do it_of_this_subset = 1, NT_DUMP
do i = 1, NDIM
do j =1,NGLOB_CRUST_MANTLE_ADJOINT
- b_displ_crust_mantle(i,j) = displ_crust_mantle_store_as_bwf(i,j,NT_500-it_of_this_subset+1)
+ b_displ_crust_mantle(i,j) = displ_crust_mantle_store_as_bwf(i,j,NT_DUMP-it_of_this_subset+1)
enddo
enddo
do j =1,NGLOB_OUTER_CORE_ADJOINT
- b_displ_outer_core(j) = displ_outer_core_store_store_as_bwf(j,NT_500-it_of_this_subset+1)
- b_accel_outer_core(j) = accel_outer_core_store_store_as_bwf(j,NT_500-it_of_this_subset+1)
+ b_displ_outer_core(j) = displ_outer_core_store_store_as_bwf(j,NT_DUMP-it_of_this_subset+1)
+ b_accel_outer_core(j) = accel_outer_core_store_store_as_bwf(j,NT_DUMP-it_of_this_subset+1)
enddo
do i = 1, NDIM
do j =1,NGLOB_INNER_CORE_ADJOINT
- b_displ_inner_core(i,j) = displ_inner_core_store_as_bwf(i,j,NT_500-it_of_this_subset+1)
+ b_displ_inner_core(i,j) = displ_inner_core_store_as_bwf(i,j,NT_DUMP-it_of_this_subset+1)
enddo
enddo
More information about the CIG-COMMITS
mailing list