Commit a1f4dd6e authored by Espen Sollum's avatar Espen Sollum
Browse files

Fixed a bug where receptor arrays were not properly zeroed

parent 6b22af90
...@@ -104,7 +104,7 @@ module mpi_mod ...@@ -104,7 +104,7 @@ module mpi_mod
! true if only using synchronous MPI send/recv: ! true if only using synchronous MPI send/recv:
! If setting this to .false., numwfmem must be set to 3 ! If setting this to .false., numwfmem must be set to 3
!=============================================================================== !===============================================================================
logical :: lmp_sync=.false. logical :: lmp_sync=.true.
!=============================================================================== !===============================================================================
! mp_dbg_mode Used for debugging MPI. ! mp_dbg_mode Used for debugging MPI.
...@@ -201,7 +201,9 @@ contains ...@@ -201,7 +201,9 @@ contains
else if (lmp_sync.and.numwfmem.ne.2.and.lroot) then else if (lmp_sync.and.numwfmem.ne.2.and.lroot) then
write(*,FMT='(80("#"))') write(*,FMT='(80("#"))')
write(*,*) '#### mpi_mod::mpif_init> WARNING: ', & write(*,*) '#### mpi_mod::mpif_init> WARNING: ', &
& 'numwfmem should be set to 2 for syncronous reading' & 'numwfmem should be set to 2 for syncronous'
write(*,*) ' reading. Results will still be valid, but unneccesary '
write(*,*) 'amount of memory is being allocated.'
write(*,FMT='(80("#"))') write(*,FMT='(80("#"))')
! Force "syncronized" version if all processes will call getfields ! Force "syncronized" version if all processes will call getfields
else if (.not.lmp_sync.and.mp_np.lt.read_grp_min) then else if (.not.lmp_sync.and.mp_np.lt.read_grp_min) then
......
...@@ -458,7 +458,9 @@ subroutine timemanager ...@@ -458,7 +458,9 @@ subroutine timemanager
call concoutput(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) call concoutput(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc)
endif endif
else else
! zero arrays on non-root processes
gridunc(:,:,:,:,:,:,:)=0. gridunc(:,:,:,:,:,:,:)=0.
creceptor(:,:)=0.
end if end if
else else
if (lroot) then if (lroot) then
...@@ -470,7 +472,9 @@ subroutine timemanager ...@@ -470,7 +472,9 @@ subroutine timemanager
call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc)
end if end if
else else
! zero arrays on non-root processes
gridunc(:,:,:,:,:,:,:)=0. gridunc(:,:,:,:,:,:,:)=0.
creceptor(:,:)=0.
endif endif
endif endif
if (mp_measure_time) call mpif_mtime('iotime',1) if (mp_measure_time) call mpif_mtime('iotime',1)
...@@ -787,6 +791,7 @@ subroutine timemanager ...@@ -787,6 +791,7 @@ subroutine timemanager
! eso :TODO: this not implemented yet (transfer particles to PID 0 or rewrite) ! eso :TODO: this not implemented yet (transfer particles to PID 0 or rewrite)
! the tools to do this are already in mpi_mod.f90 ! the tools to do this are already in mpi_mod.f90
! :CUR: check this
if (lroot) then if (lroot) then
do j=1,numpart do j=1,numpart
if (linit_cond.ge.1) call initial_cond_calc(itime,j) if (linit_cond.ge.1) call initial_cond_calc(itime,j)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment