diff --git a/util/psb_i_mmio_impl.f90 b/util/psb_i_mmio_impl.f90 index 04eead3f..cb708f3a 100644 --- a/util/psb_i_mmio_impl.f90 +++ b/util/psb_i_mmio_impl.f90 @@ -284,3 +284,35 @@ subroutine mm_ivet1_write(b, header, info, iunit, filename) end subroutine mm_ivet1_write +subroutine mm_ivect_read(b, info, iunit, filename) + use psb_base_mod + use psb_mmio_mod, psb_protect_name => mm_ivect_read + implicit none + type(psb_i_vect_type), intent(inout) :: b + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: iunit + character(len=*), optional, intent(in) :: filename + ! + integer(psb_ipk_), allocatable :: bv(:) + + call mm_array_read(bv, info, iunit, filename) + if (info == 0) call b%bld(bv) + +end subroutine mm_ivect_read + +subroutine mm_ivect_write(b, header, info, iunit, filename) + use psb_base_mod + use psb_mmio_mod, psb_protect_name => mm_ivect_write + implicit none + type(psb_i_vect_type), intent(inout) :: 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 + info = psb_success_ + if (.not.allocated(b%v)) return + call b%sync() + + call mm_array_write(b%v%v,header,info,iunit,filename) + +end subroutine mm_ivect_write diff --git a/util/psb_mmio_mod.F90 b/util/psb_mmio_mod.F90 index 0772e726..8ef6e44f 100644 --- a/util/psb_mmio_mod.F90 +++ b/util/psb_mmio_mod.F90 @@ -34,7 +34,7 @@ module psb_mmio_mod use psb_base_mod, only : psb_ipk_, psb_spk_, psb_dpk_,& & psb_s_vect_type, psb_d_vect_type, & - & psb_c_vect_type, psb_z_vect_type, & + & psb_c_vect_type, psb_z_vect_type, psb_i_vect_type,& & psb_sspmat_type, psb_cspmat_type, & & psb_dspmat_type, psb_zspmat_type @@ -157,6 +157,14 @@ module psb_mmio_mod integer(psb_ipk_), optional, intent(in) :: iunit character(len=*), optional, intent(in) :: filename end subroutine mm_zvect_read + subroutine mm_ivect_read(b, info, iunit, filename) + import :: psb_spk_, psb_ipk_,psb_i_vect_type + implicit none + type(psb_i_vect_type), intent(inout) :: b + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: iunit + character(len=*), optional, intent(in) :: filename + end subroutine mm_ivect_read end interface @@ -296,6 +304,15 @@ module psb_mmio_mod integer(psb_ipk_), optional, intent(in) :: iunit character(len=*), optional, intent(in) :: filename end subroutine mm_zvect_write + subroutine mm_ivect_write(b, header, info, iunit, filename) + import :: psb_spk_, psb_ipk_,psb_i_vect_type + implicit none + type(psb_i_vect_type), intent(inout) :: 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_ivect_write end interface #if ! defined(HAVE_BUGGY_GENERICS)