Changeset 1070b4c in flexpart.git for src/mpi_mod.f90


Ignore:
Timestamp:
Aug 27, 2020, 9:51:56 PM (4 years ago)
Author:
Espen Sollum ATMOS <eso@…>
Branches:
GFS_025, dev
Children:
b0ecb61
Parents:
8c0ae9b (diff), a803521 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'espen' into dev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mpi_mod.f90

    r92fab65 ra803521  
    25792579601 end subroutine mpif_tm_reduce_grid_nest
    25802580
     2581
     2582  subroutine mpif_tm_reduce_initcond
     2583!***********************************************************************
     2584! Collect init_cond to PID 0, adding from all processes.
     2585!
     2586!
     2587!***********************************************************************
     2588    use com_mod
     2589    use unc_mod
     2590    use par_mod
     2591
     2592    implicit none
     2593
     2594    integer :: grid_size
     2595
     2596!**********************************************************************
     2597
     2598    grid_size=numxgrid*numygrid*numzgrid*maxspec* &
     2599         & maxpointspec_act
     2600
     2601! Time for MPI communications
     2602    if (mp_measure_time) call mpif_mtime('commtime',0)
     2603
     2604
     2605#ifdef USE_MPIINPLACE
     2606! Using in-place reduction
     2607    if (lroot) then
     2608      call MPI_Reduce(MPI_IN_PLACE, init_cond, grid_size, mp_sp, MPI_SUM, id_root, &
     2609           & mp_comm_used, mp_ierr)
     2610      if (mp_ierr /= 0) goto 600
     2611    else
     2612      call MPI_Reduce(init_cond, 0, grid_size, mp_sp, MPI_SUM, id_root, &
     2613           & mp_comm_used, mp_ierr)
     2614      if (mp_ierr /= 0) goto 600
     2615    end if
     2616
     2617#else
     2618    call MPI_Reduce(init_cond, init_cond0, grid_size, mp_sp, MPI_SUM, id_root, &
     2619         & mp_comm_used, mp_ierr)
     2620    if (mp_ierr /= 0) goto 600
     2621!    if (lroot) init_cond = init_cond0
     2622#endif
     2623
     2624    if (mp_measure_time) call mpif_mtime('commtime',1)
     2625
     2626    goto 601
     2627
     2628600 write(*,*) "mpi_mod> mp_ierr \= 0", mp_ierr
     2629    stop
     2630
     2631601 end subroutine mpif_tm_reduce_initcond
     2632   
    25812633
    25822634  subroutine mpif_mtime(ident,imode)
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG