[Dart-dev] DART/branches Revision: 12651
dart at ucar.edu
dart at ucar.edu
Fri Jun 8 15:53:43 MDT 2018
bdobbins at ucar.edu
2018-06-08 15:53:42 -0600 (Fri, 08 Jun 2018)
84
Minor changes, working, but needs optimization - also need to change how QC is used
Modified: DART/branches/graph_coloring/assimilation_code/modules/assimilation/assim_graph_tools_mod.f90
===================================================================
--- DART/branches/graph_coloring/assimilation_code/modules/assimilation/assim_graph_tools_mod.f90 2018-06-08 21:47:37 UTC (rev 12650)
+++ DART/branches/graph_coloring/assimilation_code/modules/assimilation/assim_graph_tools_mod.f90 2018-06-08 21:53:42 UTC (rev 12651)
@@ -242,6 +242,13 @@
! Only use for when testing against the non-rma trunk.
logical :: lanai_bitwise = .false.
+
+! Changes by bpd6
+logical :: sync_between_timers = .false.
+logical :: packed_sends = .true.
+logical :: detailed_timers = .false.
+logical :: debug_mode = .false.
+
namelist / assim_tools_nml / filter_kind, cutoff, sort_obs_inc, &
spread_restoration, sampling_error_correction, &
adaptive_localization_threshold, adaptive_cutoff_floor, &
@@ -251,6 +258,7 @@
allow_missing_in_clm, distribute_mean, close_obs_caching, &
adjust_obs_impact, obs_impact_filename, allow_any_impact_values, &
convert_all_state_verticals_first, convert_all_obs_verticals_first, &
+ sync_between_timers, packed_sends, detailed_timers, debug_mode, & ! Modifications by bpd6
lanai_bitwise ! don't document this one -- only used for regression tests
!============================================================================
@@ -509,10 +517,10 @@
real(kind=8) :: checksum, checksum_total
!packed sends (into a buffer)?
-logical :: packed_sends = .true.
+!logical :: packed_sends = .true.
! synchronize between timers?
-logical :: sync_between_timers = .false.
+!logical :: sync_between_timers = .false.
! trace files:
open(unit=15, file="trace.1")
@@ -525,6 +533,7 @@
!endif
!call task_sync()
+call task_sync()
call t_startf('ASSIMILATE:Pre.Loop')
! we are going to read/write the copies array
@@ -734,29 +743,9 @@
! timing
if (my_task_id() == 0 .and. timing) allocate(elapse_array(obs_ens_handle%num_vars))
+
call t_stopf('ASSIMILATE:Pre.Loop')
-call task_sync()
-call t_startf('tmp_loop')
-!write(*,*) "DEBUG2: About to enter loop 1 -> ", colors%num_colors
-!write(*,*) "Ensemble Size : ", ens_size
-
-! bpd6 - error checking:
-!do iError = 1, obs_ens_handle%my_num_vars
-! write(*,*) "ECheck3 : ", iError, sum(obs_ens_handle%copies(:,iError))
-!end do
-
-!checksum = sum(obs_ens_handle%copies(1:ens_size,:))
-!call MPI_Reduce(checksum, checksum_total, 1, MPI_DOUBLE_PRECISION, MPI_SUM, 0, MPI_COMM_WORLD, iError)
-!if (my_task_id() == 0) then
-! !write(*,*) "PreCheck1: ", checksum_total
-!endif
-
-! bpd6 - error checking:
-!do iError = 1, obs_ens_handle%my_num_vars
-! write(*,*) "Debug1: ", iError, sum(obs_ens_handle%copies(:,iError))
-!end do
-
! Loop through all the chunks:
!write(*,*) "[Info] Number of Chunks = ", size(chunks)
nth_obs = size(chunks) / 100
@@ -767,10 +756,18 @@
if (my_task_id() == 0) then
write(*,*) "Number of chunks : ", size(chunks)
endif
+
+if (sync_between_timers) then
+ call task_sync()
+endif
+call t_startf('Full Loop')
+
CHUNK_LOOP: do i = 1, size(chunks)
- !write(*,*) "----------------------------------"
- !write(*,*) "Chunk loop : ", i, size(chunks)
- !write(*,*) "Loop start/end -> ", chunks(i)%obs_list(1), chunks(i)%obs_list(chunks(i)%num_obs)
+ if (debug_mode) then
+ if (my_task_id() == 0) then
+ write(*,'(A5,I6,A7,I6,A4,I6,A3,I9,A3,I9)'), "Rank",my_task_id(),"C#",i,"Own",chunks(i)%owner,"St",chunks(i)%obs_list(1),"En",chunks(i)%obs_list(chunks(i)%num_obs)
+ endif
+ endif
if (mod(i,nth_obs) == 0) then
if (my_task_id() == 0) then
@@ -780,11 +777,12 @@
More information about the Dart-dev
mailing list