Changeset 1228ef7 in flexpart.git for src/releaseparticles_mpi.f90


Ignore:
Timestamp:
Aug 2, 2021, 12:11:23 PM (3 years ago)
Author:
Espen Sollum <eso@…>
Branches:
dev
Parents:
6cb0801
Message:

MPI: fix for mquasilag output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/releaseparticles_mpi.f90

    r92fab65 r1228ef7  
    5151  real(kind=dp) :: juldate,julmonday,jul,jullocal,juldiff
    5252  real,parameter :: eps=nxmax/3.e5,eps2=1.e-6
    53   integer :: mind2
     53  integer :: mind2, numpartcount_mpi
    5454! mind2        eso: pointer to 2nd windfield in memory
    55 
    5655  integer :: idummy = -7
    5756!save idummy,xmasssave
     
    6059  logical :: first_call=.true.
    6160
    62 ! Use different seed for each process.
    63 !****************************************************************************
     61! Use different random seed for each process
     62!*******************************************
    6463  if (first_call) then
    6564    idummy=idummy+mp_seed
     
    6867
    6968  mind2=memind(2)
     69
     70! For mquasilag=1, assign unique particle ID across processes
     71  numpartcount_mpi=mp_partid-mp_partgroup_np+1
    7072
    7173! Determine the actual date and time in Greenwich (i.e., UTC + correction for daylight savings time)
     
    210212                 nclassunc)
    211213            numparticlecount=numparticlecount+1
     214! Use a stride equal to number of processes for the MPI version
     215            numpartcount_mpi=numpartcount_mpi+mp_partgroup_np
    212216            if (mquasilag.eq.0) then
    213217              npoint(ipart)=i
    214218            else
    215               npoint(ipart)=numparticlecount
     219              npoint(ipart)=numpartcount_mpi
    216220            endif
    217221            idt(ipart)=mintime               ! first time step
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG