Fixed various UMFPACK related issues.

psblas3-type-indexed
Salvatore Filippone 19 years ago
parent dc642591e4
commit e2a89a0c53

@ -246,7 +246,7 @@ contains
integer, intent(in) :: ip integer, intent(in) :: ip
logical :: is_legal_ml_fact logical :: is_legal_ml_fact
is_legal_ml_fact = ((ip>=f_ilu_n_).and.(ip<=f_slu_)) is_legal_ml_fact = ((ip>=f_ilu_n_).and.(ip<=f_umf_))
return return
end function is_legal_ml_fact end function is_legal_ml_fact
function is_legal_ml_lev(ip) function is_legal_ml_lev(ip)

@ -627,7 +627,7 @@ subroutine psb_umf_bld(a,desc_a,p,info)
endif endif
call fort_umf_factor(atmp%m,nzt,& call fort_umf_factor(atmp%m,nzt,&
& atmp%aspk,atmp%ia2,atmp%ia1,& & atmp%aspk,atmp%ia1,atmp%ia2,&
& p%iprcparm(umf_symptr_),p%iprcparm(umf_numptr_),info) & p%iprcparm(umf_symptr_),p%iprcparm(umf_numptr_),info)
if(info /= 0) then if(info /= 0) then
info=4010 info=4010
@ -811,6 +811,36 @@ subroutine psb_mlprec_bld(a,desc_a,p,info)
goto 9999 goto 9999
end if end if
case(f_umf_)
call psb_spall(0,0,p%av(l_pr_),1,info)
call psb_spall(0,0,p%av(u_pr_),1,info)
call psb_ipcsr2coo(p%av(ac_),info)
if(info /= 0) then
info=4011
call psb_errpush(info,name)
goto 9999
end if
k=0
do i=1,p%av(ac_)%infoa(psb_nnz_)
if (p%av(ac_)%ia2(i) <= p%av(ac_)%m) then
k = k + 1
p%av(ac_)%aspk(k) = p%av(ac_)%aspk(i)
p%av(ac_)%ia1(k) = p%av(ac_)%ia1(i)
p%av(ac_)%ia2(k) = p%av(ac_)%ia2(i)
end if
end do
p%av(ac_)%infoa(psb_nnz_) = k
call psb_ipcoo2csc(p%av(ac_),info)
call psb_spinfo(psb_nztotreq_,p%av(ac_),nzg,info)
call fort_umf_factor(nrg,nzg,&
& p%av(ac_)%aspk,p%av(ac_)%ia1,p%av(ac_)%ia2,&
& p%iprcparm(umf_symptr_),p%iprcparm(umf_numptr_),info)
if(info /= 0) then
info=4011
call psb_errpush(info,name)
goto 9999
end if
case default case default
write(0,*) 'Invalid fact type for multi level',(p%iprcparm(f_type_)) write(0,*) 'Invalid fact type for multi level',(p%iprcparm(f_type_))
end select end select

@ -79,6 +79,7 @@ Subroutine psb_dfixcoo(A,INFO,idir)
a%infoa(psb_srtd_) = psb_isrtdcoo_ a%infoa(psb_srtd_) = psb_isrtdcoo_
if(debug) write(0,*)'FIXCOO: end second loop' if(debug) write(0,*)'FIXCOO: end second loop'
case(1) ! Col major order case(1) ! Col major order
call mrgsrt(nza,a%ia2,iaux,iret) call mrgsrt(nza,a%ia2,iaux,iret)

@ -45,8 +45,7 @@ subroutine psb_dipcoo2csc(a,info,clshr)
allocate(iaux(nc+1)) allocate(iaux(nc+1))
if(debug) write(0,*)'DIPCOO2CSC: out of fixcoo',nza,nc,size(a%ia2),size(iaux) if(debug) write(0,*)'DIPCOO2CSC: out of fixcoo',nza,nc,size(a%ia2),size(iaux)
itemp => a%ia1 itemp => a%ia2
a%ia1 => a%ia2
a%ia2 => iaux a%ia2 => iaux
! !
@ -120,19 +119,24 @@ subroutine psb_dipcoo2csc(a,info,clshr)
j = j + 1 j = j + 1
if (j > nza) exit if (j > nza) exit
if (itemp(j) /= icl) then if (itemp(j) /= icl) then
if (i>nc) then
write(0,*) 'Strange situation in coo2csc: ',i,nc,size(a%ia2),&
& nza,j,itemp(j)
end if
a%ia2(i+1) = j a%ia2(i+1) = j
icl = itemp(j) icl = itemp(j)
i = i + 1 i = i + 1
endif endif
if (i>nc) exit
enddo outer enddo outer
! !
! Cleanup empty cols at the end ! Cleanup empty cols at the end
! !
if (j /= (nza+1)) then if (j /= (nza+1)) then
write(0,*) 'IPCOO2CSC : Problem from loop :',j,nza write(0,*) 'IPCOO2CSC : Problem from loop :',j,nza,itemp(j)
endif endif
do do
if (i>=nc+1) exit if (i>nc) exit
a%ia2(i+1) = j a%ia2(i+1) = j
i = i + 1 i = i + 1
end do end do

@ -124,6 +124,7 @@ subroutine psb_dipcoo2csr(a,info,rwshr)
irw = itemp(j) irw = itemp(j)
i = i + 1 i = i + 1
endif endif
if (i>nr) exit
enddo outer enddo outer
! !
! Cleanup empty rows at the end ! Cleanup empty rows at the end
@ -132,7 +133,7 @@ subroutine psb_dipcoo2csr(a,info,rwshr)
write(0,*) 'IPCOO2CSR : Problem from loop :',j,nza write(0,*) 'IPCOO2CSR : Problem from loop :',j,nza
endif endif
do do
if (i>=nr+1) exit if (i>nr) exit
a%ia2(i+1) = j a%ia2(i+1) = j
i = i + 1 i = i + 1
end do end do

@ -20,7 +20,7 @@ subroutine psb_dspinfo(ireq,a,ires,info,iaux)
integer, intent(out) :: ires, info integer, intent(out) :: ires, info
integer, intent(in), optional :: iaux integer, intent(in), optional :: iaux
integer :: i,j,k,ip,jp,nr,irw,nz, err_act, row, ipx, pia, pja, rb,idx integer :: i,j,k,ip,jp,nr,irw,nz, err_act, row, ipx, pia, pja, rb,idx, nc
integer, pointer :: ia1(:), ia2(:), ia3(:), ja(:) integer, pointer :: ia1(:), ia2(:), ia3(:), ja(:)
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -38,6 +38,9 @@ subroutine psb_dspinfo(ireq,a,ires,info,iaux)
ires = a%infoa(psb_nnz_) ires = a%infoa(psb_nnz_)
else if (a%fida == 'JAD') then else if (a%fida == 'JAD') then
ires = a%infoa(psb_nnz_) ires = a%infoa(psb_nnz_)
else if (a%fida == 'CSC') then
nc = a%k
ires = a%ia2(nc+1)-1
else else
ires=-1 ires=-1
info=136 info=136

Loading…
Cancel
Save