Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flexpart
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
flexpart
flexpart
Commits
861805ae
Commit
861805ae
authored
Sep 06, 2016
by
Espen Sollum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for a problem with the distribution of particles among processes (MPI version)
parent
0f7835d0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
847 additions
and
381 deletions
+847
-381
mpi_mod.f90
src/mpi_mod.f90
+721
-272
releaseparticles_mpi.f90
src/releaseparticles_mpi.f90
+105
-104
timemanager_mpi.f90
src/timemanager_mpi.f90
+21
-5
No files found.
src/mpi_mod.f90
View file @
861805ae
This diff is collapsed.
Click to expand it.
src/releaseparticles_mpi.f90
View file @
861805ae
This diff is collapsed.
Click to expand it.
src/timemanager_mpi.f90
View file @
861805ae
...
...
@@ -103,7 +103,7 @@ subroutine timemanager
implicit
none
logical
::
reqv_state
=
.false.
! .true. if waiting for a MPI_Irecv to complete
integer
::
j
,
ks
,
kp
,
l
,
n
,
itime
=
0
,
nstop
,
nstop1
,
memstat
=
0
!,mind
integer
::
j
,
ks
,
kp
,
l
,
n
,
itime
=
0
,
nstop
,
nstop1
,
memstat
=
0
! integer :: ksp
integer
::
ip
integer
::
loutnext
,
loutstart
,
loutend
...
...
@@ -154,6 +154,7 @@ subroutine timemanager
do
itime
=
0
,
ideltas
,
lsynctime
! Computation of wet deposition, OH reaction and mass transfer
! between two species every lsynctime seconds
...
...
@@ -165,7 +166,7 @@ subroutine timemanager
! changed by Petra Seibert 9/02
!********************************************************************
if
(
mp_d
ev
_mode
)
write
(
*
,
*
)
'myid, itime: '
,
mp_pid
,
itime
if
(
mp_d
bg
_mode
)
write
(
*
,
*
)
'myid, itime: '
,
mp_pid
,
itime
if
(
WETDEP
.and.
itime
.ne.
0
.and.
numpart
.gt.
0
)
then
if
(
verbosity
.gt.
0
)
then
...
...
@@ -274,6 +275,12 @@ subroutine timemanager
if
(
mp_measure_time
.and..not.
(
lmpreader
.and.
lmp_use_reader
))
call
mpif_mtime
(
'getfields'
,
1
)
! For validation and tests: call the function below to set all fields to simple
! homogeneous values
! if (mp_dev_mode) call set_fields_synthetic
!*******************************************************************************
if
(
lmpreader
.and.
nstop1
.gt.
1
)
stop
'NO METEO FIELDS AVAILABLE'
! Reader process goes back to top of time loop (unless simulation end)
...
...
@@ -325,6 +332,11 @@ subroutine timemanager
endif
! Check if particles should be redistributed among processes
!***********************************************************
call
mpif_calculate_part_redist
(
itime
)
! Compute convective mixing for forward runs
! for backward runs it is done before next windfield is read in
!**************************************************************
...
...
@@ -541,20 +553,20 @@ subroutine timemanager
! Decide whether to write an estimate of the number of particles released,
! or exact number (require MPI reduce operation)
if
(
mp_d
ev
_mode
)
then
if
(
mp_d
bg
_mode
)
then
numpart_tot_mpi
=
numpart
else
numpart_tot_mpi
=
numpart
*
mp_partgroup_np
end
if
if
(
mp_exact_numpart
.and..not.
(
lmpreader
.and.
lmp_use_reader
)
.and.
&
&
.not.
mp_d
ev
_mode
)
then
&
.not.
mp_d
bg
_mode
)
then
call
MPI_Reduce
(
numpart
,
numpart_tot_mpi
,
1
,
MPI_INTEGER
,
MPI_SUM
,
id_root
,
&
&
mp_comm_used
,
mp_ierr
)
endif
!CGZ-lifetime: output species lifetime
if
(
lroot
.or.
mp_d
ev
_mode
)
then
if
(
lroot
.or.
mp_d
bg
_mode
)
then
! write(*,*) 'Overview species lifetime in days', &
! real((species_lifetime(:,1)/species_lifetime(:,2))/real(3600.0*24.0))
! write(*,*) 'all info:',species_lifetime
...
...
@@ -565,6 +577,10 @@ subroutine timemanager
! end if
end
if
! Write particles for all processes
if
(
mp_dev_mode
)
write
(
*
,
*
)
"PID, itime, numpart"
,
mp_pid
,
itime
,
numpart
45
format
(
i13
,
' SECONDS SIMULATED: '
,
i13
,
' PARTICLES: Uncertainty: '
,
3f7.3
)
46
format
(
' Simulated '
,
f7.1
,
' hours ('
,
i13
,
' s), '
,
i13
,
' particles'
)
if
(
ipout
.ge.
1
)
then
...
...
Write
Preview
Markdown
is supported
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