Changeset 702 for palm/trunk/SOURCE
- Timestamp:
- Mar 24, 2011 7:33:15 PM (14 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/exchange_horiz_2d.f90
r668 r702 4 4 ! Current revisions: 5 5 ! ----------------- 6 ! 7 ! Bugfix in declaration of ar in exchange_horiz_2d_int and number of MPI-blocks 8 ! in MPI_SENDRECV(). 6 9 ! 7 10 ! Former revisions: … … 55 58 !-- One-dimensional decomposition along y, boundary values can be exchanged 56 59 !-- within the PE memory 57 ar(:,nxl -nbgp:nxl-1) = ar(:,nxr-nbgp+1:nxr)58 ar(:,nxr+1:nxr +nbgp) = ar(:,nxl:nxl+nbgp-1)60 ar(:,nxlg:nxl-1) = ar(:,nxr-nbgp+1:nxr) 61 ar(:,nxr+1:nxrg) = ar(:,nxl:nxl+nbgp-1) 59 62 60 63 ELSE … … 62 65 !-- Send left boundary, receive right one 63 66 64 CALL MPI_SENDRECV( ar(nysg,nxl), 1, type_y, pleft, 0, &65 ar(nysg,nxr+1), 1, type_y, pright, 0, &67 CALL MPI_SENDRECV( ar(nysg,nxl), 1, type_y, pleft, 0, & 68 ar(nysg,nxr+1), 1, type_y, pright, 0, & 66 69 comm2d, status, ierr ) 67 70 ! 68 71 !-- Send right boundary, receive left one 69 CALL MPI_SENDRECV( ar(nysg,nxr+1-nbgp), 1, type_y, pright, 1, & 70 ar(nysg,nxlg), 1, type_y, pleft, 1, & 71 comm2d, status, ierr ) 72 CALL MPI_SENDRECV( ar(nysg,nxr+1-nbgp), 1, type_y, pright, 1, & 73 ar(nysg,nxlg), 1, type_y, pleft, 1, & 74 comm2d, status, ierr ) 75 76 72 77 ENDIF 73 78 … … 76 81 !-- One-dimensional decomposition along x, boundary values can be exchanged 77 82 !-- within the PE memory 78 ar(nys -nbgp:nys-1,:) = ar(nyn-nbgp+1:nyn,:)79 ar(nyn+1:nyn +nbgp,:) = ar(nys:nys+nbgp-1,:)83 ar(nysg:nys-1,:) = ar(nyn-nbgp+1:nyn,:) 84 ar(nyn+1:nyng,:) = ar(nys:nys+nbgp-1,:) 80 85 81 86 ELSE … … 83 88 !-- Send front boundary, receive rear one 84 89 85 CALL MPI_SENDRECV( ar(nys,nxlg), 1, type_x, psouth, 0, & !replace number of sended elements from86 ar(nyn+1,nxlg), 1, type_x, pnorth, 0, & ! nbgp to 190 CALL MPI_SENDRECV( ar(nys,nxlg), 1, type_x, psouth, 0, & 91 ar(nyn+1,nxlg), 1, type_x, pnorth, 0, & 87 92 comm2d, status, ierr ) 88 93 ! 89 94 !-- Send rear boundary, receive front one 90 CALL MPI_SENDRECV( ar(nyn+1-nbgp,nxlg), 1, type_x, pnorth, 1, &91 ar(nysg,nxlg), 1, type_x, psouth, 1, &95 CALL MPI_SENDRECV( ar(nyn+1-nbgp,nxlg), 1, type_x, pnorth, 1, & 96 ar(nysg,nxlg), 1, type_x, psouth, 1, & 92 97 comm2d, status, ierr ) 93 98 … … 99 104 !-- Lateral boundary conditions in the non-parallel case 100 105 IF ( bc_lr == 'cyclic' ) THEN 101 ar(:,nxl -nbgp:nxl-1) = ar(:,nxr-nbgp+1:nxr)102 ar(:,nxr+1:nxr +nbgp) = ar(:,nxl:nxl+nbgp-1)106 ar(:,nxlg:nxl-1) = ar(:,nxr-nbgp+1:nxr) 107 ar(:,nxr+1:nxrg) = ar(:,nxl:nxl+nbgp-1) 103 108 ENDIF 104 109 105 110 IF ( bc_ns == 'cyclic' ) THEN 106 ar(nys -nbgp:nys-1,:) = ar(nyn-nbgp+1:nyn,:)107 ar(nyn+1:nyn +nbgp,:) = ar(nys:nys+nbgp-1,:)111 ar(nysg:nys-1,:) = ar(nyn-nbgp+1:nyn,:) 112 ar(nyn+1:nyng,:) = ar(nys:nys+nbgp-1,:) 108 113 ENDIF 109 114 … … 157 162 IMPLICIT NONE 158 163 159 REAL:: ar(nysg:nyng,nxlg:nxrg)164 INTEGER :: ar(nysg:nyng,nxlg:nxrg) 160 165 INTEGER :: i 161 162 163 166 164 167 CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'start' ) … … 173 176 !-- One-dimensional decomposition along y, boundary values can be exchanged 174 177 !-- within the PE memory 175 ar(nys:nyn,nxl-1) = ar(nys:nyn,nxr) 176 ar(nys:nyn,nxr+1) = ar(nys:nyn,nxl) 178 ar(:,nxlg:nxl-1) = ar(:,nxr-nbgp+1:nxr) 179 ar(:,nxr+1:nxrg) = ar(:,nxl:nxl+nbgp-1) 180 177 181 178 182 ELSE 179 183 ! 180 184 !-- Send left boundary, receive right one 181 CALL MPI_SENDRECV( ar(nysg,nxl), 1, type_y_int, pleft, 0, &182 ar(nysg,nxr+1), 1, type_y_int, pright, 0, &185 CALL MPI_SENDRECV( ar(nysg,nxl), 1, type_y_int, pleft, 0, & 186 ar(nysg,nxr+1), 1, type_y_int, pright, 0, & 183 187 comm2d, status, ierr ) 184 188 ! 185 189 !-- Send right boundary, receive left one 186 CALL MPI_SENDRECV( ar(nysg,nxr+1-nbgp), 1, type_y_int, pright, 1, &187 ar(nysg,nxlg), 1, type_y_int, pleft, 1, &190 CALL MPI_SENDRECV( ar(nysg,nxr+1-nbgp), 1, type_y_int, pright, 1, & 191 ar(nysg,nxlg), 1, type_y_int, pleft, 1, & 188 192 comm2d, status, ierr ) 189 193 … … 201 205 ! 202 206 !-- Send front boundary, receive rear one 203 CALL MPI_SENDRECV( ar(nys,nxlg), 1, type_x_int, psouth, 0,&204 ar(nyn+1,nxlg), 1, type_x_int, pnorth, 0,&205 comm2d, status, ierr ) 207 CALL MPI_SENDRECV( ar(nys,nxlg), 1, type_x_int, psouth, 0, & 208 ar(nyn+1,nxlg), 1, type_x_int, pnorth, 0, & 209 comm2d, status, ierr ) 206 210 207 211 ! 208 212 !-- Send rear boundary, receive front one 209 CALL MPI_SENDRECV( ar(nyn+1-nbgp,nxlg), nbgp, type_x_int, pnorth, 1,&210 ar(nysg,nxlg), nbgp, type_x_int, psouth, 1,&213 CALL MPI_SENDRECV( ar(nyn+1-nbgp,nxlg), 1, type_x_int, pnorth, 1, & 214 ar(nysg,nxlg), 1, type_x_int, psouth, 1, & 211 215 comm2d, status, ierr ) 212 216 … … 218 222 !-- Lateral boundary conditions in the non-parallel case 219 223 IF ( bc_lr == 'cyclic' ) THEN 220 ar( nys:nyn,nxl-1) = ar(nys:nyn,nxr)221 ar( nys:nyn,nxr+1) = ar(nys:nyn,nxl)224 ar(:,nxlg:nxl-1) = ar(:,nxr-nbgp+1:nxr) 225 ar(:,nxr+1:nxrg) = ar(:,nxl:nxl+nbgp-1) 222 226 ENDIF 223 227 … … 228 232 229 233 #endif 230 231 234 CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'stop' ) 232 235 -
palm/trunk/SOURCE/user_read_restart_data.f90
r668 r702 7 7 ! Current revisions: 8 8 ! ----------------- 9 ! 10 ! nys-1, nyn+1, nxl-1, nxr+1 changed to nysg, nyng, nxlg, nxrg. 9 11 ! 10 12 ! Former revisions: … … 82 84 ! CASE ( 'u2_av' ) 83 85 ! IF ( .NOT. ALLOCATED( u2_av ) ) THEN 84 ! ALLOCATE( u2_av(nzb:nzt+1,nys -1:nyn+1,nxl-1:nxr+1) )86 ! ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 85 87 ! ENDIF 86 88 ! IF ( k == 1 ) READ ( 13 ) tmp_3d 87 ! u2_av(:,nysc- 1:nync+1,nxlc-1:nxrc+1) = &88 ! tmp_3d(:,nysf- 1:nynf+1,nxlf-1:nxrf+1)89 ! u2_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 90 ! tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 89 91 ! 90 92 ! CASE DEFAULT
Note: See TracChangeset
for help on using the changeset viewer.