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


Ignore:
Timestamp:
Aug 27, 2020, 8:00:15 PM (4 years ago)
Author:
Espen Sollum <eso@…>
Branches:
GFS_025, dev
Children:
4ab2fbf
Parents:
a756649
Message:

Changed from grib_api to eccodes. MPI: implemented linversionout=1; fixed calculation of grid_initial fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mpi_mod.f90

    r0c8c7f2 rf3054ea  
    25972597601 end subroutine mpif_tm_reduce_grid_nest
    25982598
     2599
     2600  subroutine mpif_tm_reduce_initcond
     2601!***********************************************************************
     2602! Collect init_cond to PID 0, adding from all processes.
     2603!
     2604!
     2605!***********************************************************************
     2606    use com_mod
     2607    use unc_mod
     2608    use par_mod
     2609
     2610    implicit none
     2611
     2612    integer :: grid_size
     2613
     2614!**********************************************************************
     2615
     2616    grid_size=numxgrid*numygrid*numzgrid*maxspec* &
     2617         & maxpointspec_act
     2618
     2619! Time for MPI communications
     2620    if (mp_measure_time) call mpif_mtime('commtime',0)
     2621
     2622
     2623#ifdef USE_MPIINPLACE
     2624! Using in-place reduction
     2625    if (lroot) then
     2626      call MPI_Reduce(MPI_IN_PLACE, init_cond, grid_size, mp_sp, MPI_SUM, id_root, &
     2627           & mp_comm_used, mp_ierr)
     2628      if (mp_ierr /= 0) goto 600
     2629    else
     2630      call MPI_Reduce(init_cond, 0, grid_size, mp_sp, MPI_SUM, id_root, &
     2631           & mp_comm_used, mp_ierr)
     2632      if (mp_ierr /= 0) goto 600
     2633    end if
     2634
     2635#else
     2636    call MPI_Reduce(init_cond, init_cond0, grid_size, mp_sp, MPI_SUM, id_root, &
     2637         & mp_comm_used, mp_ierr)
     2638    if (mp_ierr /= 0) goto 600
     2639!    if (lroot) init_cond = init_cond0
     2640#endif
     2641
     2642    if (mp_measure_time) call mpif_mtime('commtime',1)
     2643
     2644    goto 601
     2645
     2646600 write(*,*) "mpi_mod> mp_ierr \= 0", mp_ierr
     2647    stop
     2648
     2649601 end subroutine mpif_tm_reduce_initcond
     2650   
    25992651
    26002652  subroutine mpif_mtime(ident,imode)
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG