diff --git a/util/psb_c_mmio_impl.f90 b/util/psb_c_mmio_impl.f90 index b30acf8d..a11196c0 100644 --- a/util/psb_c_mmio_impl.f90 +++ b/util/psb_c_mmio_impl.f90 @@ -76,7 +76,7 @@ subroutine mm_cvet_read(b, info, iunit, filename) 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) if (ircode /= 0) goto 993 do i=1, nrow @@ -210,18 +210,14 @@ subroutine mm_cvet2_write(b, header, info, iunit, filename) 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)') '% ' nrow = size(b,1) ncol = size(b,2) write(outfile,*) nrow,ncol - write(frmtv,'(a,i0,a)') '(',2*ncol,'(es26.18,1x))' - - do i=1,size(b,1) - write(outfile,frmtv) b(i,1:ncol) - end do + write(outfile,fmt='(2(es26.18,1x))') ((b(i,j), i=1,nrow),j=1,ncol) if (outfile /= 6) close(outfile) @@ -266,7 +262,7 @@ subroutine mm_cvet1_write(b, header, info, iunit, filename) 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)') '% ' nrow = size(b,1) diff --git a/util/psb_d_mmio_impl.f90 b/util/psb_d_mmio_impl.f90 index f912ed4a..43903031 100644 --- a/util/psb_d_mmio_impl.f90 +++ b/util/psb_d_mmio_impl.f90 @@ -208,13 +208,9 @@ subroutine mm_dvet2_write(b, header, info, iunit, filename) write(outfile,'(a)') '% ' nrow = size(b,1) ncol = size(b,2) - write(outfile,*) nrow,ncol - - write(frmtv,'(a,i0,a)') '(',ncol,'(es26.18,1x))' + write(outfile,*) nrow, ncol - do i=1,size(b,1) - write(outfile,frmtv) b(i,1:ncol) - end do + write(outfile,fmt='(es26.18,1x)') ((b(i,j), i=1,nrow),j=1,ncol) if (outfile /= 6) close(outfile) diff --git a/util/psb_s_mmio_impl.f90 b/util/psb_s_mmio_impl.f90 index 7085a207..a50b122d 100644 --- a/util/psb_s_mmio_impl.f90 +++ b/util/psb_s_mmio_impl.f90 @@ -212,11 +212,7 @@ subroutine mm_svet2_write(b, header, info, iunit, filename) ncol = size(b,2) write(outfile,*) nrow,ncol - write(frmtv,'(a,i0,a)') '(',ncol,'(es26.18,1x))' - - do i=1,size(b,1) - write(outfile,frmtv) b(i,1:ncol) - end do + write(outfile,fmt='(es26.18,1x)') ((b(i,j), i=1,nrow),j=1,ncol) if (outfile /= 6) close(outfile) diff --git a/util/psb_z_mmio_impl.f90 b/util/psb_z_mmio_impl.f90 index 6b58a6f1..2fe55226 100644 --- a/util/psb_z_mmio_impl.f90 +++ b/util/psb_z_mmio_impl.f90 @@ -76,7 +76,7 @@ subroutine mm_zvet_read(b, info, iunit, filename) 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) if (ircode /= 0) goto 993 do i=1, nrow @@ -149,7 +149,7 @@ subroutine mm_zvet2_read(b, info, iunit, filename) 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) if (ircode /= 0) goto 993 do j=1, ncol @@ -210,18 +210,14 @@ subroutine mm_zvet2_write(b, header, info, iunit, filename) 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)') '% ' nrow = size(b,1) ncol = size(b,2) write(outfile,*) nrow,ncol - write(frmtv,'(a,i0,a)') '(',2*ncol,'(es26.18,1x))' - - do i=1,size(b,1) - write(outfile,frmtv) b(i,1:ncol) - end do + write(outfile,fmt='(2(es26.18,1x))') ((b(i,j), i=1,nrow),j=1,ncol) if (outfile /= 6) close(outfile)