Changeset d6a0977 in flexpart.git for src/mpi_mod.f90


Ignore:
Timestamp:
Dec 14, 2015, 3:10:04 PM (8 years ago)
Author:
Espen Sollum ATMOS <eso@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
Children:
f75967d
Parents:
88d8c3d
Message:

Updates to Henrik's wet depo scheme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mpi_mod.f90

    ra1f4dd6 rd6a0977  
    8989! MPI tags/requests for send/receive operation
    9090  integer :: tm1
    91   integer, parameter :: nvar_async=27 !29 :DBG:
     91  integer, parameter :: nvar_async=26 !27 !29 :DBG:
    9292!integer, dimension(:), allocatable :: tags
    9393  integer, dimension(:), allocatable :: reqs
     
    119119  logical, parameter :: mp_dbg_out = .false.
    120120  logical, parameter :: mp_time_barrier=.true.
    121   logical, parameter :: mp_measure_time=.true.
     121  logical, parameter :: mp_measure_time=.false.
    122122  logical, parameter :: mp_exact_numpart=.true.
    123123
     
    207207      write(*,FMT='(80("#"))')
    208208! Force "syncronized" version if all processes will call getfields
    209     else if (.not.lmp_sync.and.mp_np.lt.read_grp_min) then
     209    else if ((.not.lmp_sync.and.mp_np.lt.read_grp_min).or.(mp_np.eq.1)) then
    210210      if (lroot) then
    211211        write(*,FMT='(80("#"))')
     
    963963! cloud water/ice:
    964964    if (readclouds) then
    965       call MPI_Bcast(clwc(:,:,:,li:ui),d3s1,mp_pp,id_read,MPI_COMM_WORLD,mp_ierr)
    966       if (mp_ierr /= 0) goto 600
    967       call MPI_Bcast(ciwc(:,:,:,li:ui),d3s1,mp_pp,id_read,MPI_COMM_WORLD,mp_ierr)
    968       if (mp_ierr /= 0) goto 600
     965      call MPI_Bcast(icloud_stats(:,:,:,li:ui),d2_size1*5,mp_pp,id_read,MPI_COMM_WORLD,mp_ierr)
     966      if (mp_ierr /= 0) goto 600
     967
     968      ! call MPI_Bcast(clwc(:,:,:,li:ui),d3s1,mp_pp,id_read,MPI_COMM_WORLD,mp_ierr)
     969      ! if (mp_ierr /= 0) goto 600
     970      ! call MPI_Bcast(ciwc(:,:,:,li:ui),d3s1,mp_pp,id_read,MPI_COMM_WORLD,mp_ierr)
     971      ! if (mp_ierr /= 0) goto 600
    969972    end if
    970973
     
    11891192!
    11901193! TODO
    1191 !   Transfer cloud water/ice
    11921194!
    11931195!*******************************************************************************
     
    13341336      if (readclouds) then
    13351337        i=i+1
    1336         call MPI_Isend(clwc(:,:,:,mind),d3s1,mp_pp,dest,tm1,&
     1338        call MPI_Isend(icloud_stats(:,:,:,mind),d2s1*5,mp_pp,dest,tm1,&
    13371339             &MPI_COMM_WORLD,reqs(i),mp_ierr)
    13381340        if (mp_ierr /= 0) goto 600
    1339         i=i+1
    1340 
    1341         call MPI_Isend(ciwc(:,:,:,mind),d3s1,mp_pp,dest,tm1,&
    1342              &MPI_COMM_WORLD,reqs(i),mp_ierr)
    1343         if (mp_ierr /= 0) goto 600
    1344 ! else
    1345 !   i=i+2
     1341
     1342        ! call MPI_Isend(clwc(:,:,:,mind),d3s1,mp_pp,dest,tm1,&
     1343        !      &MPI_COMM_WORLD,reqs(i),mp_ierr)
     1344        ! if (mp_ierr /= 0) goto 600
     1345        ! i=i+1
     1346
     1347        ! call MPI_Isend(ciwc(:,:,:,mind),d3s1,mp_pp,dest,tm1,&
     1348        !      &MPI_COMM_WORLD,reqs(i),mp_ierr)
     1349        ! if (mp_ierr /= 0) goto 600
     1350
    13461351      end if
    1347 
    13481352    end do
    13491353
     
    13711375!
    13721376! TODO
    1373 !   Transfer cloud water/ice
    13741377!
    13751378!*******************************************************************************
     
    13901393!    integer :: d3s1,d3s2,d2s1,d2s2
    13911394!*******************************************************************************
    1392 
    1393 ! :TODO: don't need these
    1394 ! d3s1=d3_size1
    1395 ! d3s2=d3_size2
    1396 ! d2s1=d2_size1
    1397 ! d2s2=d2_size2
    13981395
    13991396! At the time this immediate receive is posted, memstat is the state of
     
    15451542    if (readclouds) then
    15461543      j=j+1
    1547       call MPI_Irecv(clwc(:,:,:,mind),d3s1,mp_pp,id_read,MPI_ANY_TAG,&
    1548            &MPI_COMM_WORLD,reqs(j),mp_ierr)   
    1549       if (mp_ierr /= 0) goto 600
    1550       j=j+1
    1551       call MPI_Irecv(ciwc(:,:,:,mind),d3s1,mp_pp,id_read,MPI_ANY_TAG,&
    1552            &MPI_COMM_WORLD,reqs(j),mp_ierr)   
    1553       if (mp_ierr /= 0) goto 600
     1544
     1545      call MPI_Irecv(icloud_stats(:,:,:,mind),d2s1*5,mp_pp,id_read,MPI_ANY_TAG,&
     1546           &MPI_COMM_WORLD,reqs(j),mp_ierr)
     1547      if (mp_ierr /= 0) goto 600
     1548
     1549      ! call MPI_Irecv(clwc(:,:,:,mind),d3s1,mp_pp,id_read,MPI_ANY_TAG,&
     1550      !      &MPI_COMM_WORLD,reqs(j),mp_ierr)   
     1551      ! if (mp_ierr /= 0) goto 600
     1552      ! j=j+1
     1553      ! call MPI_Irecv(ciwc(:,:,:,mind),d3s1,mp_pp,id_read,MPI_ANY_TAG,&
     1554      !      &MPI_COMM_WORLD,reqs(j),mp_ierr)   
     1555      ! if (mp_ierr /= 0) goto 600
     1556
    15541557    end if
    15551558
     
    20892092    implicit none
    20902093
    2091     integer, parameter :: li=1, ui=3 ! wfmem indices (i.e, operate on entire field)
     2094    integer :: li=1, ui=2 ! wfmem indices (i.e, operate on entire field)
     2095
     2096    if (.not.lmp_sync) ui=3
    20922097
    20932098
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG