|
[Fortran] 纯文本查看 复制代码 01 | na = CtreeInd ( 1 , NLayer ) |
02 | nb = CtreeInd ( 2 , NLayer ) |
05 | b 2 = a 2 + iCtrees ( i ) % num - 1 |
07 | j 2 = j 1 + UnadmInd ( 2 , i ) - 1 |
11 | b 1 = a 1 + iCtrees ( j ) % num - 1 |
13 | allocate ( iNears ( k ) % nr ( a 1 : b 1 , a 2 : b 2 ) ) |
14 | call GetZmnMatrix ( iNears ( k ) % nr , iPoints , Npoint , iTris , Ntri , iEdges , Nedge , a 1 , b 1 , a 2 , b 2 , k 0 ) |
现有一个n*n(6000+*6000+)的方阵,之前的代码已经将矩阵分层,此处iNear(i)代表最小矩阵块,iNear(i)%nr(a1:b1,a2:b2)代表最小矩阵块的边,现在我是把原矩阵重新用簇树结构分层,形式为iblocks(i)%subblocks(j)%nr(a1:b1,a2:b2),现在我做的是将iNear(i)%nr(a1:b1,a2:b2)信息赋给iblocks(i)%subblocks(j)%nr(a1:b1,a2:b2),为啥代码运行一半报错内存溢出?
有个过渡变量iNear(i)%nr(a1:b1,a2:b2)→iboxNears(i)%nr(a1:b1,a2:b2)→iblocks(i1)%Subblocks(i2)%nr(a1:b1,a2:b2)
do i = 1, Nunadm
do j = 1, sbmax
if(untmp(1, i) /= iSubblocks(j)%row) then
cycle
else
if(untmp(2, i) /= iSubblocks(j)%coL) then
cycle
else
j1 = iSubblocks(j)%row
j2 = iSubblocks(j)%coL
a2 = iCtrees(j1)%begin
b2 = a2 + iCtrees(j1)%num - 1
a1 = iCtrees(j2)%begin
b1 = a1 + iCtrees(j2)%num - 1
i1 = BParam3(j)
i2 = j - 49*(i1 - k1)
write(*,*) i1,i2,i,j
allocate(iblocks(i1)%Subblocks(i2)%nrb(a1:b1, a2:b2))
iblocks(i1)%Subblocks(i2)%nrb = iboxNears(i)%nra
! call GetZmnMatrix(iblocks(i1)%iSubblocks(i2)%nr2, iPoints, Npoint, iTris, Ntri, iEdges, Nedge, a1, b1, a2, b2, k0)
end if
end if
end do
end do 求前辈指点一下,我分析不出来..
|
|