Skip to content

Commit e92a585

Browse files
author
Himpu Marbona
committed
Debug Residual Memory
1 parent 8d89087 commit e92a585

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Solver/src/libs/monitors/ResidualsMonitor.f90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,10 @@ elemental subroutine Residuals_Assign(to, from)
332332
to % CPUtime = from % CPUtime
333333

334334
safedeallocate (to % totMemory)
335-
allocate ( to % totMemory( size(from % totMemory) ) )
336-
to % totMemory = from % totMemory
335+
if (allocated(from % totMemory)) then
336+
allocate ( to % totMemory( size(from % totMemory) ) )
337+
to % totMemory = from % totMemory
338+
end if
337339

338340
to % fileName = from % fileName
339341

0 commit comments

Comments
 (0)