58 TYPE(t_region
),
POINTER :: regions(:)
66 CHARACTER(CHRLEN) :: rcsidentstring
69 INTEGER :: statusplag(mpi_status_size)
72 INTEGER :: bctype, ilev, ipatchdes, ipatchsrc, iregsrc, &
73 ndimbuffsize, ndv, npatches, ntv, procsrc, tagsrc
75 TYPE(t_patch),
POINTER :: patchsrc, patchdes
76 TYPE(t_plag),
POINTER :: pplag
81 rcsidentstring =
'$RCSfile: PLAG_BufferSizeRecv.F90,v $ $Revision: 1.5 $'
83 global => regions(ireg)%global
86 'PLAG_BufferSizeRecv.F90' )
94 ilev = regions(ireg)%currLevel
95 npatches = regions(ireg)%nPatches
99 DO ipatch = 1, npatches
103 patchdes => regions(ireg)%levels(ilev)%patches(ipatch)
105 bctype = patchdes%bcType
106 iregsrc = patchdes%srcRegion
107 ipatchsrc = patchdes%srcPatch
111 IF ( (bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
112 (bctype>=bc_regionint .AND. bctype<=bc_regionint +bc_range) .OR. &
113 (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range) .OR. &
114 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
115 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range) )
THEN
117 IF ( regions(iregsrc)%procid /= global%myProcid )
THEN
118 patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
121 procsrc = regions(iregsrc)%procid
122 tagsrc = regions(ireg)%localNumber &
123 + plag_tag_shift +mpi_patchoff*patchsrc%srcPatch*ireg &
126 IF(tagsrc .gt. global%mpiTagMax) tagsrc = mod(tagsrc,global%mpiTagMax)
128 CALL mpi_recv( patchdes%bufferPlag%nBuffSizeDes, &
129 ndimbuffsize,mpi_integer, &
130 procsrc,tagsrc,global%mpiComm,statusplag,global%mpierr )
132 IF (global%mpierr /= err_none) &
133 CALL
errorstop( global,err_mpi_trouble,__line__ )
135 #ifdef PLAG_MPI_DEBUG
136 IF ( patchdes%bufferPlag%nBuffSizeDes /= 0 ) &
137 WRITE(stdout,*)
' PLAG_BufferSizeRecv: iRegDes, iRegSrc, procSrc, tagSrc, nBuffSizeDes = ',&
138 ireg, iregsrc, procsrc,tagsrc, patchdes%bufferPlag%nBuffSizeDes
subroutine registerfunction(global, funName, fileName)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine plag_buffersizerecv(regions, iReg)