Changes in src/mpi_mod.f90 [92fab65:f3054ea] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mpi_mod.f90
r92fab65 rf3054ea 1 ! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt 2 ! SPDX-License-Identifier: GPL-3.0-or-later 1 !********************************************************************** 2 ! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010 * 3 ! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa, * 4 ! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann * 5 ! * 6 ! This file is part of FLEXPART. * 7 ! * 8 ! FLEXPART is free software: you can redistribute it and/or modify * 9 ! it under the terms of the GNU General Public License as published by* 10 ! the Free Software Foundation, either version 3 of the License, or * 11 ! (at your option) any later version. * 12 ! * 13 ! FLEXPART is distributed in the hope that it will be useful, * 14 ! but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 ! GNU General Public License for more details. * 17 ! * 18 ! You should have received a copy of the GNU General Public License * 19 ! along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. * 20 !********************************************************************** 3 21 4 22 module mpi_mod … … 2579 2597 601 end subroutine mpif_tm_reduce_grid_nest 2580 2598 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 2646 600 write(*,*) "mpi_mod> mp_ierr \= 0", mp_ierr 2647 stop 2648 2649 601 end subroutine mpif_tm_reduce_initcond 2650 2581 2651 2582 2652 subroutine mpif_mtime(ident,imode)
Note: See TracChangeset
for help on using the changeset viewer.