MESH: Make sure again the index nc is not out of the range.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
192d417431
commit
9ecbf83d5f
@ -739,11 +739,8 @@ module mesh
|
|||||||
nr = 1
|
nr = 1
|
||||||
nc = nc + 1
|
nc = nc + 1
|
||||||
end if
|
end if
|
||||||
if (nc <= nodes) then
|
flag = nc <= nodes
|
||||||
flag = lb(nr,nc) == 0
|
if (flag) flag = lb(nr,nc) == 0
|
||||||
else
|
|
||||||
flag = .false.
|
|
||||||
end if
|
|
||||||
do while(flag)
|
do while(flag)
|
||||||
np = min(npmax, np + 1)
|
np = min(npmax, np + 1)
|
||||||
nr = nr + 1
|
nr = nr + 1
|
||||||
@ -751,11 +748,8 @@ module mesh
|
|||||||
nr = 1
|
nr = 1
|
||||||
nc = nc + 1
|
nc = nc + 1
|
||||||
end if
|
end if
|
||||||
if (nc <= nodes) then
|
flag = nc <= nodes
|
||||||
flag = lb(nr,nc) == 0
|
if (flag) flag = lb(nr,nc) == 0
|
||||||
else
|
|
||||||
flag = .false.
|
|
||||||
end if
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end if ! nl >= lb(nr,np)
|
end if ! nl >= lb(nr,np)
|
||||||
@ -922,17 +916,18 @@ module mesh
|
|||||||
#ifdef MPI
|
#ifdef MPI
|
||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: status
|
logical :: flag
|
||||||
integer(kind=4) :: np, nl, nc, nr
|
integer :: status
|
||||||
|
integer(kind=4) :: np, nl, nc, nr
|
||||||
|
|
||||||
! local pointers
|
! local pointers
|
||||||
!
|
!
|
||||||
type(block_meta), pointer :: pmeta
|
type(block_meta), pointer :: pmeta
|
||||||
type(block_data), pointer :: pdata
|
type(block_data), pointer :: pdata
|
||||||
|
|
||||||
! tag for the MPI data exchange
|
! tag for the MPI data exchange
|
||||||
!
|
!
|
||||||
integer(kind=4) :: itag
|
integer(kind=4) :: itag
|
||||||
|
|
||||||
! array for number of data block for autobalancing
|
! array for number of data block for autobalancing
|
||||||
!
|
!
|
||||||
@ -1073,13 +1068,17 @@ module mesh
|
|||||||
nr = 1
|
nr = 1
|
||||||
nc = nc + 1
|
nc = nc + 1
|
||||||
end if
|
end if
|
||||||
do while(lb(nr,nc) == 0 .and. nc <= nodes)
|
flag = nc <= nodes
|
||||||
|
if (flag) flag = lb(nr,nc) == 0
|
||||||
|
do while(flag)
|
||||||
np = min(npmax, np + 1)
|
np = min(npmax, np + 1)
|
||||||
nr = nr + 1
|
nr = nr + 1
|
||||||
if (nr > lprocs) then
|
if (nr > lprocs) then
|
||||||
nr = 1
|
nr = 1
|
||||||
nc = nc + 1
|
nc = nc + 1
|
||||||
end if
|
end if
|
||||||
|
flag = nc <= nodes
|
||||||
|
if (flag) flag = lb(nr,nc) == 0
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end if ! nl >= lb(nr,np)
|
end if ! nl >= lb(nr,np)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user