Changeset 4429 for palm/trunk/SOURCE/poismg_mod.f90
- Timestamp:
- Feb 27, 2020 3:24:30 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/poismg_mod.f90
r4360 r4429 25 25 ! ----------------- 26 26 ! $Id$ 27 ! statement added to avoid compile error due to unused dummy argument 28 ! bugfix: cpp-directives added for serial mode 29 ! 30 ! 4360 2020-01-07 11:25:50Z suehring 27 31 ! Corrected "Former revisions" section 28 32 ! … … 1210 1214 !> Gather subdomain data from all PEs. 1211 1215 !------------------------------------------------------------------------------! 1216 #if defined( __parallel ) 1212 1217 SUBROUTINE mg_gather( f2, f2_sub ) 1213 1218 … … 1244 1249 1245 1250 1246 #if defined( __parallel )1247 1251 CALL cpu_log( log_point_s(34), 'mg_gather', 'start' ) 1248 1252 … … 1279 1283 1280 1284 CALL cpu_log( log_point_s(34), 'mg_gather', 'stop' ) 1281 #endif1282 1285 1283 1286 END SUBROUTINE mg_gather 1284 1287 #endif 1285 1288 1286 1289 … … 1291 1294 !> non-blocking communication 1292 1295 !------------------------------------------------------------------------------! 1296 #if defined( __parallel ) 1293 1297 SUBROUTINE mg_scatter( p2, p2_sub ) 1294 1298 … … 1303 1307 1304 1308 IMPLICIT NONE 1305 1306 INTEGER(iwp) :: nwords !<1307 1309 1308 1310 REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1, & … … 1314 1316 mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) :: p2_sub !< 1315 1317 1316 ! 1317 !-- Find out the number of array elements of the subdomain array 1318 nwords = SIZE( p2_sub ) 1319 1320 #if defined( __parallel ) 1318 1321 1319 CALL cpu_log( log_point_s(35), 'mg_scatter', 'start' ) 1322 1320 … … 1325 1323 1326 1324 CALL cpu_log( log_point_s(35), 'mg_scatter', 'stop' ) 1327 #endif1328 1325 1329 1326 END SUBROUTINE mg_scatter 1330 1327 #endif 1331 1328 1332 1329 !------------------------------------------------------------------------------! … … 1383 1380 1384 1381 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: f2_sub !< 1382 1383 #if defined( __parallel ) 1385 1384 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: p2_sub !< 1385 #endif 1386 1386 1387 1387 ! … … 1472 1472 ! 1473 1473 !-- Gather all arrays from the subdomains on PE0 1474 #if defined( __parallel ) 1474 1475 CALL mg_gather( f2, f2_sub ) 1476 #endif 1475 1477 1476 1478 ! … … 1760 1762 1761 1763 USE control_parameters, & 1762 ONLY: grid_level, mg_switch_to_pe0_level, synchronous_exchange 1764 ONLY: grid_level 1765 1766 #if defined( __parallel ) 1767 USE control_parameters, & 1768 ONLY: mg_switch_to_pe0_level, synchronous_exchange 1769 #endif 1763 1770 1764 1771 USE indices, & 1765 ONLY: nxl, nxl_mg, nxr, nxr_mg, nys, nys_mg, nyn, & 1766 nyn_mg, nzb, nzt, nzt_mg 1772 ONLY: nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg 1773 1774 #if defined( __parallel ) 1775 USE indices, & 1776 ONLY: nxl, nxr, nys, nyn, nzt 1777 #endif 1767 1778 1768 1779 IMPLICIT NONE … … 1773 1784 p_mg !< treated array 1774 1785 1775 INTEGER(iwp), intent(IN) :: color !< flag for grid point type (red or black) 1786 INTEGER(iwp), INTENT(IN) :: color !< flag for grid point type (red or black) 1787 1788 #if defined ( __parallel ) 1776 1789 ! 1777 1790 !-- Local variables … … 1794 1807 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: temp !< temporary array on next coarser grid level 1795 1808 1796 #if defined ( __parallel )1797 1809 synchronous_exchange_save = synchronous_exchange 1798 1810 synchronous_exchange = .FALSE. … … 2261 2273 2262 2274 IF ( i == nxl_mg(l) ) THEN 2263 !DIR$ IVDEP 2275 !DIR$ IVDEP INTEGER(iwp) :: ngp !< 2276 2264 2277 DO k = nzb+1, ind_even_odd 2265 2278 p_mg(k,j,nxr_mg(l)+1) = temp(k,j1,ixr+1) … … 2299 2312 2300 2313 ! 2314 !-- Next line is to avoid compile error due to unused dummy argument 2315 IF ( color == 1234567 ) RETURN 2316 ! 2301 2317 !-- Standard horizontal ghost boundary exchange for small coarse grid 2302 2318 !-- levels, where the transfer time is latency bound
Note: See TracChangeset
for help on using the changeset viewer.