Fix printout on COO format.

psblas3-type-indexed
Salvatore Filippone 18 years ago
parent 813ec76c8a
commit 6ce39bed18

@ -70,7 +70,7 @@ subroutine psb_dcsprt(iout,a,iv,eirs,eics,head,ivr,ivc)
else else
ics = 0 ics = 0
endif endif
open(iout)
if (present(head)) then if (present(head)) then
write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a)') '%%MatrixMarket matrix coordinate real general'
write(iout,'(a,a)') '% ',head write(iout,'(a,a)') '% ',head
@ -157,7 +157,12 @@ subroutine psb_dcsprt(iout,a,iv,eirs,eics,head,ivr,ivc)
endif endif
case ('COO') case ('COO')
if(present(iv)) then
write(iout,*) a%m,a%k,a%infoa(psb_nnz_)
do j=1,a%infoa(psb_nnz_)
write(iout,frmtr) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j)
enddo
else
if (present(ivr).and..not.present(ivc)) then if (present(ivr).and..not.present(ivc)) then
write(iout,*) a%m,a%k,a%infoa(psb_nnz_) write(iout,*) a%m,a%k,a%infoa(psb_nnz_)
do j=1,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_)
@ -179,8 +184,9 @@ subroutine psb_dcsprt(iout,a,iv,eirs,eics,head,ivr,ivc)
write(iout,frmtr) a%ia1(j),a%ia2(j),a%aspk(j) write(iout,frmtr) a%ia1(j),a%ia2(j),a%aspk(j)
enddo enddo
endif endif
endif
case default case default
write(0,*) 'Feeling lazy today, format not implemented: "',a%fida,'"' write(0,*) 'Feeling lazy today, format not implemented: "',a%fida,'"'
end select end select
close(iout)
end subroutine psb_dcsprt end subroutine psb_dcsprt

@ -157,7 +157,12 @@ subroutine psb_zcsprt(iout,a,iv,eirs,eics,head,ivr,ivc)
endif endif
case ('COO') case ('COO')
if(present(iv)) then
write(iout,*) a%m,a%k,a%infoa(psb_nnz_)
do j=1,a%infoa(psb_nnz_)
write(iout,frmtr) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j)
enddo
else
if (present(ivr).and..not.present(ivc)) then if (present(ivr).and..not.present(ivc)) then
write(iout,*) a%m,a%k,a%infoa(psb_nnz_) write(iout,*) a%m,a%k,a%infoa(psb_nnz_)
do j=1,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_)
@ -179,8 +184,9 @@ subroutine psb_zcsprt(iout,a,iv,eirs,eics,head,ivr,ivc)
write(iout,frmtr) a%ia1(j),a%ia2(j),a%aspk(j) write(iout,frmtr) a%ia1(j),a%ia2(j),a%aspk(j)
enddo enddo
endif endif
endif
case default case default
write(0,*) 'Feeling lazy today, format not implemented: "',a%fida,'"' write(0,*) 'Feeling lazy today, format not implemented: "',a%fida,'"'
end select end select
close(iout)
end subroutine psb_zcsprt end subroutine psb_zcsprt

Loading…
Cancel
Save