72 CHARACTER(CHRLEN) :: &
73 RCSIdentString =
'$RCSfile: PLAG_RFLU_ModComm.F90,v $ $Revision: 1.11 $'
75 INTEGER,
PARAMETER,
PRIVATE :: REQUEST_TYPE_COUNTER = 1, &
118 INTEGER,
INTENT(INOUT) :: request
126 INTEGER ::
status(mpi_status_size)
133 'PLAG_RFLU_ModComm.F90')
139 CALL mpi_wait(request,
status,errorflag)
140 global%error = errorflag
141 IF ( global%error /= err_none )
THEN
142 CALL
errorstop(global,err_mpi_output,__line__)
191 INTEGER,
INTENT(IN) :: ireqflag
192 TYPE(t_region
),
POINTER :: pregion
198 INTEGER :: errorflag,iborder
201 TYPE(t_grid),
POINTER :: pgrid
207 global => pregion%global
210 'PLAG_RFLU_ModComm.F90')
216 pgrid => pregion%grid
222 DO iborder = 1,pgrid%nBorders
223 pborder => pgrid%borders(iborder)
229 IF ( pborder%iProc /= global%myProcid )
THEN
230 SELECT CASE (ireqflag)
231 CASE(request_type_counter)
234 CASE(request_type_data)
235 IF ( pborder%nPclsSend == 0 ) cycle
286 TYPE(t_region
),
DIMENSION(:),
POINTER :: regions
293 INTEGER :: errorflag,ipclbeg,ipclend,ireg,istage,loopcounter
297 TYPE(t_grid),
POINTER :: pgrid
298 TYPE(t_region
),
POINTER :: pregion
304 global => regions(0)%global
307 'PLAG_RFLU_ModComm.F90')
314 CALL fprofiler_begins(
"PLAG_RFLU::PLAG_RFLU_CommDriver")
331 CALL fprofiler_begins(
"PLAG_RFLU::TotalnPclsComm")
336 IF ( global%myProcid == masterproc .AND. &
337 global%verbLevel > verbose_low .AND. &
338 global%nPclsCommTot /= 0 )
THEN
339 WRITE(stdout,
'(A,3X,A,1X,1PE12.5,2(1X,I10))') &
340 solver_name,
'Current Loop Counter & nPclsComm:',&
341 global%currentTime,loopcounter,global%nPclsCommTot
345 CALL fprofiler_ends(
"PLAG_RFLU::TotalnPclsComm")
348 IF ( global%nPclsCommTot == 0 )
THEN
357 CALL fprofiler_begins(
"PLAG_RFLU::InitRecvCount")
360 DO ireg = 1,global%nRegionsLocal
361 pregion => regions(ireg)
366 CALL fprofiler_ends(
"PLAG_RFLU::InitRecvCount")
374 CALL fprofiler_begins(
"PLAG_RFLU::ISendCount")
377 DO ireg = 1,global%nRegionsLocal
378 pregion => regions(ireg)
383 CALL fprofiler_ends(
"PLAG_RFLU::ISendCount")
391 CALL fprofiler_begins(
"PLAG_RFLU::CopyCount")
397 CALL fprofiler_ends(
"PLAG_RFLU::CopyCount")
405 CALL fprofiler_begins(
"PLAG_RFLU::CreateBuffSend")
408 DO ireg = 1,global%nRegionsLocal
409 pregion => regions(ireg)
415 CALL fprofiler_ends(
"PLAG_RFLU::CreateBuffSend")
424 CALL fprofiler_begins(
"PLAG_RFLU::RecvCount")
427 DO ireg = 1,global%nRegionsLocal
428 pregion => regions(ireg)
433 CALL fprofiler_ends(
"PLAG_RFLU::RecvCount")
441 CALL fprofiler_begins(
"PLAG_RFLU::CreateBuffRecv")
444 DO ireg = 1,global%nRegionsLocal
445 pregion => regions(ireg)
451 CALL fprofiler_ends(
"PLAG_RFLU::CreateBuffRecv")
459 CALL fprofiler_begins(
"PLAG_RFLU::ISendData")
462 DO ireg = 1,global%nRegionsLocal
463 pregion => regions(ireg)
468 CALL fprofiler_ends(
"PLAG_RFLU::ISendData")
476 CALL fprofiler_begins(
"PLAG_RFLU::CopyData")
482 CALL fprofiler_ends(
"PLAG_RFLU::CopyData")
490 CALL fprofiler_begins(
"PLAG_RFLU::UpdateDataPar")
493 DO ireg = 1,global%nRegionsLocal
494 pregion => regions(ireg)
496 IF ( pregion%plag%nPcls > 0 )
THEN
497 CALL plag_updatedatastruct(pregion)
502 CALL fprofiler_ends(
"PLAG_RFLU::UpdateDataPar")
510 CALL fprofiler_begins(
"PLAG_RFLU::RecvData")
513 DO ireg = 1,global%nRegionsLocal
514 pregion => regions(ireg)
519 CALL fprofiler_ends(
"PLAG_RFLU::RecvData")
527 CALL fprofiler_begins(
"PLAG_RFLU::ClearReqsData")
530 DO ireg = 1,global%nRegionsLocal
531 pregion => regions(ireg)
536 CALL fprofiler_ends(
"PLAG_RFLU::ClearReqsData")
544 CALL fprofiler_begins(
"PLAG_RFLU::UnloadBuffRecv")
547 DO ireg = 1,global%nRegionsLocal
548 pregion => regions(ireg)
550 pregion%plag%nPclsPrev = pregion%plag%nPcls
559 CALL fprofiler_ends(
"PLAG_RFLU::UnloadBuffRecv")
567 CALL fprofiler_begins(
"PLAG_RFLU::InitSendCountPar")
570 DO ireg = 1,global%nRegionsLocal
571 pregion => regions(ireg)
576 CALL fprofiler_ends(
"PLAG_RFLU::InitSendCountPar")
586 CALL fprofiler_begins(
"PLAG_RFLU::FindCellsPar")
589 DO ireg = 1,global%nRegionsLocal
590 pregion => regions(ireg)
591 pgrid => pregion%grid
593 ipclbeg = pregion%plag%nPclsPrev +1
594 ipclend = pregion%plag%nPcls
596 IF ( ipclend < ipclbeg ) cycle
602 SELECT CASE ( pregion%plagInput%findPclMethod )
603 CASE ( find_pcl_method_traj_fast )
605 CASE ( find_pcl_method_traj_safe )
608 CALL
errorstop(global,err_reached_default,__line__)
613 CALL fprofiler_ends(
"PLAG_RFLU::FindCellsPar")
620 loopcounter = loopcounter + 1
626 IF ( loopcounter >= limit_infinite_loop )
THEN
627 CALL
errorstop(global,err_infinite_loop,__line__)
636 CALL fprofiler_begins(
"PLAG_RFLU::UpdateDataPar2")
639 DO ireg = 1,global%nRegionsLocal
640 pregion => regions(ireg)
642 IF ( pregion%plag%nPcls > 0 )
THEN
643 CALL plag_updatedatastruct(pregion)
648 CALL fprofiler_ends(
"PLAG_RFLU::UpdateDataPar2")
667 CALL fprofiler_ends(
"PLAG_RFLU::PLAG_RFLU_CommDriver")
713 TYPE(t_region
),
DIMENSION(:),
POINTER :: regions
719 INTEGER :: errorflag,iborder,iborder2,ireg,ireg2
720 TYPE(t_border),
POINTER :: pborder,pborder2
722 TYPE(t_grid),
POINTER :: pgrid
723 TYPE(t_region
),
POINTER :: pregion,pregion2
729 global => regions(0)%global
732 'PLAG_RFLU_ModComm.F90')
738 DO ireg = 1,global%nRegionsLocal
739 pregion => regions(ireg)
740 pgrid => pregion%grid
742 DO iborder = 1,pgrid%nBorders
743 pborder => pgrid%borders(iborder)
745 IF ( pborder%iProc == global%myProcid )
THEN
746 ireg2 = pborder%iRegionLocal
747 iborder2 = pborder%iBorder
749 pregion2 => regions(ireg2)
750 pborder2 => pregion2%grid%borders(iborder2)
752 pborder2%nPclsRecv = pborder%nPclsSend
801 TYPE(t_region
),
DIMENSION(:),
POINTER :: regions
807 INTEGER :: errorflag,iborder,iborder2,ireg,ireg2
808 TYPE(t_border),
POINTER :: pborder,pborder2
810 TYPE(t_grid),
POINTER :: pgrid
811 TYPE(t_region
),
POINTER :: pregion,pregion2
817 global => regions(0)%global
820 'PLAG_RFLU_ModComm.F90')
830 DO ireg = 1,global%nRegionsLocal
831 pregion => regions(ireg)
832 pgrid => pregion%grid
834 DO iborder = 1,pgrid%nBorders
835 pborder => pgrid%borders(iborder)
841 IF ( pborder%iProc == global%myProcid )
THEN
842 ireg2 = pborder%iRegionLocal
843 iborder2 = pborder%iBorder
845 pregion2 => regions(ireg2)
846 pborder2 => pregion2%grid%borders(iborder2)
852 IF ( pborder%nPclsSend /= pborder2%nPclsRecv )
THEN
853 CALL
errorstop(global,err_bufferdim_mismatch,__line__)
856 IF ( pborder%nPclsSend == 0 ) cycle
863 pborder2%plag%recvBuff)
870 pborder2%plag%recvBuffInt)
920 INTEGER,
DIMENSION(:,:),
INTENT(IN) :: pcldata
921 INTEGER,
DIMENSION(:,:),
INTENT(OUT) :: pcldata2
928 INTEGER :: errorflag,ipcl,ivar,npclssend,nvars
935 'PLAG_RFLU_ModComm.F90')
941 nvars =
SIZE(pcldata,1)
943 IF ( nvars /=
SIZE(pcldata2,1) )
THEN
944 CALL
errorstop(global,err_datadim_mismatch,__line__)
947 npclssend =
SIZE(pcldata,2)
949 IF ( npclssend /=
SIZE(pcldata2,2) )
THEN
950 CALL
errorstop(global,err_datadim_mismatch,__line__)
957 DO ipcl = 1,npclssend
959 pcldata2(ivar,ipcl) = pcldata(ivar,ipcl)
1008 REAL(RFREAL),
DIMENSION(:,:),
INTENT(IN) :: pcldata
1009 REAL(RFREAL),
DIMENSION(:,:),
INTENT(OUT) :: pcldata2
1017 INTEGER :: errorflag,ipcl,ivar,npclssend,nvars
1024 'PLAG_RFLU_ModComm.F90')
1030 nvars =
SIZE(pcldata,1)
1032 IF ( nvars /=
SIZE(pcldata2,1) )
THEN
1033 CALL
errorstop(global,err_datadim_mismatch,__line__)
1036 npclssend =
SIZE(pcldata,2)
1038 IF ( npclssend /=
SIZE(pcldata2,2) )
THEN
1039 CALL
errorstop(global,err_datadim_mismatch,__line__)
1046 DO ipcl = 1,npclssend
1048 pcldata2(ivar,ipcl) = pcldata(ivar,ipcl)
1099 TYPE(t_region
),
POINTER :: pregion
1105 INTEGER :: errorflag,iborder,
nvals,nvarsint,nvarsreal
1108 TYPE(t_grid),
POINTER :: pgrid
1114 global => pregion%global
1117 'PLAG_RFLU_ModComm.F90')
1123 pgrid => pregion%grid
1131 nvarsreal = 3*pregion%plag%nCv +pregion%plag%nArv
1132 nvarsint = pregion%plag%nAiv +1
1138 DO iborder = 1,pgrid%nBorders
1139 pborder => pgrid%borders(iborder)
1141 nvals = pborder%nPclsRecv
1143 IF ( pborder%nPclsRecv == 0 ) cycle
1149 ALLOCATE(pborder%plag%recvBuff(nvarsreal,
nvals),stat=errorflag)
1150 global%error = errorflag
1151 IF ( global%error /= err_none )
THEN
1152 CALL
errorstop(global,err_allocate,__line__,
'pBorder%plag%recvBuff')
1155 ALLOCATE(pborder%plag%recvBuffInt(nvarsint,
nvals),stat=errorflag)
1156 global%error = errorflag
1157 IF ( global%error /= err_none )
THEN
1158 CALL
errorstop(global,err_allocate,__line__,
'pBorder%plag%recvBuffInt')
1208 TYPE(t_region
),
POINTER :: pregion
1214 INTEGER :: errorflag,iborder,
nvals,nvarsint,nvarsreal
1217 TYPE(t_grid),
POINTER :: pgrid
1223 global => pregion%global
1226 'PLAG_RFLU_ModComm.F90')
1232 pgrid => pregion%grid
1240 nvarsreal = 3*pregion%plag%nCv +pregion%plag%nArv
1241 nvarsint = pregion%plag%nAiv +1
1247 DO iborder = 1,pgrid%nBorders
1248 pborder => pgrid%borders(iborder)
1250 nvals = pborder%nPclsSend
1252 IF ( pborder%nPclsSend == 0 ) cycle
1258 ALLOCATE(pborder%plag%sendBuff(nvarsreal,
nvals),stat=errorflag)
1259 global%error = errorflag
1260 IF ( global%error /= err_none )
THEN
1261 CALL
errorstop(global,err_allocate,__line__,
'pBorder%plag%sendBuff')
1264 ALLOCATE(pborder%plag%sendBuffInt(nvarsint,
nvals),stat=errorflag)
1265 global%error = errorflag
1266 IF ( global%error /= err_none )
THEN
1267 CALL
errorstop(global,err_allocate,__line__,
'pBorder%plag%sendBuffInt')
1315 TYPE(t_region
),
POINTER :: pregion
1321 INTEGER :: errorflag,iborder
1324 TYPE(t_grid),
POINTER :: pgrid
1330 global => pregion%global
1333 'PLAG_RFLU_ModComm.F90')
1346 pgrid => pregion%grid
1352 DO iborder = 1,pgrid%nBorders
1353 pborder => pgrid%borders(iborder)
1355 IF ( pborder%nPclsRecv == 0 ) cycle
1361 DEALLOCATE(pborder%plag%recvBuff,stat=errorflag)
1362 global%error = errorflag
1363 IF ( global%error /= err_none )
THEN
1364 CALL
errorstop(global,err_deallocate,__line__,
'pBorder%plag%recvBuff')
1367 DEALLOCATE(pborder%plag%recvBuffInt,stat=errorflag)
1368 global%error = errorflag
1369 IF ( global%error /= err_none )
THEN
1370 CALL
errorstop(global,err_deallocate,__line__,
'pBorder%plag%recvBuffInt')
1423 TYPE(t_region
),
POINTER :: pregion
1429 INTEGER :: errorflag,iborder
1432 TYPE(t_grid),
POINTER :: pgrid
1438 global => pregion%global
1441 'PLAG_RFLU_ModComm.F90')
1447 pgrid => pregion%grid
1453 DO iborder = 1,pgrid%nBorders
1454 pborder => pgrid%borders(iborder)
1456 IF ( pborder%nPclsSend == 0 ) cycle
1462 DEALLOCATE(pborder%plag%sendBuff,stat=errorflag)
1463 global%error = errorflag
1464 IF ( global%error /= err_none )
THEN
1465 CALL
errorstop(global,err_deallocate,__line__,
'pBorder%plag%sendBuff')
1468 DEALLOCATE(pborder%plag%sendBuffInt,stat=errorflag)
1469 global%error = errorflag
1470 IF ( global%error /= err_none )
THEN
1471 CALL
errorstop(global,err_deallocate,__line__,
'pBorder%plag%sendBuffInt')
1519 TYPE(t_region
),
POINTER :: pregion
1525 INTEGER :: errorflag,iborder
1528 TYPE(t_grid),
POINTER :: pgrid
1534 global => pregion%global
1537 'PLAG_RFLU_ModComm.F90')
1543 pgrid => pregion%grid
1549 DO iborder = 1,pgrid%nBorders
1550 pborder => pgrid%borders(iborder)
1551 pborder%nPclsRecv = 0
1598 TYPE(t_region
),
POINTER :: pregion
1604 INTEGER :: errorflag,iborder
1607 TYPE(t_grid),
POINTER :: pgrid
1613 global => pregion%global
1616 'PLAG_RFLU_ModComm.F90')
1622 pgrid => pregion%grid
1628 DO iborder = 1,pgrid%nBorders
1629 pborder => pgrid%borders(iborder)
1630 pborder%nPclsSend = 0
1676 TYPE(t_region
),
POINTER :: pregion
1682 INTEGER :: errorflag,iborder,nvars,
tag
1686 TYPE(t_grid),
POINTER :: pgrid
1692 global => pregion%global
1695 'PLAG_RFLU_ModComm.F90')
1701 pgrid => pregion%grid
1709 DO iborder = 1,pgrid%nBorders
1710 pborder => pgrid%borders(iborder)
1716 IF ( pborder%iProc /= global%myProcid )
THEN
1717 tag = pborder%plag%tagCount
1719 CALL mpi_isend(pborder%nPclsSend,nvars,mpi_integer,pborder%iProc,
tag, &
1720 global%mpiComm,pborder%plag%sendRequestCount,errorflag)
1722 global%error = errorflag
1723 IF ( global%error /= err_none )
THEN
1724 CALL
errorstop(global,err_mpi_output,__line__)
1772 TYPE(t_region
),
POINTER :: pregion
1778 INTEGER :: errorflag,iborder,nbuffsint,nbuffsreal,
nvals,nvarsint, &
1779 nvarsreal,tagint,tagreal
1783 TYPE(t_grid),
POINTER :: pgrid
1789 global => pregion%global
1792 'PLAG_RFLU_ModComm.F90')
1798 pgrid => pregion%grid
1804 DO iborder = 1,pgrid%nBorders
1805 pborder => pgrid%borders(iborder)
1807 IF ( pborder%nPclsSend == 0 ) cycle
1809 nvarsreal =
SIZE(pborder%plag%sendBuff,1)
1810 nvarsint =
SIZE(pborder%plag%sendBuffInt,1)
1811 nvals =
SIZE(pborder%plag%sendBuff,2)
1813 nbuffsreal = nvarsreal *
nvals
1814 nbuffsint = nvarsint *
nvals
1816 IF (
nvals /= pborder%nPclsSend )
THEN
1817 CALL
errorstop(global,err_datadim_mismatch,__line__)
1824 IF ( pborder%iProc /= global%myProcid )
THEN
1830 tagint = pborder%plag%tagInt
1832 CALL mpi_isend(pborder%plag%sendBuffInt,nbuffsint,mpi_integer, &
1833 pborder%iProc,tagint,global%mpiComm, &
1834 pborder%plag%sendRequestInt,errorflag )
1835 global%error = errorflag
1836 IF ( global%error /= err_none )
THEN
1837 CALL
errorstop(global,err_mpi_output,__line__)
1844 tagreal = pborder%plag%tag
1846 CALL mpi_isend(pborder%plag%sendBuff,nbuffsreal,mpi_rfreal, &
1847 pborder%iProc,tagreal,global%mpiComm, &
1848 pborder%plag%sendRequest,errorflag )
1849 global%error = errorflag
1850 IF ( global%error /= err_none )
THEN
1851 CALL
errorstop(global,err_mpi_output,__line__)
1901 TYPE(t_region
),
POINTER :: pregion
1907 INTEGER :: errorflag,iborder,icg,iloc,ipcl,ipcl2,ivar,ivarbuff,&
1912 TYPE(t_grid),
POINTER :: pgrid
1913 TYPE(t_plag),
POINTER :: pplag
1919 global => pregion%global
1922 'PLAG_RFLU_ModComm.F90')
1928 pgrid => pregion%grid
1929 pplag => pregion%plag
1937 naiv = pregion%plag%nAiv
1938 narv = pregion%plag%nArv
1939 ncv = pregion%plag%nCv
1945 DO iborder = 1,pgrid%nBorders
1946 pborder => pgrid%borders(iborder)
1948 IF ( pborder%nPclsSend == 0 ) cycle
1954 DO ipcl = 1,pborder%nPclsSend
1960 ipcl2 = pborder%iPclSend(1,ipcl)
1962 IF ( pplag%aiv(aiv_plag_status,ipcl2) /= plag_status_comm )
THEN
1963 WRITE(*,*)
' PLAG_RFLU_LoadBuffersSend: PLAG_STATUS Mismatch'
1964 WRITE(*,*)
' iPcl2 = ',ipcl2
1965 WRITE(*,*)
' aivStatus = ' , pplag%aiv(aiv_plag_status,ipcl2)
1969 icg = pplag%aiv(aiv_plag_icells,ipcl2)
1971 IF ( icg < pgrid%nCells+1 )
THEN
1972 WRITE(*,*)
' PLAG_RFLU_LoadBuffersSend: Cell Bound Mismatch'
1973 WRITE(*,*)
' icg = ',icg
1974 WRITE(*,*)
' nCells+1 = ' , pgrid%nCells+1
1983 iloc = pborder%iPclSend(2,ipcl)
1985 IF ( iloc > pborder%nCellsRecv )
THEN
1986 WRITE(*,*)
' PLAG_RFLU_LoadBuffersSend: Cell Bound Mismatch on Recv Side'
1987 WRITE(*,*)
' iLoc = ',iloc
1988 WRITE(*,*)
' nCellsRecv = ' , pborder%nCellsRecv
2000 ivarbuff = ivarbuff+1
2001 pborder%plag%sendBuff(ivarbuff,ipcl) = pplag%cv(ivar,ipcl2)
2005 ivarbuff = ivarbuff+1
2006 pborder%plag%sendBuff(ivarbuff,ipcl) = pplag%cvOld(ivar,ipcl2)
2010 ivarbuff = ivarbuff+1
2011 pborder%plag%sendBuff(ivarbuff,ipcl) = pplag%rhsSum(ivar,ipcl2)
2015 ivarbuff = ivarbuff+1
2016 pborder%plag%sendBuff(ivarbuff,ipcl) = pplag%arv(ivar,ipcl2)
2024 pborder%plag%sendBuffInt(ivar,ipcl) = pplag%aiv(ivar,ipcl2)
2027 pborder%plag%sendBuffInt(naiv+1,ipcl) = iloc
2033 pborder%plag%sendBuffInt(aiv_plag_status,ipcl ) = plag_status_keep
2034 pplag%aiv(aiv_plag_status,ipcl2) = plag_status_delete
2084 TYPE(t_region
),
POINTER :: pregion
2090 INTEGER :: errorflag,iborder,nvars,
tag
2091 INTEGER ::
status(mpi_status_size)
2095 TYPE(t_grid),
POINTER :: pgrid
2101 global => pregion%global
2104 'PLAG_RFLU_ModComm.F90')
2110 pgrid => pregion%grid
2118 DO iborder = 1,pgrid%nBorders
2119 pborder => pgrid%borders(iborder)
2125 IF ( pborder%iProc /= global%myProcid )
THEN
2126 tag = pborder%plag%tagCount
2128 CALL mpi_recv(pborder%nPclsRecv,nvars,mpi_integer,pborder%iProc,
tag, &
2129 global%mpiComm,
status,errorflag)
2130 global%error = errorflag
2131 IF ( global%error /= err_none )
THEN
2132 CALL
errorstop(global,err_mpi_output,__line__)
2178 TYPE(t_region
),
POINTER :: pregion
2184 INTEGER :: errorflag,iborder,nbuffsint,nbuffsreal,
nvals,nvarsint, &
2185 nvarsreal,tagint,tagreal
2186 INTEGER ::
status(mpi_status_size),statusint(mpi_status_size)
2190 TYPE(t_grid),
POINTER :: pgrid
2196 global => pregion%global
2199 'PLAG_RFLU_ModComm.F90')
2205 pgrid => pregion%grid
2211 DO iborder = 1,pgrid%nBorders
2212 pborder => pgrid%borders(iborder)
2214 IF ( pborder%nPclsRecv == 0 ) cycle
2216 nvarsreal =
SIZE(pborder%plag%recvBuff,1)
2217 nvarsint =
SIZE(pborder%plag%recvBuffInt,1)
2218 nvals =
SIZE(pborder%plag%recvBuff,2)
2220 nbuffsreal = nvarsreal *
nvals
2221 nbuffsint = nvarsint *
nvals
2223 IF (
nvals /= pborder%nPclsRecv )
THEN
2224 CALL
errorstop(global,err_datadim_mismatch,__line__)
2231 IF ( pborder%iProc /= global%myProcid )
THEN
2237 tagint = pborder%plag%tagInt
2239 CALL mpi_recv(pborder%plag%recvBuffInt,nbuffsint,mpi_integer, &
2240 pborder%iProc,tagint,global%mpiComm,statusint,errorflag )
2241 global%error = errorflag
2242 IF ( global%error /= err_none )
THEN
2243 CALL
errorstop(global,err_mpi_output,__line__)
2250 tagreal = pborder%plag%tag
2252 CALL mpi_recv(pborder%plag%recvBuff,nbuffsreal,mpi_rfreal, &
2253 pborder%iProc,tagreal,global%mpiComm,
status,errorflag )
2254 global%error = errorflag
2255 IF ( global%error /= err_none )
THEN
2256 CALL
errorstop(global,err_mpi_output,__line__)
2305 TYPE(t_region
),
POINTER :: regions(:)
2311 INTEGER :: errorflag,iborder,ireg,iregglobal,npclscommglobal,&
2312 npclscommlocal,npclscommtot
2316 TYPE(t_grid),
POINTER :: pgrid
2317 TYPE(t_region
),
POINTER :: pregion
2323 global => regions(0)%global
2326 'PLAG_RFLU_ModComm.F90')
2334 DO ireg = 0,global%nRegionsLocal
2335 pregion => regions(ireg)
2336 pregion%global%nPclsCommTot = 0
2343 DO ireg = 0,global%nRegionsLocal
2344 pregion => regions(ireg)
2345 pgrid => pregion%grid
2347 iregglobal = pregion%iRegionGlobal
2349 DO iborder = 1,pgrid%nBorders
2350 pborder => pgrid%borders(iborder)
2352 npclscommlocal = npclscommlocal + pborder%nPclsSend
2365 CALL mpi_allreduce(npclscommlocal,npclscommglobal,1, &
2366 mpi_integer,mpi_sum,global%mpiComm,errorflag )
2367 global%error = errorflag
2368 IF ( global%error /= err_none )
THEN
2369 CALL
errorstop(global,err_mpi_trouble,__line__)
2376 DO ireg = 0,global%nRegionsLocal
2377 pregion => regions(ireg)
2379 pregion%global%nPclsCommTot = npclscommglobal
2380 global%nPclsCommTot = npclscommglobal
2441 TYPE(t_region
),
POINTER :: pregion
2447 INTEGER :: errorflag,iborder,icg,iloc,ipcl,ipcl2,ivar,ivarbuff,naiv,narv,&
2452 TYPE(t_grid),
POINTER :: pgrid
2453 TYPE(t_plag),
POINTER :: pplag
2459 global => pregion%global
2462 'PLAG_RFLU_ModComm.F90')
2468 pgrid => pregion%grid
2469 pplag => pregion%plag
2477 naiv = pregion%plag%nAiv
2478 narv = pregion%plag%nArv
2479 ncv = pregion%plag%nCv
2487 DO iborder = 1,pgrid%nBorders
2488 pborder => pgrid%borders(iborder)
2490 IF ( pborder%nPclsRecv == 0 ) cycle
2496 DO ipcl = 1,pborder%nPclsRecv
2503 iloc = pborder%plag%recvBuffInt(naiv+1,ipcl)
2505 IF ( iloc > pborder%nCellsSend )
THEN
2506 WRITE(*,*)
' PLAG_RFLU_UnloadBuffersRecv: Cell Bound Mismatch on Send Side'
2507 WRITE(*,*)
' iLoc = ',iloc
2508 WRITE(*,*)
' nCellsSend = ' , pborder%nCellsSend
2513 icg = pborder%icgSend(iloc)
2522 ivarbuff = ivarbuff+1
2523 pplag%cv(ivar,ipcl2) = pborder%plag%recvBuff(ivarbuff,ipcl)
2527 ivarbuff = ivarbuff+1
2528 pplag%cvOld(ivar,ipcl2) = pborder%plag%recvBuff(ivarbuff,ipcl)
2532 ivarbuff = ivarbuff+1
2533 pplag%rhsSum(ivar,ipcl2) = pborder%plag%recvBuff(ivarbuff,ipcl)
2537 ivarbuff = ivarbuff+1
2538 pplag%arv(ivar,ipcl2) = pborder%plag%recvBuff(ivarbuff,ipcl)
2547 pplag%aiv(ivar,ipcl2) = pborder%plag%recvBuffInt(ivar,ipcl)
2550 pplag%aiv(aiv_plag_icells,ipcl2) = icg
2551 pplag%aivOld(aiv_plag_icells,ipcl2) = icg
2559 pregion%plag%nPcls = ipcl2
subroutine plag_rflu_copycounters(regions)
subroutine plag_rflu_destroybufferssend(pRegion)
subroutine plag_rflu_clearrequest(global, request)
subroutine, public plag_rflu_findcellstrajfast(pRegion, iPclBeg, iPclEnd)
subroutine plag_rflu_initrecvcounters(pRegion)
subroutine plag_rflu_destroybuffersrecv(pRegion)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine plag_rflu_recvdata(pRegion)
subroutine plag_rflu_unloadbuffersrecv(pRegion)
subroutine plag_rflu_totalnpclscomm(regions)
subroutine plag_rflu_copydataint(global, pclData, pclData2)
subroutine, public plag_rflu_initsendcounters(pRegion)
subroutine plag_rflu_copydatareal(global, pclData, pclData2)
subroutine plag_rflu_createbuffersrecv(pRegion)
subroutine plag_rflu_clearrequestwrapper(pRegion, iReqFlag)
subroutine plag_rflu_isendcounters(pRegion)
subroutine, public plag_rflu_commdriver(regions)
subroutine plag_rflu_recvcounters(pRegion)
subroutine plag_rflu_createbufferssend(pRegion)
subroutine plag_calcderivedvariables(region)
LOGICAL function rflu_decideprint(global)
**********************************************************************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 USE ModDataTypes USE nvals
subroutine plag_rflu_loadbufferssend(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine plag_rflu_isenddata(pRegion)
subroutine plag_rflu_copydata(regions)
subroutine, public plag_reallocmemwrapper(pRegion)
subroutine, public plag_rflu_findcellstrajsafe(pRegion, iPclBeg, iPclEnd)