diff --git a/model/src/PDLIB/yowelementpool.F90 b/model/src/PDLIB/yowelementpool.F90 index f1f06b293a..cbd2cc4d41 100644 --- a/model/src/PDLIB/yowelementpool.F90 +++ b/model/src/PDLIB/yowelementpool.F90 @@ -71,7 +71,7 @@ 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) @@ -79,7 +79,6 @@ function belongTo(ele_in, rank) logical :: belongTo integer :: myDomainID - integer :: nodes(3) integer J if(present(rank) .eqv. .true.) then diff --git a/model/src/PDLIB/yowexchangeModule.F90 b/model/src/PDLIB/yowexchangeModule.F90 index 630270d155..1fd4e0539c 100644 --- a/model/src/PDLIB/yowexchangeModule.F90 +++ b/model/src/PDLIB/yowexchangeModule.F90 @@ -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 @@ -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 @@ -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(:,:) @@ -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 @@ -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 diff --git a/model/src/PDLIB/yowfunction.F90 b/model/src/PDLIB/yowfunction.F90 index 29bdd78c06..d119a4c587 100644 --- a/model/src/PDLIB/yowfunction.F90 +++ b/model/src/PDLIB/yowfunction.F90 @@ -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(:) @@ -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 @@ -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 diff --git a/model/src/PDLIB/yowpdlibmain.F90 b/model/src/PDLIB/yowpdlibmain.F90 index 193c6c17c3..97e934e2fa 100644 --- a/model/src/PDLIB/yowpdlibmain.F90 +++ b/model/src/PDLIB/yowpdlibmain.F90 @@ -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 @@ -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(:) @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/model/src/PDLIB/yowrankModule.F90 b/model/src/PDLIB/yowrankModule.F90 index 8674ae6e3b..208cf7ea78 100644 --- a/model/src/PDLIB/yowrankModule.F90 +++ b/model/src/PDLIB/yowrankModule.F90 @@ -73,7 +73,7 @@ module yowRankModule !> allocate and exchange subroutine initRankModule() - use yowDatapool, only: nTasks, myrank + use yowDatapool, only: nTasks implicit none integer :: stat @@ -235,7 +235,7 @@ end subroutine exchangeIPLG !> \internal subroutine calcISTART() - use yowDatapool, only: nTasks, myrank + use yowDatapool, only: nTasks implicit none integer :: ir