Changeset 3372
- Timestamp:
- Oct 18, 2018 2:03:19 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/radiation_model_mod.f90
r3351 r3372 28 28 ! ----------------- 29 29 ! $Id$ 30 ! bugfix: kind type of 2nd argument of mpi_win_allocate changed, misplaced 31 ! __parallel directive 32 ! 33 ! 3351 2018-10-15 18:40:42Z suehring 30 34 ! Do not overwrite values of spectral and broadband albedo during initialization 31 35 ! if they are already initialized in the urban-surface model via ASCII input. … … 5663 5667 5664 5668 CALL MPI_Win_allocate(INT(STORAGE_SIZE(1_iwp)/8*nsurf_type_u*nzu*nny*nnx, & 5665 kind=MPI_ADDRESS_KIND), & 5666 INT(STORAGE_SIZE(1_iwp)/8, kind=MPI_ADDRESS_KIND), & 5669 kind=MPI_ADDRESS_KIND), STORAGE_SIZE(1_iwp)/8, & 5667 5670 minfo, comm2d, gridsurf_rma_p, win_gridsurf, ierr) 5668 5671 IF ( ierr /= 0 ) THEN 5669 5672 WRITE(9,*) 'Error MPI_Win_allocate1:', ierr, & 5670 5673 INT(STORAGE_SIZE(1_iwp)/8*nsurf_type_u*nzu*nny*nnx,kind=MPI_ADDRESS_KIND), & 5671 INT(STORAGE_SIZE(1_iwp)/8, kind=MPI_ADDRESS_KIND), win_gridsurf5674 STORAGE_SIZE(1_iwp)/8, win_gridsurf 5672 5675 FLUSH(9) 5673 5676 ENDIF … … 7617 7620 7618 7621 CONTAINS 7619 SUBROUTINE request_itarget(d, z, y, x, isurfl, iproc) 7622 7623 SUBROUTINE request_itarget( d, z, y, x, isurfl, iproc ) 7624 7620 7625 INTEGER(iwp), INTENT(in) :: d, z, y, x 7621 7626 INTEGER(iwp), TARGET, INTENT(out) :: isurfl 7622 7627 INTEGER(iwp), INTENT(out) :: iproc 7623 INTEGER(kind=MPI_ADDRESS_KIND) :: target_displ !< index of the grid in the local gridsurf array7624 7628 INTEGER(iwp) :: px, py !< number of processors in x and y direction 7625 7629 !< before the processor in the question 7626 7627 !-- calculate target processor and index in the remote local target gridsurf array7628 px = x/nnx7629 py = y/nny7630 iproc = px*pdims(2)+py7631 target_displ = ((x-px*nnx)*nny + y-py*nny)*nzu*nsurf_type_u + (z-nzub)*nsurf_type_u + d7632 7633 7630 #if defined( __parallel ) 7634 !-- send MPI_Get request to obtain index target_surfl(i) 7635 CALL MPI_Get(isurfl, 1, MPI_INTEGER, iproc, target_displ, & 7636 1, MPI_INTEGER, win_gridsurf, ierr) 7631 INTEGER(KIND=MPI_ADDRESS_KIND) :: target_displ !< index of the grid in the local gridsurf array 7632 7633 ! 7634 !-- Calculate target processor and index in the remote local target gridsurf array 7635 px = x / nnx 7636 py = y / nny 7637 iproc = px * pdims(2) + py 7638 target_displ = ((x-px*nnx) * nny + y - py*nny ) * nzu * nsurf_type_u +& 7639 ( z-nzub ) * nsurf_type_u + d 7640 ! 7641 !-- Send MPI_Get request to obtain index target_surfl(i) 7642 CALL MPI_GET( isurfl, 1, MPI_INTEGER, iproc, target_displ, & 7643 1, MPI_INTEGER, win_gridsurf, ierr) 7637 7644 IF ( ierr /= 0 ) THEN 7638 WRITE(9,*) 'Error MPI_Get3:', ierr, isurfl, iproc, target_displ, win_gridsurf 7639 FLUSH(9) 7645 WRITE( 9,* ) 'Error MPI_Get3:', ierr, isurfl, iproc, target_displ, & 7646 win_gridsurf 7647 FLUSH( 9 ) 7640 7648 ENDIF 7641 7649 #else … … 7643 7651 isurfl = gridsurf(d,z,y,x) 7644 7652 #endif 7653 7645 7654 END SUBROUTINE request_itarget 7646 7655
Note: See TracChangeset
for help on using the changeset viewer.