Ignore:
Timestamp:
Apr 13, 2020 8:11:20 PM (4 years ago)
Author:
raasch
Message:

restart data handling with MPI-IO added, first part

File:
1 edited

Legend:

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

    r4457 r4495  
    2525! -----------------
    2626! $Id$
     27! restart data handling with MPI-IO added
     28!
     29! 4457 2020-03-11 14:20:43Z raasch
    2730! use statement for exchange horiz added
    2831!
     
    8689    USE control_parameters,                                                    &
    8790        ONLY:  coupling_char, do2d_at_begin, do3d_at_begin, io_blocks,         &
    88                io_group, message_string, runnr, simulated_time_chr, spinup,    &
     91               io_group, message_string, restart_data_format_output, runnr, simulated_time_chr, spinup,   &
    8992               time_since_reference_point, user_interface_current_revision,    &
    9093               user_interface_required_revision, version, write_binary
     
    140143               pmci_modelconfiguration, pmci_parent_initialize
    141144#endif
     145
     146    USE restart_data_mpi_io_mod,                                               &
     147        ONLY:  rd_mpi_io_close, rd_mpi_io_open
    142148
    143149    USE surface_data_output_mod,                                               &
     
    168174
    169175    version = 'PALM 6.0'
    170     user_interface_required_revision = 'r3703'
     176    user_interface_required_revision = 'r4495'
    171177
    172178#if defined( __parallel )
     
    399405       CALL location_message( 'writing restart data', 'start' )
    400406
    401        DO  i = 0, io_blocks-1
    402           IF ( i == io_group )  THEN
    403 
    404 !
    405 !--          Open binary file
    406              CALL check_open( 14 )
    407 !
    408 !--          Write control parameters and other global variables for restart.
    409              IF ( myid == 0 )  CALL wrd_global
    410 !
    411 !--          Write processor specific flow field data for restart runs
    412              CALL wrd_local
    413 !
    414 !--          Close binary file
    415              CALL close_file( 14 )
    416 
    417           ENDIF
    418 #if defined( __parallel )
    419           CALL MPI_BARRIER( comm2d, ierr )
    420 #endif
    421        ENDDO
     407       IF ( TRIM( restart_data_format_output ) == 'fortran_binary' )  THEN
     408
     409          DO  i = 0, io_blocks-1
     410             IF ( i == io_group )  THEN
     411
     412!
     413!--             Open binary file
     414                CALL check_open( 14 )
     415!
     416!--             Write control parameters and other global variables for restart.
     417                IF ( myid == 0 )  CALL wrd_global
     418!
     419!--             Write processor specific flow field data for restart runs
     420                CALL wrd_local
     421!
     422!--             Close binary file
     423                CALL close_file( 14 )
     424
     425             ENDIF
     426#if defined( __parallel )
     427             CALL MPI_BARRIER( comm2d, ierr )
     428#endif
     429          ENDDO
     430
     431       ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' )  THEN
     432!
     433!--       Open MPI-IO restart file
     434          CALL rd_mpi_io_open( 'write', 'BINOUT' )
     435!
     436!--       Write control parameters and other global variables for restart.
     437          CALL wrd_global
     438!
     439!--       Write processor specific flow field data for restart runs
     440          CALL wrd_local
     441!
     442!--       Close restart File
     443          CALL rd_mpi_io_close
     444
     445       ENDIF
    422446
    423447       CALL location_message( 'writing restart data', 'finished' )
Note: See TracChangeset for help on using the changeset viewer.