Ignore:
Timestamp:
Nov 1, 2017 1:18:45 PM (7 years ago)
Author:
hellstea
Message:

i/o grouping update for nested runs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/parin.f90

    r2575 r2599  
    2525! -----------------
    2626! $Id$
     27! The i/o grouping is updated to work correctly also in nested runs.
     28!
     29! 2575 2017-10-24 09:57:58Z maronga
    2730! Renamed phi -> latitude, added longitude
    2831!
     
    390393    INTEGER(iwp) ::  i      !<
    391394    INTEGER(iwp) ::  ioerr  !< error flag for open/read/write
    392 
     395    INTEGER(iwp) ::  myworldid       !<
     396    INTEGER(iwp) ::  numworldprocs   !<
    393397
    394398    NAMELIST /inipar/  aerosol_bulk, alpha_surface, approximation, bc_e_b,     &
     
    513517
    514518    CALL location_message( 'finished', .TRUE. )
    515 
    516519!
    517520!-- Calculate the number of groups into which parallel I/O is split.
     
    522525!-- system.
    523526!-- First, set the default:
     527    CALL MPI_COMM_RANK( MPI_COMM_WORLD, myworldid, ierr )
     528    CALL MPI_COMM_SIZE( MPI_COMM_WORLD, numworldprocs, ierr )
    524529    IF ( maximum_parallel_io_streams == -1  .OR.                               &
    525          maximum_parallel_io_streams > numprocs )  THEN
    526        maximum_parallel_io_streams = numprocs
     530         maximum_parallel_io_streams > numworldprocs )  THEN
     531       maximum_parallel_io_streams = numworldprocs
    527532    ENDIF
    528533!
     
    532537!-- These settings are repeated in init_pegrid for the communicator comm2d,
    533538!-- which is not available here
    534     io_blocks = numprocs / maximum_parallel_io_streams
    535     io_group  = MOD( myid+1, io_blocks )
    536 
     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 )
     543   
    537544    CALL location_message( 'reading NAMELIST parameters from PARIN', .FALSE. )
    538545!
Note: See TracChangeset for help on using the changeset viewer.