53 USE moddatastruct, ONLY : t_dcell, t_dcelltransf, t_region, t_level
66 TYPE(t_region
),
POINTER :: regions(:)
68 INTEGER,
INTENT(IN) :: ireg
74 CHARACTER(CHRLEN) :: rcsidentstring
76 INTEGER :: dest,
i,
j,
k,
icell,
icorner,iedge,ijk,ilev,ir,iregdes, iregsrc, &
77 irequestplag,nbuffsizecornsrc,nbuffsizeedgesrc,nbuffsizetotsrc, &
80 TYPE(t_buffer_plag),
POINTER :: pcorncellsxbuff, pedgecellsxbuff
81 TYPE(t_dcelltransf
),
POINTER :: psendeccell
83 TYPE(t_level
),
POINTER :: plevelsrc
84 TYPE(t_plag),
POINTER :: pplag
85 TYPE(t_region
),
POINTER :: pregionsrc, pregiondes
91 rcsidentstring =
'$RCSfile: PLAG_CECellsSendSize.F90,v $ $Revision: 1.5 $'
93 global => regions(ireg)%global
96 'PLAG_CECellsSendSize.F90' )
102 ilev = regions(ireg)%currLevel
116 pregionsrc => regions(ireg)
117 plevelsrc => pregionsrc%levels(ilev)
118 pplag => plevelsrc%plag
124 DO ir=1,global%nRegions
125 IF (regions(ir)%procid == global%myProcid) goto 1999
127 IF ( plevelsrc%sendEcCells(ir)%nCells > 0 )
THEN
128 psendeccell => plevelsrc%sendEcCells(ir)
147 IF( .NOT. plevelsrc%edgeCells(iedge)%interact ) goto 2999
151 IF( plevelsrc%edgeCells(iedge)%degenrt /= degenerat_none ) goto 2999
153 DO ijk=1,ubound(plevelsrc%edgeCells(iedge)%cells,1)
154 iregdes = plevelsrc%edgeCells(iedge)%cells(ijk)%srcRegion
155 pedgecellsxbuff => plevelsrc%edgeCells(iedge)%cells(ijk)%bufferExchPlag
156 IF ( iregdes == ir .AND. regions(iregdes)%procid /= global%myProcid )
THEN
157 nbuffsizeedgesrc = nbuffsizeedgesrc +pedgecellsxbuff%nBuffSize
161 #ifdef PLAG_CECELLS_MPI_DEBUG
162 IF ( nbuffsizeedgesrc > 0 ) &
163 print*,
' PLAG_CECellsSendSize: procId, iReg, iR, procIdiR, iEdge, nBuffSizeEdgeSrc,iRegDes = ',&
164 global%myProcid, ireg, ir, regions(ir)%procid ,iedge, nbuffsizeedgesrc,iregdes
176 IF (.NOT. plevelsrc%cornerCells(
icorner)%interact) goto 3999
180 IF( plevelsrc%cornerCells(
icorner)%degenrt /= degenerat_none ) goto 3999
182 DO ijk=1,ubound(plevelsrc%cornerCells(
icorner)%cells,1)
183 iregdes = plevelsrc%cornerCells(
icorner)%cells(ijk)%srcRegion
184 pcorncellsxbuff => plevelsrc%cornerCells(
icorner)%cells(ijk)%bufferExchPlag
185 IF ( iregdes == ir .AND. regions(iregdes)%procid /= global%myProcid )
THEN
186 nbuffsizecornsrc = nbuffsizecornsrc +pcorncellsxbuff%nBuffSize
190 #ifdef PLAG_CECELLS_MPI_DEBUG
191 IF ( nbuffsizecornsrc > 0 ) &
192 print*,
' PLAG_CECellsSendSize : procId, iReg, iR, iCorner, nBuffSizeCornSrc,iRegDes = ',&
193 global%myProcid, ireg, ir, regions(ir)%procid ,
icorner, nbuffsizecornsrc,iregdes
203 nbuffsizetotsrc = nbuffsizecornsrc +nbuffsizeedgesrc
204 psendeccell%nBuffSizePlag = nbuffsizetotsrc
205 irequestplag = psendeccell%iRequestPlag
208 dest = regions(ir)%procid
209 tag = regions(ir)%localNumber +plag_tag_shift +mpi_patchoff +1000
211 IF(
tag .gt. global%mpiTagMax)
tag = mod(
tag,global%mpiTagMax)
212 #ifdef PLAG_CECELLS_MPI_DEBUG
213 IF ( nbuffsizetotsrc > 0 ) &
214 print*,
' PLAG_CECellsSendSize: iRegDes, iRegSrc, procDes, procSrc, tagSrc, nBuffSizePlag = ',&
215 ir, ireg, dest, global%myProcid,
tag, psendeccell%nBuffSizePlag
218 CALL mpi_isend( psendeccell%nBuffSizePlag,ndimbuffsize,mpi_integer, &
219 dest,
tag,global%mpiComm, &
220 pplag%requestsCECells(irequestplag),global%mpierr )
221 IF ( global%mpierr /= err_none ) &
222 CALL
errorstop( global,err_mpi_trouble,__line__ )
subroutine registerfunction(global, funName, fileName)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE icorner
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE icell
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine plag_cecellssendsize(regions, iReg)
subroutine deregisterfunction(global)