[Dart-dev] DART/branches Revision: 11432

dart at ucar.edu dart at ucar.edu
Tue Apr 4 15:03:48 MDT 2017


nancy at ucar.edu
2017-04-04 15:03:46 -0600 (Tue, 04 Apr 2017)
372
if the ensemble manager 'debug' namelist item was true
one of the error_handler messages was trying to print too long
an array into the message string. with the intel compiler this
resulted in a crash with the (not helpful) message:

Fortran runtime error: End of record

i changed to code to loop over the array, printing only 10 items
at a time per error_handler call.




Modified: DART/branches/rma_trunk/assimilation_code/modules/utilities/ensemble_manager_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/utilities/ensemble_manager_mod.f90	2017-04-04 17:11:44 UTC (rev 11431)
+++ DART/branches/rma_trunk/assimilation_code/modules/utilities/ensemble_manager_mod.f90	2017-04-04 21:03:46 UTC (rev 11432)
@@ -1553,7 +1553,7 @@
 logical :: has_label
 logical :: do_contents
 integer :: limit_count
-integer :: i,j
+integer :: i,j,listlen
 
 print_anyway = .false.
 if (present(force)) then
@@ -1597,11 +1597,19 @@
 call error_handler(E_MSG, 'ensemble handle: ', msgstring, source, revision, revdate)
 write(msgstring, *) 'my_pe number       : ', ens_handle%my_pe
 call error_handler(E_MSG, 'ensemble handle: ', msgstring, source, revision, revdate)
+
+! large task counts crash here when the list length exceeds the buffer length.
+! break the list up into chunks of 10 to avoid this.
 if (allocated(ens_handle%pe_to_task_list)) then
-   write(msgstring, *) 'task_to_pe_list    : ', ens_handle%task_to_pe_list
-   call error_handler(E_MSG, 'ensemble handle: ', msgstring, source, revision, revdate)
-   write(msgstring, *) 'pe_to_task_list    : ', ens_handle%pe_to_task_list
-   call error_handler(E_MSG, 'ensemble handle: ', msgstring, source, revision, revdate)
+   listlen = size(ens_handle%pe_to_task_list)
+   do i=1, listlen, 10
+      write(msgstring, *) 'task_to_pe_list    : ', ens_handle%task_to_pe_list(i:min(i+9,listlen))
+      call error_handler(E_MSG, 'ensemble handle: ', msgstring, source, revision, revdate)
+   enddo
+   do i=1, listlen, 10
+      write(msgstring, *) 'pe_to_task_list    : ', ens_handle%pe_to_task_list(i:min(i+9,listlen))
+      call error_handler(E_MSG, 'ensemble handle: ', msgstring, source, revision, revdate)
+   enddo
 endif
 
 ! warning - for large state vectors this is a lot of output


More information about the Dart-dev mailing list