Changeset 6a678e3 in flexpart.git for src/mpi_mod.f90
- Timestamp:
- Jan 25, 2016, 2:17:34 PM (8 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
- Children:
- 26f6039
- Parents:
- fddc6ec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mpi_mod.f90
rfdc0f03 r6a678e3 53 53 ! unless a dedicated process runs getfields/readwind * 54 54 ! lmp_sync If .false., use asynchronous MPI * 55 ! mp_cp Real precision to use for deposition fields * 55 56 ! * 56 57 ! * … … 84 85 integer :: mp_seed=0 85 86 integer, parameter :: mp_sp=MPI_REAL4, mp_dp=MPI_REAL8 86 integer , parameter :: mp_pp=mp_sp87 integer :: mp_cp 87 88 integer, parameter :: id_root=0 ! master process 88 89 … … 163 164 ! mp_np number of running processes, decided at run-time 164 165 !*********************************************************************** 165 use par_mod, only: maxpart, numwfmem 166 use par_mod, only: maxpart, numwfmem, dep_prec 166 167 use com_mod, only: mpi_mode 167 168 … … 170 171 integer :: i,j,s,addmaxpart=0 171 172 172 ! each process gets an ID (mp_pid) in the range 0,..,mp_np-1173 ! Each process gets an ID (mp_pid) in the range 0,..,mp_np-1 173 174 call MPI_INIT(mp_ierr) 174 175 if (mp_ierr /= 0) goto 100 … … 179 180 180 181 181 ! this variable is used to handle subroutines common to parallel/serial version182 ! Variable mpi_mode is used to handle subroutines common to parallel/serial version 182 183 if (lmp_sync) then 183 184 mpi_mode=2 ! hold 2 windfields in memory … … 188 189 if (mp_pid.ne.0) then 189 190 lroot = .false. 191 end if 192 193 ! Set MPI precision to use for transferring deposition fields 194 !************************************************************ 195 if (dep_prec==dp) then 196 mp_cp = MPI_REAL8 197 if (lroot) write(*,*) 'Using double precision for deposition fields' 198 else if (dep_prec==sp) then 199 mp_cp = MPI_REAL4 200 if (lroot) write(*,*) 'Using single precision for deposition fields' 201 else 202 write(*,*) 'ERROR: something went wrong setting MPI real precision' 203 stop 190 204 end if 191 205 … … 1671 1685 1672 1686 if ((WETDEP).and.(ldirect.gt.0)) then 1673 call MPI_Reduce(wetgridunc, wetgridunc0, grid_size2d, mp_ sp, MPI_SUM, id_root, &1687 call MPI_Reduce(wetgridunc, wetgridunc0, grid_size2d, mp_cp, MPI_SUM, id_root, & 1674 1688 & mp_comm_used, mp_ierr) 1675 1689 if (mp_ierr /= 0) goto 600 … … 1677 1691 1678 1692 if ((DRYDEP).and.(ldirect.gt.0)) then 1679 call MPI_Reduce(drygridunc, drygridunc0, grid_size2d, mp_ sp, MPI_SUM, id_root, &1693 call MPI_Reduce(drygridunc, drygridunc0, grid_size2d, mp_cp, MPI_SUM, id_root, & 1680 1694 & mp_comm_used, mp_ierr) 1681 1695 if (mp_ierr /= 0) goto 600 … … 1747 1761 1748 1762 if ((WETDEP).and.(ldirect.gt.0)) then 1749 call MPI_Reduce(wetgriduncn, wetgriduncn0, grid_size2d, mp_ sp, MPI_SUM, id_root, &1763 call MPI_Reduce(wetgriduncn, wetgriduncn0, grid_size2d, mp_cp, MPI_SUM, id_root, & 1750 1764 & mp_comm_used, mp_ierr) 1751 1765 if (mp_ierr /= 0) goto 600 … … 1753 1767 1754 1768 if ((DRYDEP).and.(ldirect.gt.0)) then 1755 call MPI_Reduce(drygriduncn, drygriduncn0, grid_size2d, mp_ sp, MPI_SUM, id_root, &1769 call MPI_Reduce(drygriduncn, drygriduncn0, grid_size2d, mp_cp, MPI_SUM, id_root, & 1756 1770 & mp_comm_used, mp_ierr) 1757 1771 if (mp_ierr /= 0) goto 600
Note: See TracChangeset
for help on using the changeset viewer.