[Dart-dev] DART/branches Revision: 12818
dart at ucar.edu
dart at ucar.edu
Tue Sep 11 15:18:09 MDT 2018
hendric at ucar.edu
2018-09-11 15:18:09 -0600 (Tue, 11 Sep 2018)
143
assigning number of tasks for every call to init_ensemble_manager.
before this was only getting set on the first call to the
initialization.
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-10 21:36:55 UTC (rev 12817)
+++ DART/branches/rma_distrib/assimilation_code/modules/utilities/ensemble_manager_mod.f90 2018-09-11 21:18:09 UTC (rev 12818)
@@ -197,11 +197,10 @@
if (do_nml_file()) write(nmlfileunit, nml=ensemble_manager_nml)
if (do_nml_term()) write( * , nml=ensemble_manager_nml)
- ! Get mpi information for this process; it's stored in module storage
- ens_handle%num_pes = task_count(ens_handle%my_communicator)
-
endif
+ens_handle%num_pes = task_count(ens_handle%my_communicator)
+
! Optional layout_type argument to assign how my_pe is related to my_task_id
! layout_type can be set individually for each ensemble handle. It is not advisable to do this
! because get_obs_ens assumes that the layout is the same for each ensemble handle.
@@ -212,8 +211,11 @@
endif
! Check for error: only layout_types 1 and 2 are implemented
-if (ens_handle%layout_type /= 1 .and. ens_handle%layout_type /=2 ) then
- call error_handler(E_ERR, 'init_ensemble_manager', 'only layout values 1 (standard), 2 (round-robin) allowed ', &
+if (ens_handle%layout_type /= 1 .and. &
+ ens_handle%layout_type /= 2 .and. &
+ ens_handle%layout_type /= 3 ) then
+ call error_handler(E_ERR, 'init_ensemble_manager', &
+ 'only layout values 1 (standard), 2 (round-robin), 3 (groups) allowed ', &
source, revision, revdate)
endif
@@ -220,7 +222,8 @@
! Optional transpose type:
! 1 not transposable - always copy complete
! 2 transposable - has a vars array
-! 3 duplicatable - really only 1 copy, but this gets duplicated as vars array on every task during a transpose
+! 3 duplicatable - really only 1 copy, but this gets duplicated
+! as vars array on every task during a transpose
if (.not. present(transpose_type_in)) then
transpose_type = 1
else
@@ -233,11 +236,11 @@
allocate(ens_handle%pe_to_task_list(ens_handle%num_pes))
call assign_tasks_to_pes(ens_handle, num_copies, ens_handle%layout_type)
-ens_handle%my_pe = map_task_to_pe(ens_handle, my_task_id())
+ens_handle%my_pe = map_task_to_pe(ens_handle, my_task_id(ens_handle%my_communicator))
! Set the global storage bounds for the number of copies and variables
ens_handle%num_copies = num_copies
-ens_handle%num_vars = num_vars
+ens_handle%num_vars = num_vars
! For debugging, error checking
ens_handle%id_num = global_counter
@@ -281,6 +284,10 @@
ens_handle%num_extras = 0 ! This can be changed by calling set_num_extra_copies
if (debug) call print_ens_handle(ens_handle)
+ !call print_ens_handle(ens_handle, &
+ ! force = .true., &
+ ! label = 'debug ens_handle', &
+ ! contents = .true.)
end subroutine init_ensemble_manager
@@ -1075,26 +1082,9 @@
! only output if there is a label
if (present(label)) then
- call timestamp_message('vars_to_copies start: '//label, alltasks=.true.)
+ call timestamp_message('my_vars_to_group_copies start: '//label, alltasks=.true.)
endif
-! Error checking, but can't return early in case only some of the
-! MPI tasks need to transpose. Only if all N tasks say this is an
-! unneeded transpose can we skip it.
-!if (ens_handle%valid == VALID_BOTH) then
-! if (flag_unneeded_transposes) then
-! write(msgstring, *) 'task ', my_task_id(), ' ens_handle ', ens_handle%id_num
-! call error_handler(E_MSG, 'all_vars_to_all_copies', &
-! 'vars & copies both valid, transpose not needed for this task', &
-! source, revision, revdate, text2=msgstring)
-! endif
-!else if (ens_handle%valid /= VALID_VARS) then
-! write(msgstring, *) 'ens_handle ', ens_handle%id_num
-! call error_handler(E_ERR, 'all_vars_to_all_copies', &
-! 'last access not var-complete', source, revision, revdate, &
-! text2=msgstring)
-!endif
-
ens_handle%valid = VALID_BOTH
! Accelerated version for single process
@@ -1735,84 +1725,92 @@
logical :: has_label
logical :: do_contents
integer :: limit_count
-integer :: i,j,listlen
+integer :: i,j,listlen, rank
More information about the Dart-dev
mailing list