Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions model/src/PDLIB/yowelementpool.F90
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,14 @@ module yowElementpool
!> conversione: If a element is connected to domain 1,2 and 3. It belongs to 1,2 and 3.
!> @param[in] rank optional. If not given, datapool:myrank is used
function belongTo(ele_in, rank)
use yowDatapool, only: myrank, nTasks
use yowDatapool, only: myrank
use yowNodepool, only: t_Node, nodes_global
implicit none
integer, intent(in) :: ele_in(3)
integer, intent(in), optional :: rank
logical :: belongTo

integer :: myDomainID
integer :: nodes(3)
integer J

if(present(rank) .eqv. .true.) then
Expand Down
10 changes: 5 additions & 5 deletions model/src/PDLIB/yowexchangeModule.F90
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ subroutine createMPIType(this)
use yowerr
use mpi_f08
use yowNodepool, only: ghostgl, np, ipgl
use yowDatapool, only: rtype, itype
use yowDatapool, only: rtype
implicit none
class(t_neighborDomain), intent(inout) :: this

Expand Down Expand Up @@ -249,7 +249,7 @@ end subroutine createMPITypes
!> \note MPI send tag: 10000 + neighbor MPI rank
subroutine PDLIB_exchange1Dreal(U)
use yowDatapool, only: comm, myrank, rkind
use yowNodepool, only: t_Node, nodes_global, np, ng, ghosts, npa
use yowNodepool, only: t_Node, ghosts, npa
use yowerr
use mpi_f08
implicit none
Expand Down Expand Up @@ -302,10 +302,12 @@ end subroutine PDLIB_exchange1Dreal
!> \note MPI send tag: 30000 + neighbor MPI rank
subroutine PDLIB_exchange2Dreal(U)
use yowDatapool, only: comm, myrank, rkind
use yowNodepool, only: t_Node, nodes_global, np, ng, ghosts, npa
use yowNodepool, only: t_Node, ghosts
use yowerr
use mpi_f08
#ifdef W3_DEBUGEXCH
USE W3ODATMD, only : IAPROC
#endif
implicit none
real(kind=rkind), intent(inout) :: U(:,:)

Expand Down Expand Up @@ -417,7 +419,6 @@ subroutine PDLIB_exchange1Dreal_zero(U)
integer :: i, ierr, tag
type(MPI_REQUEST) :: sendRqst(nConnDomains), recvRqst(nConnDomains)
type(MPI_STATUS) :: recvStat(nConnDomains), sendStat(nConnDomains)
character(len=200) errstr

! It is impossible to add these range checks because assumed shape array start vom 1:npa+1 even if you allocate it from 0:npa

Expand Down Expand Up @@ -487,7 +488,6 @@ subroutine PDLIB_exchange2Dreal_zero(U)
integer :: i, ierr, tag
type(MPI_REQUEST) :: sendRqst(nConnDomains), recvRqst(nConnDomains)
type(MPI_STATUS) :: recvStat(nConnDomains), sendStat(nConnDomains)
character(len=200) errstr

! It is impossible to add these range checks because assumed shape array start vom 1:npa+1 even if you allocate it from 0:npa
! if(size(U,2) /= npa+1) then
Expand Down
14 changes: 8 additions & 6 deletions model/src/PDLIB/yowfunction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@ END SUBROUTINE PDLIB_ABORT
!* *
!**********************************************************************
SUBROUTINE ComputeListNP_ListNPA_ListIPLG_Kernel
USE W3ODATMD, only : IAPROC, NAPROC, NTPROC
USE W3ODATMD, only : IAPROC, NAPROC
USE W3ADATMD, ONLY: MPI_COMM_WCMP
USE yowDatapool, only: rtype, istatus
USE yowDatapool, only: istatus
USE yowNodepool, only: npa, np, iplg
USE yowNodepool, only: ListNP, ListNPA, ListIPLG
use mpi_f08
#ifdef W3_DEBUGINIT
USE W3ODATMD, only : NTPROC
#endif
IMPLICIT NONE
integer IPROC, idx, IP, len, istat, sumNP, ierr
integer, allocatable :: iVect(:)
Expand Down Expand Up @@ -195,8 +198,7 @@ END SUBROUTINE ComputeListNP_ListNPA_ListIPLG_Kernel
SUBROUTINE ComputeListNP_ListNPA_ListIPLG
USE W3ODATMD, only : IAPROC, NAPROC, NTPROC
USE W3ADATMD, ONLY: MPI_COMM_WAVE
USE yowDatapool, only: rtype, istatus
USE yowNodepool, only: npa, np, iplg
USE yowDatapool, only: istatus
USE yowNodepool, only: ListNP, ListNPA, ListIPLG
use mpi_f08
IMPLICIT NONE
Expand Down Expand Up @@ -281,9 +283,9 @@ END SUBROUTINE ComputeListNP_ListNPA_ListIPLG
!* *
!**********************************************************************
SUBROUTINE ComputeBoundaryInformation
use yowNodepool, only: ListNP, ListNPA, ListIPLG
use yowNodepool, only: ListNPA, ListIPLG
USE W3GDATMD, ONLY: IOBP
USE W3ODATMD, only : IAPROC, NAPROC
USE W3ODATMD, only : NAPROC
IMPLICIT NONE
integer ListFirst(NAPROC), NbSend(NAPROC)
integer IPROC, eSend, IP, IP_glob, NPAloc
Expand Down
34 changes: 18 additions & 16 deletions model/src/PDLIB/yowpdlibmain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ module yowpdlibMain
subroutine initFromGridDim(MNP, MNE, INE_global, secDim, MPIcomm)
use mpi_f08, only: MPI_COMM
use yowDatapool, only: myrank, debugPrePartition, debugPostPartition
use yowNodepool, only: np_global, np, np_perProcSum, ng, ipgl, iplg, npa
use yowNodepool, only: np_global, np, np_perProcSum, ng
use yowElementpool, only: ne_global,ne
use yowSidepool, only: ns, ns_global
use yowExchangeModule, only: nConnDomains, setDimSize
use yowRankModule, only: initRankModule, ipgl_npa
use yowRankModule, only: initRankModule

integer, intent(in) :: MNP, MNE
integer, intent(in) :: INE_global(3,MNE)
integer, intent(in) :: secDim
type(MPI_COMM), intent(in) :: MPIcomm
integer :: istat, memunit
integer :: memunit

! note: myrank=0 until after initMPI is called, so only rank=0 file
! contains the 'section 1' information
Expand Down Expand Up @@ -433,12 +433,16 @@ subroutine runParmetis(MNP)
! Parmetis
! Node neighbor information
integer :: wgtflag, numflag, ndims, nparts, edgecut, ncon
integer, allocatable :: xadj(:), part(:), vwgt(:), adjwgt(:), vtxdist(:), options(:), adjncy(:), iweights(:)
integer, allocatable :: xadj(:), part(:), vwgt(:), adjwgt(:), vtxdist(:), options(:), adjncy(:)
#ifdef WEIGHTS
integer, allocatable :: iweights(:)
integer :: itmp
logical :: lexist = .false.
#endif
! parmetis need single precision
real(4), allocatable :: xyz(:), tpwgts(:), ubvec(:)
integer :: IP_glob, itmp
integer :: IP_glob
integer :: ref
logical :: lexist = .false.
! Node to domain mapping.
! np_global long. give the domain number for die global node number
integer, allocatable :: node2domain(:)
Expand Down Expand Up @@ -1018,7 +1022,7 @@ end subroutine findGhostNodes
subroutine findConnDomains
use yowerr, only: parallel_abort
use yowNodepool, only: ghosts, ng, t_Node
use yowDatapool, only: nTasks, myrank
use yowDatapool, only: nTasks
use yowExchangeModule, only: neighborDomains, initNbrDomains

integer :: i, stat, itemp
Expand Down Expand Up @@ -1102,7 +1106,7 @@ end subroutine findConnDomains
subroutine exchangeGhostIds
use yowerr
use yowNodepool, only: np, t_node, nodes
use yowDatapool, only: nTasks, myrank, comm
use yowDatapool, only: myrank, comm
use yowExchangeModule, only: neighborDomains, nConnDomains, createMPITypes
use mpi_f08

Expand Down Expand Up @@ -1232,7 +1236,7 @@ subroutine postPartition2(INE_global)
use yowElementpool, only: ne, ne_global, INE, belongto, ielg
use yowerr, only: parallel_abort
use yowDatapool, only: myrank
use yowNodepool, only: np_global, np, nodes_global, iplg, t_Node, ghostlg, ng, npa
use yowNodepool, only: np, nodes_global, iplg, t_Node, ghostlg, ng, npa
use yowNodepool, only: x, y, z
use w3gdatmd, only: xgrd, ygrd, zb

Expand Down Expand Up @@ -1352,12 +1356,11 @@ end subroutine postPartition2
!* *
!**********************************************************************
subroutine ComputeTRIA_IEN_SI_CCON
use yowElementpool, only: ne, ne_global, INE, ielg
use yowElementpool, only: ne, INE
use yowExchangeModule, only : PDLIB_exchange1Dreal
use yowerr, only: parallel_abort
use yowDatapool, only: myrank
use yowNodepool, only: np_global, np, iplg, t_Node, ghostlg, ng, npa
use yowNodepool, only: x, y, z, PDLIB_SI, PDLIB_IEN, PDLIB_TRIA, PDLIB_CCON, PDLIB_TRIA03
use yowNodepool, only: t_Node, npa
use yowNodepool, only: x, y, PDLIB_SI, PDLIB_IEN, PDLIB_TRIA, PDLIB_CCON, PDLIB_TRIA03

integer I1, I2, I3, stat, IE, NI(3)
real :: DXP1, DXP2, DXP3, DYP1, DYP2, DYP3, DBLTMP, TRIA03
Expand Down Expand Up @@ -1452,10 +1455,9 @@ end subroutine CORRECT_DX_GT180
!* *
!**********************************************************************
subroutine ComputeIA_JA_POSI_NNZ
use yowElementpool, only: ne, ne_global, INE, ielg
use yowElementpool, only: ne, INE
use yowerr, only: parallel_abort
use yowDatapool, only: myrank
use yowNodepool, only: np_global, np, nodes_global, iplg, t_Node, ghostlg, ng, npa
use yowNodepool, only: t_Node, npa
use yowNodepool, only: PDLIB_CCON, PDLIB_IA, PDLIB_JA, PDLIB_JA_IE, PDLIB_IA_P, PDLIB_JA_P
use yowNodepool, only: PDLIB_NNZ, PDLIB_POSI, PDLIB_IE_CELL, PDLIB_POS_CELL, PDLIB_IE_CELL2
use yowNodepool, only: PDLIB_POS_CELL2, PDLIB_I_DIAG
Expand Down
4 changes: 2 additions & 2 deletions model/src/PDLIB/yowrankModule.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module yowRankModule

!> allocate and exchange
subroutine initRankModule()
use yowDatapool, only: nTasks, myrank
use yowDatapool, only: nTasks
implicit none
integer :: stat

Expand Down Expand Up @@ -235,7 +235,7 @@ end subroutine exchangeIPLG

!> \internal
subroutine calcISTART()
use yowDatapool, only: nTasks, myrank
use yowDatapool, only: nTasks
implicit none
integer :: ir

Expand Down