[Dart-dev] DART/branches Revision: 13029
dart at ucar.edu
dart at ucar.edu
Tue Mar 19 17:06:14 MDT 2019
nancy at ucar.edu
2019-03-19 17:06:14 -0600 (Tue, 19 Mar 2019)
144
fix the comments to be less misleading for one routine;
make minor changes to both files to keep them in sync -
comments, string lengths, etc.
Modified: DART/branches/recam/assimilation_code/modules/utilities/mpi_utilities_mod.f90
===================================================================
--- DART/branches/recam/assimilation_code/modules/utilities/mpi_utilities_mod.f90 2019-03-19 23:03:42 UTC (rev 13028)
+++ DART/branches/recam/assimilation_code/modules/utilities/mpi_utilities_mod.f90 2019-03-19 23:06:14 UTC (rev 13029)
@@ -116,8 +116,8 @@
logical :: module_initialized = .false.
-character(len = 129) :: saved_progname = ''
-character(len = 129) :: shell_name = '' ! if needed, add ksh, tcsh, bash, etc
+character(len = 256) :: saved_progname = ''
+character(len = 128) :: shell_name = '' ! if needed, add ksh, tcsh, bash, etc
integer :: head_task = 0 ! def 0, but N-1 if reverse_task_layout true
logical :: print4status = .true. ! minimal messages for async4 handshake
@@ -1765,12 +1765,13 @@
!-----------------------------------------------------------------------------
!-----------------------------------------------------------------------------
-! Collect sum across tasks for a given array.
+! Sum array items across all tasks and send
+! results in an array of same size to one 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
+real(r8), intent(in) :: local_val(:) !> addend vals on each task
+integer, intent(in) :: task !> task to collect on
+real(r8), intent(out) :: global_val(:) !> results returned only on given task
integer :: errcode
@@ -1789,9 +1790,9 @@
! Collect min and max on task.
subroutine send_minmax_to(minmax, task, global_val)
-real(r8), intent(in) :: minmax(2) !> min max on each task
-integer, intent(in) :: task !> task to collect on
-real(r8), intent(out) :: global_val(2) !> only concerned with this on task collecting result
+real(r8), intent(in) :: minmax(2) !> min max on each task
+integer, intent(in) :: task !> task to collect on
+real(r8), intent(out) :: global_val(2) !> results returned only on given task
integer :: errcode
Modified: DART/branches/recam/assimilation_code/modules/utilities/null_mpi_utilities_mod.f90
===================================================================
--- DART/branches/recam/assimilation_code/modules/utilities/null_mpi_utilities_mod.f90 2019-03-19 23:03:42 UTC (rev 13028)
+++ DART/branches/recam/assimilation_code/modules/utilities/null_mpi_utilities_mod.f90 2019-03-19 23:06:14 UTC (rev 13029)
@@ -16,6 +16,7 @@
E_ERR, E_WARN, E_MSG, E_DBG, finalize_utilities
use time_manager_mod, only : time_type, set_time
+! the NAG compiler needs these special definitions enabled
! !!NAG_BLOCK_EDIT START COMMENTED_OUT
! use F90_unix_proc, only : sleep, system, exit
@@ -58,6 +59,7 @@
! !!SYSTEM_BLOCK_EDIT END COMMENTED_OUT
+! allow global sum to be computed for integers, r4, and r8s
interface sum_across_tasks
module procedure sum_across_tasks_int4
module procedure sum_across_tasks_int8
@@ -74,10 +76,10 @@
task_count, my_task_id, block_task, restart_task, &
task_sync, array_broadcast, send_to, receive_from, iam_task0, &
broadcast_send, broadcast_recv, shell_execute, sleep_seconds, &
- sum_across_tasks, send_minmax_to, datasize, &
+ sum_across_tasks, get_dart_mpi_comm, datasize, send_minmax_to, &
get_from_fwd, get_from_mean, broadcast_minmax, broadcast_flag, &
start_mpi_timer, read_mpi_timer, send_sum_to, &
- all_reduce_min_max ! deprecated, replace with broadcast_minmax
+ all_reduce_min_max ! deprecated, replace by broadcast_minmax
! version controlled file description for error handling, do not edit
character(len=256), parameter :: source = &
@@ -85,11 +87,11 @@
character(len=32 ), parameter :: revision = "$Revision$"
character(len=128), parameter :: revdate = "$Date$"
-logical, save :: module_initialized = .false.
+logical :: module_initialized = .false.
-character(len = 129) :: saved_progname = ''
+character(len = 256) :: saved_progname = ''
-character(len = 129) :: errstring
+character(len = 256) :: errstring
! Namelist input - placeholder for now; no options yet in this module.
!namelist /mpi_utilities_nml/ x
@@ -122,7 +124,7 @@
call initialize_utilities(progname, alternatename)
if (present(progname)) then
- if (len_trim(progname) < len(saved_progname)) then
+ if (len_trim(progname) <= len(saved_progname)) then
More information about the Dart-dev
mailing list