60 TYPE(t_region
),
POINTER :: regions(:)
63 INTEGER ::
icorner, iedge, ijk, ilev, ir, ireg
66 CHARACTER(CHRLEN) :: rcsidentstring
69 INTEGER :: ncorners,
nedges
70 INTEGER ::
nfaces, nfacecentroidsize, nfacenormalsize, nmetricsbuff
72 TYPE(t_level
),
POINTER :: plevel
73 TYPE(t_dcelltransf
),
POINTER :: psendeccell, precveccell
74 TYPE(t_plag),
POINTER :: pplag
79 rcsidentstring =
'$RCSfile: PLAG_RFLO_SendRecvMetrics.F90,v $ $Revision: 1.4 $'
81 global => regions(1)%global
84 'PLAG_RFLO_SendRecvMetrics.F90' )
92 nfacecentroidsize = zcoord*kcoord
93 nfacenormalsize = 3*kcoord
94 nmetricsbuff =
nfaces*(nfacecentroidsize + nfacenormalsize)
98 DO ireg = 1, global%nRegions
99 IF ( regions(ireg)%procid==global%myProcid .AND. &
100 regions(ireg)%active==active .AND. &
101 global%nProcAlloc > 1 )
THEN
103 DO ilev=1,regions(ireg)%nGridLevels
104 pplag => regions(ireg)%levels(ilev)%plag
105 pplag%nRequestsMetrics = 0
107 DO ir=1,global%nRegions
108 psendeccell => regions(ireg)%levels(ilev)%sendEcCells(ir)
109 precveccell => regions(ireg)%levels(ilev)%recvEcCells(ir)
111 IF ( psendeccell%nCells > 0 )
THEN
112 pplag%nRequestsMetrics = pplag%nRequestsMetrics+1
113 psendeccell%iRequestMetrics = pplag%nRequestsMetrics
114 ALLOCATE( psendeccell%buffMetrics(psendeccell%nCells*nmetricsbuff), &
116 global%error = errorflag
117 IF ( global%error /= err_none ) &
118 CALL
errorstop( global,err_allocate,__line__ )
121 IF ( precveccell%nCells > 0 )
THEN
122 precveccell%iRequestMetrics = -999999
123 ALLOCATE( precveccell%buffMetrics(precveccell%nCells*nmetricsbuff), &
125 global%error = errorflag
126 IF ( global%error /= err_none ) &
127 CALL
errorstop( global,err_allocate,__line__ )
131 ALLOCATE(pplag%requestsMetrics(pplag%nRequestsMetrics), stat=errorflag )
132 global%error = errorflag
133 IF ( global%error /= err_none ) &
134 CALL
errorstop( global,err_allocate,__line__ )
144 CALL mpi_barrier( global%mpiComm,global%mpierr )
145 IF ( global%mpierr /= err_none ) &
146 CALL
errorstop( global,err_mpi_trouble,__line__ )
153 DO ireg = 1, global%nRegions
154 IF (regions(ireg)%procid==global%myProcid .AND. &
155 regions(ireg)%active==active)
THEN
162 DO ireg = 1, global%nRegions
163 IF (regions(ireg)%procid==global%myProcid .AND. &
164 regions(ireg)%active==active)
THEN
171 DO ireg = 1, global%nRegions
172 IF (regions(ireg)%procid==global%myProcid .AND. &
173 regions(ireg)%active==active)
THEN
181 CALL mpi_barrier( global%mpiComm,global%mpierr )
182 IF ( global%mpierr /= err_none ) &
183 CALL
errorstop( global,err_mpi_trouble,__line__ )
188 DO ireg = 1, global%nRegions
189 IF ( regions(ireg)%procid==global%myProcid .AND. &
190 regions(ireg)%active==active .AND. &
191 global%nProcAlloc > 1 )
THEN
193 DO ilev=1,regions(ireg)%nGridLevels
194 pplag => regions(ireg)%levels(ilev)%plag
196 DO ir=1,global%nRegions
197 psendeccell => regions(ireg)%levels(ilev)%sendEcCells(ir)
198 precveccell => regions(ireg)%levels(ilev)%recvEcCells(ir)
200 IF ( psendeccell%nCells > 0 )
THEN
201 DEALLOCATE( psendeccell%buffMetrics, stat=errorflag )
202 global%error = errorflag
203 IF ( global%error /= err_none ) &
204 CALL
errorstop( global,err_deallocate,__line__ )
207 IF ( precveccell%nCells > 0 )
THEN
208 DEALLOCATE( precveccell%buffMetrics, stat=errorflag )
209 global%error = errorflag
210 IF ( global%error /= err_none ) &
211 CALL
errorstop( global,err_deallocate,__line__ )
215 DEALLOCATE(pplag%requestsMetrics, stat=errorflag )
216 global%error = errorflag
217 IF ( global%error /= err_none ) &
218 CALL
errorstop( global,err_deallocate,__line__ )
228 CALL mpi_barrier( global%mpiComm,global%mpierr )
229 IF ( global%mpierr /= err_none ) &
230 CALL
errorstop( global,err_mpi_trouble,__line__ )
subroutine registerfunction(global, funName, fileName)
subroutine plag_rflo_sendrecvmetrics(regions)
**********************************************************************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
subroutine plag_rflo_clearsendrequests(regions, iReg)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine plag_rflo_recvmetrics(regions, iReg)
subroutine deregisterfunction(global)
subroutine plag_rflo_sendmetrics(regions, iReg)