Changeset 4621 for palm/trunk


Ignore:
Timestamp:
Jul 23, 2020 8:15:59 AM (4 years ago)
Author:
raasch
Message:

further bugfix for r4618: mising preprocessor directives for serial mode added

File:
1 edited

Legend:

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

    r4619 r4621  
    2525! -----------------
    2626! $Id$
     27! bugfixes for serial (non-parallel) mode
     28!
     29! 4619 2020-07-22 13:21:28Z raasch
    2730! unused variable removed
    2831!
     
    751754       INTEGER(iwp) ::  i      !<
    752755       INTEGER(iwp) ::  j      !<
     756#if defined( __parallel )
    753757       INTEGER(KIND=MPI_ADDRESS_KIND) ::  winsize  !< size of RMA window
     758#else
     759       INTEGER(idp) ::  winsize
     760#endif
    754761
    755762!
     
    800807          ENDDO
    801808       ELSE
     809#if defined( __parallel )
    802810          color = MPI_UNDEFINED
     811#endif
    803812          pe_active_for_read = .FALSE.
    804813       ENDIF
     
    10751084       INTEGER(iwp)    :: rem_pe    !<
    10761085
     1086#if defined( __parallel )
    10771087       INTEGER(KIND=MPI_ADDRESS_KIND) ::  rem_offs  !<
     1088#else
     1089       INTEGER(idp) ::  rem_offs
     1090#endif
    10781091
    10791092
     
    10851098
    10861099       IF ( pe_active_for_read )  THEN
    1087 
     1100#if defined( __parallel )
    10881101          CALL MPI_FILE_SET_VIEW( fh, array_position, MPI_REAL, ft_2d, 'native', MPI_INFO_NULL,    &
    10891102                                  ierr )
    10901103          CALL MPI_FILE_READ_ALL( fh, array_2d, SIZE( array_2d ), MPI_REAL, status, ierr )
    1091 
     1104#endif
    10921105          DO  i = nxl, nxr
    10931106             rmabuf_2d(nys:nyn,i) = array_2d(i,nys:nyn)
     
    12931306       INTEGER(iwp)    :: rem_pe    !<
    12941307
     1308#if defined( __parallel )
    12951309       INTEGER(KIND=MPI_ADDRESS_KIND) ::  rem_offs  !<
     1310#else
     1311       INTEGER(idp) ::  rem_offs
     1312#endif
    12961313
    12971314
     
    12991316
    13001317       IF ( pe_active_for_read )  THEN
     1318#if defined( __parallel )
    13011319          CALL MPI_FILE_SET_VIEW( fh, array_position, MPI_INTEGER, ft_2di_nb, 'native',            &
    13021320                                  MPI_INFO_NULL, ierr )
    13031321          CALL MPI_FILE_READ_ALL( fh, array_2di, SIZE( array_2di ), MPI_INTEGER, status, ierr )
    1304 
     1322#endif
    13051323          DO  i = nxl, nxr
    13061324             rmabuf_2di(nys:nyn,i) = array_2di(i,nys:nyn)
     
    14861504       INTEGER(iwp)    :: rem_pe    !<
    14871505
     1506#if defined( __parallel )
    14881507       INTEGER(KIND=MPI_ADDRESS_KIND) ::  rem_offs  !<
     1508#else
     1509       INTEGER(idp) ::  rem_offs
     1510#endif
    14891511
    14901512
     
    14921514
    14931515       IF ( pe_active_for_read )  THEN
     1516#if defined( __parallel )
    14941517          CALL MPI_FILE_SET_VIEW( fh, array_position, MPI_REAL, ft_3d, 'native', MPI_INFO_NULL,    &
    14951518                                  ierr )
    14961519          CALL MPI_FILE_READ_ALL( fh, array_3d, SIZE( array_3d ), MPI_REAL, status, ierr )
    1497 
     1520#endif
    14981521          DO  i = nxl, nxr
    14991522             rmabuf_3d(:,nys:nyn,i) = array_3d(:,i,nys:nyn)
     
    26962719       INTEGER(iwp) ::  rem_pe    !<
    26972720
     2721#if defined( __parallel )
    26982722       INTEGER(KIND=MPI_ADDRESS_KIND) ::  rem_offs  !<
     2723#else
     2724       INTEGER(idp) ::  rem_offs
     2725#endif
    26992726
    27002727       LOGICAL ::  write_done  !<
     
    27572784#else
    27582785                   CALL posix_lseek( fh, disp_f )
    2759                    CALL posix_read( fh, rmabuf_2d(j_f,i_f), nr_bytes_f )
     2786                   CALL posix_read( fh, rmabuf_2d(j_f:,i_f:), nr_bytes_f )
    27602787#endif
    27612788
     
    28352862             ENDIF
    28362863#else
    2837              data(m_tart_index(j,i)) = array_2d(i_remote,j_remote)
     2864             data(m_start_index(j,i)) = array_2d(i_remote,j_remote)
    28382865#endif
    28392866          ENDDO
     
    31503177       CALL MPI_FILE_CLOSE( fhs, ierr )
    31513178    ENDIF
    3152 #endif
    31533179!
    31543180!-- Free RMA windows
     
    31583184       CALL MPI_WIN_FREE( rmawin_3d, ierr )
    31593185    ENDIF
     3186#endif
    31603187
    31613188    IF (.NOT. pe_active_for_read )  RETURN
Note: See TracChangeset for help on using the changeset viewer.