From 9744dd21039ad346ba445c35342dd579307a00e0 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 13 Sep 2023 13:56:15 -0700 Subject: [PATCH 1/2] fix: Ensure that the `status` argument is passed through by the `taskMulti` class --- source/tasks.multi.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/tasks.multi.F90 b/source/tasks.multi.F90 index 2517f5f340..031efae212 100644 --- a/source/tasks.multi.F90 +++ b/source/tasks.multi.F90 @@ -127,8 +127,8 @@ subroutine multiPerform(self,status) !!{ Perform all tasks. !!} - use :: Display , only : displayIndent , displayUnindent - use :: Error, only : errorStatusSuccess + use :: Display, only : displayIndent , displayUnindent + use :: Error , only : errorStatusSuccess implicit none class (taskMulti ), intent(inout), target :: self integer , intent( out), optional :: status @@ -138,7 +138,7 @@ subroutine multiPerform(self,status) if (present(status)) status=errorStatusSuccess task_ => self%tasks do while (associated(task_)) - call task_%task_%perform() + call task_%task_%perform(status) if (present(status) .and. status /= errorStatusSuccess) return task_ => task_%next end do From acf9e6206d6f7fa9cd1ade996deeb622efa14180 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 13 Sep 2023 22:07:11 +0000 Subject: [PATCH 2/2] fix: Add missing changes to `mergerTreeOutputterStandard` to handle updated `nodePropertyExtractorList` methods --- source/merger_trees.outputter.standard.F90 | 36 ++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/source/merger_trees.outputter.standard.F90 b/source/merger_trees.outputter.standard.F90 index 901d7dd1e1..028a941f1a 100644 --- a/source/merger_trees.outputter.standard.F90 +++ b/source/merger_trees.outputter.standard.F90 @@ -530,20 +530,22 @@ subroutine standardOutput(self,node,time) & +extractor_ %elementCount( time ) class is (nodePropertyExtractorList ) ! List property extractor - extract and store the values. - doubleTuple =extractor_%extract (node ,instance) - if ( allocated(self%doubleProperty (doubleProperty +1)%scalar )) deallocate(self%doubleProperty (doubleProperty +1)%scalar) - if ( allocated(self%doubleProperty (doubleProperty +1)%rank1 )) deallocate(self%doubleProperty (doubleProperty +1)%rank1 ) - if (.not.allocated(self%doubleProperty (doubleProperty +1)%rank1VarLen)) allocate(self%doubleProperty (doubleProperty +1)%rank1VarLen(self%doubleBufferSize)) - if (associated(self%doubleProperty (doubleProperty +1)%rank1VarLen (self%doubleBufferCount )%row)) then - if (size(self%doubleProperty (doubleProperty +1)%rank1VarLen (self%doubleBufferCount )%row) /= size(doubleTuple)) deallocate(self%doubleProperty (doubleProperty +1)%rank1VarLen (self%doubleBufferCount )%row) - end if - if (.not.associated(self%doubleProperty (doubleProperty +1)%rank1VarLen (self%doubleBufferCount )%row)) then - allocate(self%doubleProperty (doubleProperty +1)%rank1VarLen (self%doubleBufferCount )%row(size(doubleTuple))) - end if - self%doubleProperty (doubleProperty +1)%rank1VarLen(self%doubleBufferCount)%row=doubleTuple - deallocate(doubleTuple ) + doubleArray =extractor_%extract (node ,instance) + do i=1,+extractor_%elementCount( ) + if ( allocated(self%doubleProperty (doubleProperty +i)%scalar )) deallocate(self%doubleProperty (doubleProperty +i)%scalar) + if ( allocated(self%doubleProperty (doubleProperty +i)%rank1 )) deallocate(self%doubleProperty (doubleProperty +i)%rank1 ) + if (.not.allocated(self%doubleProperty (doubleProperty +i)%rank1VarLen)) allocate(self%doubleProperty (doubleProperty +i)%rank1VarLen(self%doubleBufferSize)) + if (associated(self%doubleProperty (doubleProperty +i)%rank1VarLen (self%doubleBufferCount )%row)) then + if (size(self%doubleProperty (doubleProperty +i)%rank1VarLen (self%doubleBufferCount )%row) /= size(doubleArray,dim=1)) deallocate(self%doubleProperty (doubleProperty +i)%rank1VarLen (self%doubleBufferCount )%row) + end if + if (.not.associated(self%doubleProperty (doubleProperty +i)%rank1VarLen (self%doubleBufferCount )%row)) then + allocate(self%doubleProperty (doubleProperty +i)%rank1VarLen (self%doubleBufferCount )%row(size(doubleArray,dim=1))) + end if + self%doubleProperty (doubleProperty +i)%rank1VarLen(self%doubleBufferCount)%row=doubleArray(:,i) + end do + deallocate(doubleArray ) doubleProperty =+doubleProperty & - & +1 + & +extractor_ %elementCount( ) class is (nodePropertyExtractorMulti ) ! Multi property extractor - extract and store the values. doubleProperties =extractor_%extractDouble (node,time,instance,doubleRanks) @@ -1015,9 +1017,11 @@ subroutine standardPropertyNamesEstablish(self,time,node) deallocate(descriptionsTmp) class is (nodePropertyExtractorList ) ! List property extractor - get the name, description, and units. - self%doubleProperty (doubleProperty +1 )%name =extractor_%name ( ) - self%doubleProperty (doubleProperty +1 )%comment =extractor_%description ( ) - self%doubleProperty (doubleProperty +1 )%unitsInSI =extractor_%unitsInSI ( ) + call extractor_%names (namesTmp ) + call extractor_%descriptions(descriptionsTmp ) + self%doubleProperty (doubleProperty +1:doubleProperty +extractor_%elementCount( ))%name =namesTmp + self%doubleProperty (doubleProperty +1:doubleProperty +extractor_%elementCount( ))%comment =descriptionsTmp + self%doubleProperty (doubleProperty +1:doubleProperty +extractor_%elementCount( ))%unitsInSI =extractor_%unitsInSI ( ) call extractor_%metaData( self%doubleProperty (doubleProperty +1)%metaData) doubleProperty =doubleProperty +1 class is (nodePropertyExtractorIntegerScalar)