Changes in src/mpi_mod.f90 [f3054ea:92fab65] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mpi_mod.f90
rf3054ea r92fab65 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 !********************************************************************** 1 ! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt 2 ! SPDX-License-Identifier: GPL-3.0-or-later 21 3 22 4 module mpi_mod … … 2597 2579 601 end subroutine mpif_tm_reduce_grid_nest 2598 2580 2599 2600 subroutine mpif_tm_reduce_initcond2601 !***********************************************************************2602 ! Collect init_cond to PID 0, adding from all processes.2603 !2604 !2605 !***********************************************************************2606 use com_mod2607 use unc_mod2608 use par_mod2609 2610 implicit none2611 2612 integer :: grid_size2613 2614 !**********************************************************************2615 2616 grid_size=numxgrid*numygrid*numzgrid*maxspec* &2617 & maxpointspec_act2618 2619 ! Time for MPI communications2620 if (mp_measure_time) call mpif_mtime('commtime',0)2621 2622 2623 #ifdef USE_MPIINPLACE2624 ! Using in-place reduction2625 if (lroot) then2626 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 6002629 else2630 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 6002633 end if2634 2635 #else2636 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 6002639 ! if (lroot) init_cond = init_cond02640 #endif2641 2642 if (mp_measure_time) call mpif_mtime('commtime',1)2643 2644 goto 6012645 2646 600 write(*,*) "mpi_mod> mp_ierr \= 0", mp_ierr2647 stop2648 2649 601 end subroutine mpif_tm_reduce_initcond2650 2651 2581 2652 2582 subroutine mpif_mtime(ident,imode)
Note: See TracChangeset
for help on using the changeset viewer.