Changeset 4717 for palm/trunk/SOURCE/transpose.f90
- Timestamp:
- Sep 30, 2020 10:27:40 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/transpose.f90
r4540 r4717 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 23 ! 22 ! 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Formatting of OpenMP directives (J. Resler) 28 ! 29 ! 4540 2020-05-18 15:23:29Z raasch 27 30 ! File re-formatted to follow the PALM coding standard 28 !29 31 ! 30 32 ! 4429 2020-02-27 15:24:30Z raasch … … 197 199 ! 198 200 !-- Reorder transposed array 199 !$OMP PARALLEL PRIVATE ( i, j, k, l, ys )201 !$OMP PARALLEL PRIVATE ( i, j, k, l, ys ) 200 202 DO l = 0, pdims(2) - 1 201 203 ys = 0 + l * ( nyn_x - nys_x + 1 ) … … 214 216 !$OMP END DO NOWAIT 215 217 ENDDO 216 !$OMP END PARALLEL218 !$OMP END PARALLEL 217 219 #endif 218 220 … … 221 223 ! 222 224 !-- Reorder transposed array 223 !$OMP PARALLEL PRIVATE ( i, j, k )224 !$OMP DO225 !$OMP PARALLEL PRIVATE ( i, j, k ) 226 !$OMP DO 225 227 #if __acc_fft_device 226 228 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 234 236 ENDDO 235 237 ENDDO 236 !$OMP END PARALLEL238 !$OMP END PARALLEL 237 239 238 240 ENDIF … … 271 273 !-- Rearrange indices of input array in order to make data to be send by MPI contiguous. 272 274 !-- In case of parallel fft/transposition, scattered store is faster in backward direction!!! 273 !$OMP PARALLEL PRIVATE ( i, j, k )274 !$OMP DO275 #if __acc_fft_device 276 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) &277 !$ACC PRESENT(f_out, f_inv)275 !$OMP PARALLEL PRIVATE ( i, j, k ) 276 !$OMP DO 277 #if __acc_fft_device 278 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & 279 !$ACC PRESENT(f_out, f_inv) 278 280 #endif 279 281 DO i = nxl, nxr … … 430 432 ! 431 433 !-- Reorder the array in a way that the z index is in first position 432 !$OMPPARALLEL PRIVATE ( i, j, k )433 !$OMPDO434 !$OMP PARALLEL PRIVATE ( i, j, k ) 435 !$OMP DO 434 436 #if __acc_fft_device 435 437 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 443 445 ENDDO 444 446 ENDDO 445 !$OMPEND PARALLEL447 !$OMP END PARALLEL 446 448 447 449 ENDIF … … 481 483 ! 482 484 !-- Rearrange indices of input array in order to make data to be send by MPI contiguous. 483 !$OMP 484 !$OMP 485 !$OMP PARALLEL PRIVATE ( i, j, k ) 486 !$OMP DO 485 487 #if __acc_fft_device 486 488 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 494 496 ENDDO 495 497 ENDDO 496 !$OMP 498 !$OMP END PARALLEL 497 499 498 500 END SUBROUTINE resort_for_yx … … 560 562 ! 561 563 !-- Reorder input array for transposition 562 !$OMPPARALLEL PRIVATE ( i, j, k, l, ys )564 !$OMP PARALLEL PRIVATE ( i, j, k, l, ys ) 563 565 DO l = 0, pdims(2) - 1 564 566 ys = 0 + l * ( nyn_x - nys_x + 1 ) … … 577 579 !$OMP END DO NOWAIT 578 580 ENDDO 579 !$OMPEND PARALLEL581 !$OMP END PARALLEL 580 582 581 583 ! … … 610 612 ! 611 613 !-- Reorder array f_in the same way as ALLTOALL did it. 612 !$OMPPARALLEL PRIVATE ( i, j, k )613 !$OMPDO614 !$OMP PARALLEL PRIVATE ( i, j, k ) 615 !$OMP DO 614 616 #if __acc_fft_device 615 617 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 623 625 ENDDO 624 626 ENDDO 625 !$OMPEND PARALLEL627 !$OMP END PARALLEL 626 628 627 629 ENDIF … … 748 750 ! 749 751 !-- Rearrange indices of input array in order to make data to be send by MPI contiguous. 750 !$OMPPARALLEL PRIVATE ( i, j, k )751 !$OMPDO752 !$OMP PARALLEL PRIVATE ( i, j, k ) 753 !$OMP DO 752 754 #if __acc_fft_device 753 755 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 761 763 ENDDO 762 764 ENDDO 763 !$OMP 765 !$OMP END PARALLEL 764 766 765 767 END SUBROUTINE resort_for_yz … … 827 829 IF ( pdims(1) == 1 ) THEN 828 830 829 !$OMPPARALLEL PRIVATE ( i, j, k )830 !$OMPDO831 !$OMP PARALLEL PRIVATE ( i, j, k ) 832 !$OMP DO 831 833 #if __acc_fft_device 832 834 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 840 842 ENDDO 841 843 ENDDO 842 !$OMPEND PARALLEL844 !$OMP END PARALLEL 843 845 844 846 ELSE … … 873 875 ! 874 876 !-- Reorder transposed array 875 !$OMPPARALLEL PRIVATE ( i, j, k, l, zs )877 !$OMP PARALLEL PRIVATE ( i, j, k, l, zs ) 876 878 DO l = 0, pdims(1) - 1 877 879 zs = 1 + l * ( nzt_y - nzb_y + 1 ) … … 890 892 !$OMP END DO NOWAIT 891 893 ENDDO 892 !$OMPEND PARALLEL894 !$OMP END PARALLEL 893 895 #endif 894 896 … … 927 929 ! 928 930 !-- Rearrange indices of input array in order to make data to be send by MPI contiguous. 929 !$OMPPARALLEL PRIVATE ( i, j, k )930 !$OMPDO931 #if __acc_fft_device 932 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) &933 !$ACC PRESENT(f_in, f_inv)931 !$OMP PARALLEL PRIVATE ( i, j, k ) 932 !$OMP DO 933 #if __acc_fft_device 934 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & 935 !$ACC PRESENT(f_in, f_inv) 934 936 #endif 935 937 DO i = nxl, nxr … … 940 942 ENDDO 941 943 ENDDO 942 !$OMP 944 !$OMP END PARALLEL 943 945 944 946 END SUBROUTINE resort_for_zx … … 1016 1018 IF ( pdims(1) == 1 ) THEN 1017 1019 1018 !$OMPPARALLEL PRIVATE ( i, j, k )1019 !$OMPDO1020 !$OMP PARALLEL PRIVATE ( i, j, k ) 1021 !$OMP DO 1020 1022 #if __acc_fft_device 1021 1023 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 1029 1031 ENDDO 1030 1032 ENDDO 1031 !$OMPEND PARALLEL1033 !$OMP END PARALLEL 1032 1034 1033 1035 ELSE … … 1080 1082 ELSE 1081 1083 1082 !$OMP 1084 !$OMP PARALLEL PRIVATE ( i, j, k, l, xs ) 1083 1085 DO l = 0, pdims(1) - 1 1084 1086 xs = 0 + l * nnx … … 1097 1099 !$OMP END DO NOWAIT 1098 1100 ENDDO 1099 !$OMP 1101 !$OMP END PARALLEL 1100 1102 1101 1103 ENDIF … … 1139 1141 ! 1140 1142 !-- Rearrange indices of input array in order to make data to be send by MPI contiguous. 1141 !$OMP 1142 !$OMP 1143 !$OMP PARALLEL PRIVATE ( i, j, k ) 1144 !$OMP DO 1143 1145 #if __acc_fft_device 1144 1146 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 1152 1154 ENDDO 1153 1155 ENDDO 1154 !$OMP 1156 !$OMP END PARALLEL 1155 1157 1156 1158 END SUBROUTINE resort_for_zy … … 1220 1222 ! 1221 1223 !-- Reorder input array for transposition 1222 !$OMPPARALLEL PRIVATE ( i, j, k, l, zs )1224 !$OMP PARALLEL PRIVATE ( i, j, k, l, zs ) 1223 1225 DO l = 0, pdims(1) - 1 1224 1226 zs = 1 + l * ( nzt_y - nzb_y + 1 ) … … 1237 1239 !$OMP END DO NOWAIT 1238 1240 ENDDO 1239 !$OMPEND PARALLEL1241 !$OMP END PARALLEL 1240 1242 1241 1243 ! … … 1269 1271 ! 1270 1272 !-- Reorder the array in the same way like ALLTOALL did it 1271 !$OMPPARALLEL PRIVATE ( i, j, k )1272 !$OMPDO1273 !$OMP PARALLEL PRIVATE ( i, j, k ) 1274 !$OMP DO 1273 1275 #if __acc_fft_device 1274 1276 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i,j,k) & … … 1282 1284 ENDDO 1283 1285 ENDDO 1284 !$OMPEND PARALLEL1286 !$OMP END PARALLEL 1285 1287 1286 1288 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.