Changeset 2600 for palm/trunk/SOURCE/parin.f90
- Timestamp:
- Nov 1, 2017 2:11:20 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/parin.f90
r2599 r2600 25 25 ! ----------------- 26 26 ! $Id$ 27 ! some comments added and variables renamed concerning r2599 28 ! 29 ! 2599 2017-11-01 13:18:45Z hellstea 27 30 ! The i/o grouping is updated to work correctly also in nested runs. 28 31 ! … … 391 394 IMPLICIT NONE 392 395 393 INTEGER(iwp) :: i !<394 INTEGER(iwp) :: ioerr !< error flag for open/read/write395 INTEGER(iwp) :: myworldid!<396 INTEGER(iwp) :: numworldprocs !<396 INTEGER(iwp) :: global_id !< process id with respect to MPI_COMM_WORLD 397 INTEGER(iwp) :: global_procs !< # of procs with respect to MPI_COMM_WORLD 398 INTEGER(iwp) :: i !< 399 INTEGER(iwp) :: ioerr !< error flag for open/read/write 397 400 398 401 NAMELIST /inipar/ aerosol_bulk, alpha_surface, approximation, bc_e_b, & … … 524 527 !-- severe problems depending on the configuration of the underlying file 525 528 !-- system. 529 !-- Calculation of the number of blocks and the I/O group must be based on all 530 !-- PEs involved in this run. Since myid and numprocs are related to the 531 !-- comm2d communicator, which gives only a subset of all PEs in case of 532 !-- nested runs, that information must be inquired again from the global 533 !-- communicator. 526 534 !-- First, set the default: 527 CALL MPI_COMM_RANK( MPI_COMM_WORLD, myworldid, ierr )528 CALL MPI_COMM_SIZE( MPI_COMM_WORLD, numworldprocs, ierr )535 CALL MPI_COMM_RANK( MPI_COMM_WORLD, global_id, ierr ) 536 CALL MPI_COMM_SIZE( MPI_COMM_WORLD, global_procs, ierr ) 529 537 IF ( maximum_parallel_io_streams == -1 .OR. & 530 maximum_parallel_io_streams > numworldprocs ) THEN531 maximum_parallel_io_streams = numworldprocs538 maximum_parallel_io_streams > global_procs ) THEN 539 maximum_parallel_io_streams = global_procs 532 540 ENDIF 533 541 ! … … 535 543 !-- respective PE belongs. I/O of the groups is done in serial, but in parallel 536 544 !-- for all PEs belonging to the same group. 537 !-- These settings are repeated in init_pegrid for the communicator comm2d, 538 !-- which is not available here 539 !io_blocks = numprocs / maximum_parallel_io_streams 540 io_blocks = numworldprocs / maximum_parallel_io_streams 541 !io_group = MOD( myid+1, io_blocks ) 542 io_group = MOD( myworldid+1, io_blocks ) 545 io_blocks = global_procs / maximum_parallel_io_streams 546 io_group = MOD( global_id+1, io_blocks ) 543 547 544 548 CALL location_message( 'reading NAMELIST parameters from PARIN', .FALSE. )
Note: See TracChangeset
for help on using the changeset viewer.