[Dart-dev] DART/branches Revision: 12819
dart at ucar.edu
dart at ucar.edu
Wed Sep 12 15:04:33 MDT 2018
hendric at ucar.edu
2018-09-12 15:04:32 -0600 (Wed, 12 Sep 2018)
207
temporarily make a copy of the mean on each processor
and then copy over the bits of information that you
need for each group. this only works for group sizes
that are divisible by the size of the mean.
Modified: DART/branches/rma_distrib/assimilation_code/modules/utilities/ensemble_manager_mod.f90
===================================================================
--- DART/branches/rma_distrib/assimilation_code/modules/utilities/ensemble_manager_mod.f90 2018-09-11 21:18:09 UTC (rev 12818)
+++ DART/branches/rma_distrib/assimilation_code/modules/utilities/ensemble_manager_mod.f90 2018-09-12 21:04:32 UTC (rev 12819)
@@ -798,6 +798,7 @@
endif
if(ens_handle%transpose_type == 3) then
+ print*, my_task_id(), 'allocating space for vars on every task'
allocate(ens_handle%vars(ens_handle%num_vars,1))
endif
@@ -865,7 +866,7 @@
end subroutine get_var_owner_index
!-----------------------------------------------------------------
-
+!>@todo FIXME : This is off by one for evenly divisable num_vars
function get_max_num_vars(ens_handle, num_vars)
!!!function get_max_num_vars(num_vars, distribution_type)
@@ -883,7 +884,7 @@
end function get_max_num_vars
!-----------------------------------------------------------------
-
+!>@todo FIXME : This is off by one for evenly divisable num_copies
function get_max_num_copies(ens_handle, num_copies)
!!!function get_max_num_copies(num_copies, distribution_type)
@@ -928,6 +929,8 @@
pes_num_vars = num_per_pe_below
endif
+print*, 'get_var_list : pes_num_vars = ', pes_num_vars
+print*, 'get_var_list : ens_handle%num_pes = ', ens_handle%num_pes
! Fill out the pe's vars
do i = 1, pes_num_vars
var_list(i) = (pe + 1) + (i - 1) * ens_handle%num_pes
@@ -960,6 +963,8 @@
pes_num_copies = num_per_pe_below
endif
+print*, 'get_copy_list : pes_num_copies = ', pes_num_copies
+print*, 'get_copy_list : ens_handle%num_pes = ', ens_handle%num_pes
! Fill out the pe's copies
do i = 1, pes_num_copies
copy_list(i) = (pe + 1) + (i - 1) * ens_handle%num_pes
@@ -1008,7 +1013,7 @@
! Counting up the 'real' ensemble copies a task has. Don't
! want the extras (mean, etc.)
-if (ens_handle%transpose_type == 1) then ! distibuted (all tasks have all copies)
+if ( ens_handle%transpose_type == 1) then ! distibuted (all tasks have all copies)
copies_in_window = ens_size
elseif (ens_handle%transpose_type == 2) then ! var complete (only some tasks have data)
copies_in_window = 0
@@ -1018,6 +1023,7 @@
endif
enddo
elseif(ens_handle%transpose_type == 3)then ! mean copy on each process
+ !print*, 'TRANSPOSE_TYPE == 3'
copies_in_window = 1
endif
@@ -1054,7 +1060,7 @@
!-----------------------------------------------------------------
-subroutine my_vars_to_group_copies(ens_handle, mean_handle, label)
+subroutine my_vars_to_group_copies(mean_handle, group_mean_handle, label)
! Converts from having subset of copies of all variables to having
! all copies of a subset of variables on a given PE.
@@ -1066,8 +1072,8 @@
! or original version of the routine.
! Default: use updated version
-type (ensemble_type), intent(inout) :: ens_handle
type (ensemble_type), intent(inout) :: mean_handle
+type (ensemble_type), intent(inout) :: group_mean_handle
character (len=*), intent(in), optional :: label
integer(i8), allocatable :: var_list(:)
@@ -1078,7 +1084,8 @@
integer :: num_copies, my_num_vars, my_num_copies, my_pe
integer :: max_num_vars, max_num_copies, num_copies_to_receive
integer :: sending_pe, recv_pe, k, sv, num_vars_to_send, copy
-integer :: global_ens_index
+integer :: global_ens_index, i
+integer :: mpe, mnv, nv, gs
! only output if there is a label
if (present(label)) then
@@ -1085,27 +1092,27 @@
call timestamp_message('my_vars_to_group_copies start: '//label, alltasks=.true.)
endif
-ens_handle%valid = VALID_BOTH
+mean_handle%valid = VALID_BOTH
More information about the Dart-dev
mailing list