[Dart-dev] DART/branches Revision: 12607

dart at ucar.edu dart at ucar.edu
Tue May 29 11:59:15 MDT 2018


hendric at ucar.edu
2018-05-29 11:59:14 -0600 (Tue, 29 May 2018)
39

adding null routine for send_sum_to.




Modified: DART/branches/rma_closest_member_tool/assimilation_code/modules/utilities/null_mpi_utilities_mod.f90
===================================================================
--- DART/branches/rma_closest_member_tool/assimilation_code/modules/utilities/null_mpi_utilities_mod.f90	2018-05-29 17:23:50 UTC (rev 12606)
+++ DART/branches/rma_closest_member_tool/assimilation_code/modules/utilities/null_mpi_utilities_mod.f90	2018-05-29 17:59:14 UTC (rev 12607)
@@ -49,12 +49,12 @@
 ! !!SYSTEM_BLOCK_EDIT START COMMENTED_OUT
 ! ! interface block for getting return code back from system() routine
 ! interface
-!  function system(string)    
+!  function system(string)
 !   character(len=*) :: string
-!   integer :: system         
+!   integer :: system
 !  end function system
 ! end interface
-! ! end block                 
+! ! end block
 ! !!SYSTEM_BLOCK_EDIT END COMMENTED_OUT
 
 
@@ -76,7 +76,7 @@
           broadcast_send, broadcast_recv, shell_execute, sleep_seconds,      &
           sum_across_tasks, send_minmax_to, datasize,                        &
           get_from_fwd, get_from_mean, broadcast_minmax, broadcast_flag,     &
-          start_mpi_timer, read_mpi_timer, &
+          start_mpi_timer, read_mpi_timer, send_sum_to,                      &
           all_reduce_min_max   ! deprecated, replace with broadcast_minmax
 
 ! version controlled file description for error handling, do not edit
@@ -603,8 +603,25 @@
 
 end function get_dart_mpi_comm
 
+!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------
+! Collect min and max on task.
+subroutine send_sum_to(local_val, task, global_val)
 
+real(r8), intent(in)  :: local_val(:) !> min max on each task
+integer,  intent(in)  :: task !> task to collect on
+real(r8), intent(out) :: global_val(:) !> only concerned with this on task collecting result
+
+integer :: errcode
+
+! collect values on a single given task 
+global_val(:) = local_val(:) ! only one task.
+
+end subroutine send_sum_to
+
 !-----------------------------------------------------------------------------
+
+!-----------------------------------------------------------------------------
 ! Collect min and max on task. This is for adaptive_inflate_mod
 subroutine send_minmax_to(minmax, task, global_val)
 


More information about the Dart-dev mailing list