Changeset 206 for palm/trunk/SOURCE/surface_coupler.f90
- Timestamp:
- Oct 13, 2008 2:59:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/surface_coupler.f90
r110 r206 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Implementation of a MPI-1 Coupling: replaced myid with target_id, 7 ! deleted __mpi2 directives 7 8 ! 8 9 ! Former revisions: … … 32 33 REAL :: simulated_time_remote 33 34 34 #if defined( __parallel ) && defined( __mpi2 )35 #if defined( __parallel ) 35 36 36 CALL cpu_log( log_point(39), 'surface_coupler', 'start' )37 CALL cpu_log( log_point(39), 'surface_coupler', 'start' ) 37 38 38 39 ! … … 43 44 !-- If necessary, the coupler will be called at the beginning of the next 44 45 !-- restart run. 45 CALL MPI_SENDRECV( terminate_coupled, 1, MPI_INTEGER, myid, 0, & 46 terminate_coupled_remote, 1, MPI_INTEGER, myid, 0, & 47 comm_inter, status, ierr ) 46 CALL MPI_SENDRECV( terminate_coupled, 1, MPI_INTEGER, target_id, & 47 0, & 48 terminate_coupled_remote, 1, MPI_INTEGER, target_id, & 49 0, comm_inter, status, ierr ) 48 50 IF ( terminate_coupled_remote > 0 ) THEN 49 51 IF ( myid == 0 ) THEN … … 64 66 !-- Exchange the current simulated time between the models, 65 67 !-- currently just for testing 66 CALL MPI_SEND( simulated_time, 1, MPI_REAL, myid, 11, comm_inter, ierr ) 67 CALL MPI_RECV( simulated_time_remote, 1, MPI_REAL, myid, 11, & 68 CALL MPI_SEND( simulated_time, 1, MPI_REAL, target_id, 11, & 69 comm_inter, ierr ) 70 CALL MPI_RECV( simulated_time_remote, 1, MPI_REAL, target_id, 11, & 68 71 comm_inter, status, ierr ) 69 72 WRITE ( 9, * ) simulated_time, ' remote: ', simulated_time_remote … … 78 81 WRITE ( 9, * ) '*** send shf to ocean' 79 82 CALL local_flush( 9 ) 80 CALL MPI_SEND( shf(nys-1,nxl-1), ngp_xy, MPI_REAL, myid, 12, &83 CALL MPI_SEND( shf(nys-1,nxl-1), ngp_xy, MPI_REAL, target_id, 12, & 81 84 comm_inter, ierr ) 82 WRITE ( 9, * ) ' ready'83 CALL local_flush( 9 )84 85 85 86 ! … … 88 89 WRITE ( 9, * ) '*** send qsws to ocean' 89 90 CALL local_flush( 9 ) 90 CALL MPI_SEND( qsws(nys-1,nxl-1), ngp_xy, MPI_REAL, myid, 13, &91 CALL MPI_SEND( qsws(nys-1,nxl-1), ngp_xy, MPI_REAL, target_id, 13, & 91 92 comm_inter, ierr ) 92 WRITE ( 9, * ) ' ready'93 CALL local_flush( 9 )94 93 ENDIF 95 94 … … 98 97 WRITE ( 9, * ) '*** receive pt from ocean' 99 98 CALL local_flush( 9 ) 100 CALL MPI_RECV( pt(0,nys-1,nxl-1), 1, type_xy, myid, 14, comm_inter, & 101 status, ierr ) 102 WRITE ( 9, * ) ' ready' 103 CALL local_flush( 9 ) 99 CALL MPI_RECV( pt(0,nys-1,nxl-1), 1, type_xy, target_id, 14, & 100 comm_inter, status, ierr ) 104 101 105 102 ! … … 107 104 WRITE ( 9, * ) '*** send usws to ocean' 108 105 CALL local_flush( 9 ) 109 CALL MPI_SEND( usws(nys-1,nxl-1), ngp_xy, MPI_REAL, myid, 15, &106 CALL MPI_SEND( usws(nys-1,nxl-1), ngp_xy, MPI_REAL, target_id, 15, & 110 107 comm_inter, ierr ) 111 WRITE ( 9, * ) ' ready'112 CALL local_flush( 9 )113 108 114 109 ! … … 116 111 WRITE ( 9, * ) '*** send vsws to ocean' 117 112 CALL local_flush( 9 ) 118 CALL MPI_SEND( vsws(nys-1,nxl-1), ngp_xy, MPI_REAL, myid, 16, &113 CALL MPI_SEND( vsws(nys-1,nxl-1), ngp_xy, MPI_REAL, target_id, 16, & 119 114 comm_inter, ierr ) 120 WRITE ( 9, * ) ' ready'121 CALL local_flush( 9 )122 115 123 116 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN … … 127 120 WRITE ( 9, * ) '*** receive tswst from atmosphere' 128 121 CALL local_flush( 9 ) 129 CALL MPI_RECV( tswst(nys-1,nxl-1), ngp_xy, MPI_REAL, myid, 12, &122 CALL MPI_RECV( tswst(nys-1,nxl-1), ngp_xy, MPI_REAL, target_id, 12, & 130 123 comm_inter, status, ierr ) 131 WRITE ( 9, * ) ' ready'132 CALL local_flush( 9 )133 124 134 125 ! … … 138 129 WRITE ( 9, * ) '*** receive qswst_remote from atmosphere' 139 130 CALL local_flush( 9 ) 140 CALL MPI_RECV( qswst_remote(nys-1,nxl-1), ngp_xy, MPI_REAL, myid, & 141 13, comm_inter, status, ierr ) 142 WRITE ( 9, * ) ' ready' 143 CALL local_flush( 9 ) 131 CALL MPI_RECV( qswst_remote(nys-1,nxl-1), ngp_xy, MPI_REAL, & 132 target_id, 13, comm_inter, status, ierr ) 144 133 145 134 !here tswst is still the sum of atmospheric bottom heat fluxes … … 165 154 WRITE ( 9, * ) '*** send pt to atmosphere' 166 155 CALL local_flush( 9 ) 167 CALL MPI_SEND( pt(nzt,nys-1,nxl-1), 1, type_xy, myid, 14, comm_inter, & 168 ierr ) 169 WRITE ( 9, * ) ' ready' 170 CALL local_flush( 9 ) 156 CALL MPI_SEND( pt(nzt,nys-1,nxl-1), 1, type_xy, target_id, 14, & 157 comm_inter, ierr ) 171 158 172 159 ! … … 175 162 WRITE ( 9, * ) '*** receive uswst from atmosphere' 176 163 CALL local_flush( 9 ) 177 CALL MPI_RECV( uswst(nys-1,nxl-1), ngp_xy, MPI_REAL, myid, 15, &164 CALL MPI_RECV( uswst(nys-1,nxl-1), ngp_xy, MPI_REAL, target_id, 15, & 178 165 comm_inter, status, ierr ) 179 WRITE ( 9, * ) ' ready'180 CALL local_flush( 9 )181 166 182 167 ! … … 185 170 WRITE ( 9, * ) '*** receive vswst from atmosphere' 186 171 CALL local_flush( 9 ) 187 CALL MPI_RECV( vswst(nys-1,nxl-1), ngp_xy, MPI_REAL, myid, 16, &172 CALL MPI_RECV( vswst(nys-1,nxl-1), ngp_xy, MPI_REAL, target_id, 16, & 188 173 comm_inter, status, ierr ) 189 WRITE ( 9, * ) ' ready'190 CALL local_flush( 9 )191 174 192 175 !
Note: See TracChangeset
for help on using the changeset viewer.