168 |
myPy = mpiPy+1 |
myPy = mpiPy+1 |
169 |
C-- Get MPI id for neighboring procs. |
C-- Get MPI id for neighboring procs. |
170 |
mpiGridSpec(1) = mpiPx-1 |
mpiGridSpec(1) = mpiPx-1 |
171 |
IF ( mpiPeriodicity(1) .EQ. _mpiTRUE_ .AND. mpiGridSpec(1) .LT. 0 ) |
IF ( mpiPeriodicity(1) .EQ. _mpiTRUE_ |
172 |
|
& .AND. mpiGridSpec(1) .LT. 0 ) |
173 |
& mpiGridSpec(1) = nPx-1 |
& mpiGridSpec(1) = nPx-1 |
174 |
mpiGridSpec(2) = mpiPy |
mpiGridSpec(2) = mpiPy |
175 |
CALL MPI_CART_RANK( mpiComm, mpiGridSpec, mpiPidW , mpiRC ) |
CALL MPI_CART_RANK( mpiComm, mpiGridSpec, mpiPidW , mpiRC ) |
183 |
ENDIF |
ENDIF |
184 |
pidW = mpiPidW |
pidW = mpiPidW |
185 |
mpiGridSpec(1) = mpiPx+1 |
mpiGridSpec(1) = mpiPx+1 |
186 |
IF ( mpiPeriodicity(1) .EQ. _mpiTRUE_ .AND. mpiGridSpec(1) .GT. nPx-1 ) |
IF ( mpiPeriodicity(1) .EQ. _mpiTRUE_ |
187 |
|
& .AND. mpiGridSpec(1) .GT. nPx-1 ) |
188 |
& mpiGridSpec(1) = 0 |
& mpiGridSpec(1) = 0 |
189 |
mpiGridSpec(2) = mpiPy |
mpiGridSpec(2) = mpiPy |
190 |
CALL MPI_CART_RANK( mpiComm, mpiGridSpec, mpiPidE , mpiRC ) |
CALL MPI_CART_RANK( mpiComm, mpiGridSpec, mpiPidE , mpiRC ) |
199 |
pidE = mpiPidE |
pidE = mpiPidE |
200 |
mpiGridSpec(1) = mpiPx |
mpiGridSpec(1) = mpiPx |
201 |
mpiGridSpec(2) = mpiPy-1 |
mpiGridSpec(2) = mpiPy-1 |
202 |
IF ( mpiPeriodicity(2) .EQ. _mpiTRUE_ .AND. mpiGridSpec(2) .LT. 0 ) |
IF ( mpiPeriodicity(2) .EQ. _mpiTRUE_ |
203 |
|
& .AND. mpiGridSpec(2) .LT. 0 ) |
204 |
& mpiGridSpec(2) = nPy - 1 |
& mpiGridSpec(2) = nPy - 1 |
205 |
CALL MPI_CART_RANK( mpiComm, mpiGridSpec, mpiPidS , mpiRC ) |
CALL MPI_CART_RANK( mpiComm, mpiGridSpec, mpiPidS , mpiRC ) |
206 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
214 |
pidS = mpiPidS |
pidS = mpiPidS |
215 |
mpiGridSpec(1) = mpiPx |
mpiGridSpec(1) = mpiPx |
216 |
mpiGridSpec(2) = mpiPy+1 |
mpiGridSpec(2) = mpiPy+1 |
217 |
IF ( mpiPeriodicity(2) .EQ. _mpiTRUE_ .AND. mpiGridSpec(2) .GT. nPy-1 ) |
IF ( mpiPeriodicity(2) .EQ. _mpiTRUE_ |
218 |
|
& .AND. mpiGridSpec(2) .GT. nPy-1 ) |
219 |
& mpiGridSpec(2) = 0 |
& mpiGridSpec(2) = 0 |
220 |
CALL MPI_CART_RANK( mpiComm, mpiGridSpec, mpiPidN , mpiRC ) |
CALL MPI_CART_RANK( mpiComm, mpiGridSpec, mpiPidN , mpiRC ) |
221 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
238 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
239 |
GOTO 999 |
GOTO 999 |
240 |
ENDIF |
ENDIF |
241 |
WRITE(msgBuffer,'(A)') '======= Starting MPI parallel Run =========' |
WRITE(msgBuffer,'(A)') |
242 |
|
& '======= Starting MPI parallel Run =========' |
243 |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
244 |
& SQUEEZE_BOTH , myThid) |
& SQUEEZE_BOTH , myThid) |
245 |
WRITE(msgBuffer,'(A,A64)') ' My Processor Name = ', |
WRITE(msgBuffer,'(A,A64)') ' My Processor Name = ', |
256 |
& ') on global grid (1:',nPx*sNx*nSx,',1:',nPy*sNy*nSy,')' |
& ') on global grid (1:',nPx*sNx*nSx,',1:',nPy*sNy*nSy,')' |
257 |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
258 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT , myThid) |
259 |
WRITE(msgBuffer,'(A,I4.4)') ' North neighbor = processor ', mpiPidN |
WRITE(msgBuffer,'(A,I4.4)') |
260 |
|
& ' North neighbor = processor ', mpiPidN |
261 |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
262 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT , myThid) |
263 |
WRITE(msgBuffer,'(A,I4.4)') ' South neighbor = processor ', mpiPidS |
WRITE(msgBuffer,'(A,I4.4)') |
264 |
|
& ' South neighbor = processor ', mpiPidS |
265 |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
266 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT , myThid) |
267 |
WRITE(msgBuffer,'(A,I4.4)') ' East neighbor = processor ', mpiPidE |
WRITE(msgBuffer,'(A,I4.4)') |
268 |
|
& ' East neighbor = processor ', mpiPidE |
269 |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
270 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT , myThid) |
271 |
WRITE(msgBuffer,'(A,I4.4)') ' West neighbor = processor ', mpiPidW |
WRITE(msgBuffer,'(A,I4.4)') |
272 |
|
& ' West neighbor = processor ', mpiPidW |
273 |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuffer, standardMessageUnit, |
274 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT , myThid) |
275 |
C |
C |
296 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
297 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
298 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
299 |
& 'S/R INI_PROCS: MPI_TYPE_VECTOR (mpiTypeXFaceBlock_xy_r4)', |
& 'S/R INI_PROCS: MPI_TYPE_VECTOR (mpiTypeXFaceBlock_xy_r4)', |
300 |
& mpiRC |
& mpiRC |
301 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
302 |
ENDIF |
ENDIF |
304 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
305 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
306 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
307 |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeXFaceBlock_xy_r4)', |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeXFaceBlock_xy_r4)', |
308 |
& mpiRC |
& mpiRC |
309 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
310 |
ENDIF |
ENDIF |
315 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
316 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
317 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
318 |
& 'S/R INI_PROCS: MPI_TYPE_VECTOR (mpiTypeXFaceBlock_xy_r8)', |
& 'S/R INI_PROCS: MPI_TYPE_VECTOR (mpiTypeXFaceBlock_xy_r8)', |
319 |
& mpiRC |
& mpiRC |
320 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
321 |
ENDIF |
ENDIF |
323 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
324 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
325 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
326 |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeXFaceBlock_xy_r8)', |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeXFaceBlock_xy_r8)', |
327 |
& mpiRC |
& mpiRC |
328 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
329 |
ENDIF |
ENDIF |
340 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
341 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
342 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
343 |
& 'S/R INI_PROCS: MPI_TYPE_HVECTOR (mpiTypeXFaceBlock_xyz_r4)', |
& 'S/R INI_PROCS: MPI_TYPE_HVECTOR (mpiTypeXFaceBlock_xyz_r4)', |
344 |
& mpiRC |
& mpiRC |
345 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
346 |
ENDIF |
ENDIF |
348 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
349 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
350 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
351 |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeXFaceBlock_xyz_r4)', |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeXFaceBlock_xyz_r4)', |
352 |
& mpiRC |
& mpiRC |
353 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
354 |
ENDIF |
ENDIF |
362 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
363 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
364 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
365 |
& 'S/R INI_PROCS: MPI_TYPE_HVECTOR (mpiTypeXFaceBlock_xyz_r8)', |
& 'S/R INI_PROCS: MPI_TYPE_HVECTOR (mpiTypeXFaceBlock_xyz_r8)', |
366 |
& mpiRC |
& mpiRC |
367 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
368 |
ENDIF |
ENDIF |
370 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
371 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
372 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
373 |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeXFaceBlock_xyz_r8)', |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeXFaceBlock_xyz_r8)', |
374 |
& mpiRC |
& mpiRC |
375 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
376 |
ENDIF |
ENDIF |
384 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
385 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
386 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
387 |
& 'S/R INI_PROCS: MPI_TYPE_CONTIGUOUS (mpiTypeYFaceBlock_xy_r4)', |
& 'S/R INI_PROCS: MPI_TYPE_CONTIGUOUS (mpiTypeYFaceBlock_xy_r4)', |
388 |
& mpiRC |
& mpiRC |
389 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
390 |
ENDIF |
ENDIF |
392 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
393 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
394 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
395 |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeYFaceBlock_xy_r4)', |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeYFaceBlock_xy_r4)', |
396 |
& mpiRC |
& mpiRC |
397 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
398 |
ENDIF |
ENDIF |
402 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
403 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
404 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
405 |
& 'S/R INI_PROCS: MPI_TYPE_CONTIGUOUS (mpiTypeYFaceBlock_xy_r8)', |
& 'S/R INI_PROCS: MPI_TYPE_CONTIGUOUS (mpiTypeYFaceBlock_xy_r8)', |
406 |
& mpiRC |
& mpiRC |
407 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
408 |
ENDIF |
ENDIF |
410 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
411 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
412 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
413 |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeYFaceBlock_xy_r8)', |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeYFaceBlock_xy_r8)', |
414 |
& mpiRC |
& mpiRC |
415 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
416 |
ENDIF |
ENDIF |
426 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
427 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
428 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
429 |
& 'S/R INI_PROCS: MPI_TYPE_HVECTOR (mpiTypeYFaceBlock_xyz_r4)', |
& 'S/R INI_PROCS: MPI_TYPE_HVECTOR (mpiTypeYFaceBlock_xyz_r4)', |
430 |
& mpiRC |
& mpiRC |
431 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
432 |
ENDIF |
ENDIF |
434 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
435 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
436 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
437 |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeYFaceBlock_xyz_r4)', |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeYFaceBlock_xyz_r4)', |
438 |
& mpiRC |
& mpiRC |
439 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
440 |
ENDIF |
ENDIF |
447 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
448 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
449 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
450 |
& 'S/R INI_PROCS: MPI_TYPE_HVECTOR (mpiTypeYFaceBlock_xyz_r8)', |
& 'S/R INI_PROCS: MPI_TYPE_HVECTOR (mpiTypeYFaceBlock_xyz_r8)', |
451 |
& mpiRC |
& mpiRC |
452 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
453 |
ENDIF |
ENDIF |
455 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
456 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
457 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
458 |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeYFaceBlock_xyz_r8)', |
& 'S/R INI_PROCS: MPI_TYPE_COMMIT (mpiTypeYFaceBlock_xyz_r8)', |
459 |
& mpiRC |
& mpiRC |
460 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
461 |
ENDIF |
ENDIF |