Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
flexpart
flexpart
Commits
a1f4dd6e
Commit
a1f4dd6e
authored
Dec 01, 2015
by
Espen Sollum
Browse files
Fixed a bug where receptor arrays were not properly zeroed
parent
6b22af90
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mpi_mod.f90
View file @
a1f4dd6e
...
...
@@ -104,7 +104,7 @@ module mpi_mod
! true if only using synchronous MPI send/recv:
! If setting this to .false., numwfmem must be set to 3
!===============================================================================
logical
::
lmp_sync
=
.
fals
e.
logical
::
lmp_sync
=
.
tru
e.
!===============================================================================
! mp_dbg_mode Used for debugging MPI.
...
...
@@ -201,7 +201,9 @@ contains
else
if
(
lmp_sync
.and.
numwfmem
.ne.
2.
and
.
lroot
)
then
write
(
*
,
FMT
=
'(80("#"))'
)
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("#"))'
)
! Force "syncronized" version if all processes will call getfields
else
if
(
.not.
lmp_sync
.and.
mp_np
.lt.
read_grp_min
)
then
...
...
src/timemanager_mpi.f90
View file @
a1f4dd6e
...
...
@@ -458,7 +458,9 @@ subroutine timemanager
call
concoutput
(
itime
,
outnum
,
gridtotalunc
,
wetgridtotalunc
,
drygridtotalunc
)
endif
else
! zero arrays on non-root processes
gridunc
(:,:,:,:,:,:,:)
=
0.
creceptor
(:,:)
=
0.
end
if
else
if
(
lroot
)
then
...
...
@@ -470,7 +472,9 @@ subroutine timemanager
call
concoutput_surf
(
itime
,
outnum
,
gridtotalunc
,
wetgridtotalunc
,
drygridtotalunc
)
end
if
else
! zero arrays on non-root processes
gridunc
(:,:,:,:,:,:,:)
=
0.
creceptor
(:,:)
=
0.
endif
endif
if
(
mp_measure_time
)
call
mpif_mtime
(
'iotime'
,
1
)
...
...
@@ -787,6 +791,7 @@ subroutine timemanager
! eso :TODO: this not implemented yet (transfer particles to PID 0 or rewrite)
! the tools to do this are already in mpi_mod.f90
! :CUR: check this
if
(
lroot
)
then
do
j
=
1
,
numpart
if
(
linit_cond
.ge.
1
)
call
initial_cond_calc
(
itime
,
j
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment