util/psb_c_mmio_impl.f90
 util/psb_d_mmio_impl.f90
 util/psb_s_mmio_impl.f90
 util/psb_z_mmio_impl.f90

MMIO fixes.
psblas3-accel
Salvatore Filippone 10 years ago
parent ded91544c7
commit 990c3475bd

@ -76,7 +76,7 @@ subroutine mm_cvet_read(b, info, iunit, filename)
read(line,fmt=*)nrow,ncol read(line,fmt=*)nrow,ncol
if ((psb_tolower(type) == 'real').and.(psb_tolower(sym) == 'general')) then if ((psb_tolower(type) == 'complex').and.(psb_tolower(sym) == 'general')) then
allocate(b(nrow),stat = ircode) allocate(b(nrow),stat = ircode)
if (ircode /= 0) goto 993 if (ircode /= 0) goto 993
do i=1, nrow do i=1, nrow
@ -210,18 +210,14 @@ subroutine mm_cvet2_write(b, header, info, iunit, filename)
endif endif
endif endif
write(outfile,'(a)') '%%MatrixMarket matrix array real general' write(outfile,'(a)') '%%MatrixMarket matrix array complex general'
write(outfile,'(a)') '% '//trim(header) write(outfile,'(a)') '% '//trim(header)
write(outfile,'(a)') '% ' write(outfile,'(a)') '% '
nrow = size(b,1) nrow = size(b,1)
ncol = size(b,2) ncol = size(b,2)
write(outfile,*) nrow,ncol write(outfile,*) nrow,ncol
write(frmtv,'(a,i0,a)') '(',2*ncol,'(es26.18,1x))' write(outfile,fmt='(2(es26.18,1x))') ((b(i,j), i=1,nrow),j=1,ncol)
do i=1,size(b,1)
write(outfile,frmtv) b(i,1:ncol)
end do
if (outfile /= 6) close(outfile) if (outfile /= 6) close(outfile)
@ -266,7 +262,7 @@ subroutine mm_cvet1_write(b, header, info, iunit, filename)
endif endif
endif endif
write(outfile,'(a)') '%%MatrixMarket matrix array real general' write(outfile,'(a)') '%%MatrixMarket matrix array complex general'
write(outfile,'(a)') '% '//trim(header) write(outfile,'(a)') '% '//trim(header)
write(outfile,'(a)') '% ' write(outfile,'(a)') '% '
nrow = size(b,1) nrow = size(b,1)

@ -208,13 +208,9 @@ subroutine mm_dvet2_write(b, header, info, iunit, filename)
write(outfile,'(a)') '% ' write(outfile,'(a)') '% '
nrow = size(b,1) nrow = size(b,1)
ncol = size(b,2) ncol = size(b,2)
write(outfile,*) nrow,ncol write(outfile,*) nrow, ncol
write(frmtv,'(a,i0,a)') '(',ncol,'(es26.18,1x))'
do i=1,size(b,1) write(outfile,fmt='(es26.18,1x)') ((b(i,j), i=1,nrow),j=1,ncol)
write(outfile,frmtv) b(i,1:ncol)
end do
if (outfile /= 6) close(outfile) if (outfile /= 6) close(outfile)

@ -212,11 +212,7 @@ subroutine mm_svet2_write(b, header, info, iunit, filename)
ncol = size(b,2) ncol = size(b,2)
write(outfile,*) nrow,ncol write(outfile,*) nrow,ncol
write(frmtv,'(a,i0,a)') '(',ncol,'(es26.18,1x))' write(outfile,fmt='(es26.18,1x)') ((b(i,j), i=1,nrow),j=1,ncol)
do i=1,size(b,1)
write(outfile,frmtv) b(i,1:ncol)
end do
if (outfile /= 6) close(outfile) if (outfile /= 6) close(outfile)

@ -76,7 +76,7 @@ subroutine mm_zvet_read(b, info, iunit, filename)
read(line,fmt=*)nrow,ncol read(line,fmt=*)nrow,ncol
if ((psb_tolower(type) == 'real').and.(psb_tolower(sym) == 'general')) then if ((psb_tolower(type) == 'complex').and.(psb_tolower(sym) == 'general')) then
allocate(b(nrow),stat = ircode) allocate(b(nrow),stat = ircode)
if (ircode /= 0) goto 993 if (ircode /= 0) goto 993
do i=1, nrow do i=1, nrow
@ -149,7 +149,7 @@ subroutine mm_zvet2_read(b, info, iunit, filename)
read(line,fmt=*)nrow,ncol read(line,fmt=*)nrow,ncol
if ((psb_tolower(type) == 'real').and.(psb_tolower(sym) == 'general')) then if ((psb_tolower(type) == 'complex').and.(psb_tolower(sym) == 'general')) then
allocate(b(nrow,ncol),stat = ircode) allocate(b(nrow,ncol),stat = ircode)
if (ircode /= 0) goto 993 if (ircode /= 0) goto 993
do j=1, ncol do j=1, ncol
@ -210,18 +210,14 @@ subroutine mm_zvet2_write(b, header, info, iunit, filename)
endif endif
endif endif
write(outfile,'(a)') '%%MatrixMarket matrix array real general' write(outfile,'(a)') '%%MatrixMarket matrix array complex general'
write(outfile,'(a)') '% '//trim(header) write(outfile,'(a)') '% '//trim(header)
write(outfile,'(a)') '% ' write(outfile,'(a)') '% '
nrow = size(b,1) nrow = size(b,1)
ncol = size(b,2) ncol = size(b,2)
write(outfile,*) nrow,ncol write(outfile,*) nrow,ncol
write(frmtv,'(a,i0,a)') '(',2*ncol,'(es26.18,1x))' write(outfile,fmt='(2(es26.18,1x))') ((b(i,j), i=1,nrow),j=1,ncol)
do i=1,size(b,1)
write(outfile,frmtv) b(i,1:ncol)
end do
if (outfile /= 6) close(outfile) if (outfile /= 6) close(outfile)

Loading…
Cancel
Save