test/fileread/cf_sample.f90
 test/fileread/df_sample.f90
 test/fileread/sf_sample.f90
 test/fileread/zf_sample.f90
 util/psb_c_mmio_impl.f90
 util/psb_mmio_mod.f90
 util/psb_s_mmio_impl.f90
 util/psb_z_mmio_impl.f90

Fix new interface for mm_array_read/write and usage in fileread.
psblas-3.2.0
Salvatore Filippone 11 years ago
parent 1609ab9ffe
commit cd4d33c42a

@ -120,7 +120,7 @@ program cf_sample
call mm_mat_read(aux_a,info,iunit=iunit,filename=mtrx_file)
if (info == psb_success_) then
if (rhs_file /= 'NONE') then
call mm_vet_read(aux_b,info,iunit=iunit,filename=rhs_file)
call mm_array_read(aux_b,info,iunit=iunit,filename=rhs_file)
end if
end if

@ -122,7 +122,7 @@ program df_sample
call mm_mat_read(aux_a,info,iunit=iunit,filename=mtrx_file)
if (info == psb_success_) then
if (rhs_file /= 'NONE') then
call mm_vet_read(aux_b,info,iunit=iunit,filename=rhs_file)
call mm_array_read(aux_b,info,iunit=iunit,filename=rhs_file)
end if
end if

@ -121,7 +121,7 @@ program sf_sample
call mm_mat_read(aux_a,info,iunit=iunit,filename=mtrx_file)
if (info == psb_success_) then
if (rhs_file /= 'NONE') then
call mm_vet_read(aux_b,info,iunit=iunit,filename=rhs_file)
call mm_array_read(aux_b,info,iunit=iunit,filename=rhs_file)
end if
end if

@ -120,7 +120,7 @@ program zf_sample
call mm_mat_read(aux_a,info,iunit=iunit,filename=mtrx_file)
if (info == psb_success_) then
if (rhs_file /= 'NONE') then
call mm_vet_read(aux_b,info,iunit=iunit,filename=rhs_file)
call mm_array_read(aux_b,info,iunit=iunit,filename=rhs_file)
end if
end if

@ -81,7 +81,7 @@ subroutine mm_cvet_read(b, info, iunit, filename)
if (ircode /= 0) goto 993
do i=1, nrow
read(infile,fmt=*,end=902) bre,bim
b(i,j) = cmplx(bre,bim,kind=psb_spk_)
b(i) = cmplx(bre,bim,kind=psb_spk_)
end do
end if ! read right hand sides
if (infile /= 5) close(infile)

@ -106,72 +106,6 @@ module psb_mmio_mod
end subroutine mm_zvet2_read
end interface
interface mm_vet_read
subroutine mm_svet_read(b, info, iunit, filename)
import :: psb_spk_, psb_ipk_
implicit none
real(psb_spk_), allocatable, intent(out) :: b(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_svet_read
subroutine mm_dvet_read(b, info, iunit, filename)
import :: psb_dpk_, psb_ipk_
implicit none
real(psb_dpk_), allocatable, intent(out) :: b(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_dvet_read
subroutine mm_cvet_read(b, info, iunit, filename)
import :: psb_spk_, psb_ipk_
implicit none
complex(psb_spk_), allocatable, intent(out) :: b(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_cvet_read
subroutine mm_zvet_read(b, info, iunit, filename)
import :: psb_dpk_, psb_ipk_
implicit none
complex(psb_dpk_), allocatable, intent(out) :: b(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_zvet_read
subroutine mm_svet2_read(b, info, iunit, filename)
import :: psb_spk_, psb_ipk_
implicit none
real(psb_spk_), allocatable, intent(out) :: b(:,:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_svet2_read
subroutine mm_dvet2_read(b, info, iunit, filename)
import :: psb_dpk_, psb_ipk_
implicit none
real(psb_dpk_), allocatable, intent(out) :: b(:,:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_dvet2_read
subroutine mm_cvet2_read(b, info, iunit, filename)
import :: psb_spk_, psb_ipk_
implicit none
complex(psb_spk_), allocatable, intent(out) :: b(:,:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_cvet2_read
subroutine mm_zvet2_read(b, info, iunit, filename)
import :: psb_dpk_, psb_ipk_
implicit none
complex(psb_dpk_), allocatable, intent(out) :: b(:,:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_zvet2_read
end interface
interface mm_array_write
@ -250,81 +184,6 @@ module psb_mmio_mod
end interface
interface mm_vet_write
subroutine mm_svet2_write(b, header, info, iunit, filename)
import :: psb_spk_, psb_ipk_
implicit none
real(psb_spk_), intent(in) :: b(:,:)
character(len=*), intent(in) :: header
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_svet2_write
subroutine mm_svet1_write(b, header, info, iunit, filename)
import :: psb_spk_, psb_ipk_
implicit none
real(psb_spk_), intent(in) :: b(:)
character(len=*), intent(in) :: header
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_svet1_write
subroutine mm_dvet2_write(b, header, info, iunit, filename)
import :: psb_dpk_, psb_ipk_
implicit none
real(psb_dpk_), intent(in) :: b(:,:)
character(len=*), intent(in) :: header
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_dvet2_write
subroutine mm_dvet1_write(b, header, info, iunit, filename)
import :: psb_dpk_, psb_ipk_
implicit none
real(psb_dpk_), intent(in) :: b(:)
character(len=*), intent(in) :: header
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_dvet1_write
subroutine mm_cvet2_write(b, header, info, iunit, filename)
import :: psb_spk_, psb_ipk_
implicit none
complex(psb_spk_), intent(in) :: b(:,:)
character(len=*), intent(in) :: header
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_cvet2_write
subroutine mm_cvet1_write(b, header, info, iunit, filename)
import :: psb_spk_, psb_ipk_
implicit none
complex(psb_spk_), intent(in) :: b(:)
character(len=*), intent(in) :: header
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_cvet1_write
subroutine mm_zvet2_write(b, header, info, iunit, filename)
import :: psb_dpk_, psb_ipk_
implicit none
complex(psb_dpk_), intent(in) :: b(:,:)
character(len=*), intent(in) :: header
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_zvet2_write
subroutine mm_zvet1_write(b, header, info, iunit, filename)
import :: psb_dpk_, psb_ipk_
implicit none
complex(psb_dpk_), intent(in) :: b(:)
character(len=*), intent(in) :: header
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: iunit
character(len=*), optional, intent(in) :: filename
end subroutine mm_zvet1_write
end interface
interface mm_mat_read
subroutine smm_mat_read(a, info, iunit, filename)
import :: psb_sspmat_type, psb_ipk_

@ -171,7 +171,7 @@ subroutine mm_svet2_read(b, info, iunit, filename)
993 write(psb_err_unit,*) 'mm_vet_read: memory allocation failure'
info = -3
return
end subroutine mm_svet_read
end subroutine mm_svet2_read
subroutine mm_svet2_write(b, header, info, iunit, filename)
use psb_base_mod

@ -81,7 +81,7 @@ subroutine mm_zvet_read(b, info, iunit, filename)
if (ircode /= 0) goto 993
do i=1, nrow
read(infile,fmt=*,end=902) bre,bim
b(i,j) = cmplx(bre,bim,kind=psb_dpk_)
b(i) = cmplx(bre,bim,kind=psb_dpk_)
end do
end if ! read right hand sides
if (infile /= 5) close(infile)

Loading…
Cancel
Save