base/internals/psi_desc_impl.f90
 base/internals/psi_idx_ins_cnv.f90
 base/modules/psb_desc_type.f90
 base/serial/Makefile
 base/serial/impl
 base/tools/psb_casb.f90
 base/tools/psb_cd_inloc.f90
 base/tools/psb_cd_set_bld.f90
 base/tools/psb_cdall.f90
 base/tools/psb_cdals.f90
 base/tools/psb_cdalv.f90
 base/tools/psb_cdcpy.F90
 base/tools/psb_cdcpy.f90
 base/tools/psb_cdprt.f90
 base/tools/psb_cdrep.f90
 base/tools/psb_cfree.f90
 base/tools/psb_cins.f90
 base/tools/psb_cspfree.f90
 base/tools/psb_dasb.f90
 base/tools/psb_dfree.f90
 base/tools/psb_dins.f90
 base/tools/psb_dspfree.f90
 base/tools/psb_glob_to_loc.f90
 base/tools/psb_iasb.f90
 base/tools/psb_icdasb.F90
 base/tools/psb_ifree.f90
 base/tools/psb_iins.f90
 base/tools/psb_sasb.f90
 base/tools/psb_sfree.f90
 base/tools/psb_sins.f90
 base/tools/psb_sspfree.f90
 base/tools/psb_zasb.f90
 base/tools/psb_zfree.f90
 base/tools/psb_zins.f90
 base/tools/psb_zspfree.f90


Take out matrix_data component.
psblas3-type-indexed
Salvatore Filippone 14 years ago
parent 45414785de
commit 13e745a348

@ -88,7 +88,7 @@ subroutine psi_cnv_dsc(halo_in,ovrlap_in,ext_in,cdesc, info)
debug_unit = psb_get_debug_unit()
info = psb_success_
ictxt = cdesc%matrix_data(psb_ctxt_)
ictxt = psb_cd_get_context(cdesc)
call psb_info(ictxt,me,np)
if (np == -1) then
@ -107,9 +107,9 @@ subroutine psi_cnv_dsc(halo_in,ovrlap_in,ext_in,cdesc, info)
goto 9999
end if
call psb_move_alloc(idx_out,cdesc%halo_index,info)
cdesc%matrix_data(psb_thal_xch_) = nxch
cdesc%matrix_data(psb_thal_snd_) = nsnd
cdesc%matrix_data(psb_thal_rcv_) = nrcv
!!$ cdesc%matrix_data(psb_thal_xch_) = nxch
!!$ cdesc%matrix_data(psb_thal_snd_) = nsnd
!!$ cdesc%matrix_data(psb_thal_rcv_) = nrcv
if (debug_level>0) write(debug_unit,*) me,'Done crea_index on halo'
if (debug_level>0) write(debug_unit,*) me,'Calling crea_index on ext'
@ -123,9 +123,9 @@ subroutine psi_cnv_dsc(halo_in,ovrlap_in,ext_in,cdesc, info)
goto 9999
end if
call psb_move_alloc(idx_out,cdesc%ext_index,info)
cdesc%matrix_data(psb_text_xch_) = nxch
cdesc%matrix_data(psb_text_snd_) = nsnd
cdesc%matrix_data(psb_text_rcv_) = nrcv
!!$ cdesc%matrix_data(psb_text_xch_) = nxch
!!$ cdesc%matrix_data(psb_text_snd_) = nsnd
!!$ cdesc%matrix_data(psb_text_rcv_) = nrcv
if (debug_level>0) write(debug_unit,*) me,'Done crea_index on ext'
if (debug_level>0) write(debug_unit,*) me,'Calling crea_index on ovrlap'
@ -142,9 +142,9 @@ subroutine psi_cnv_dsc(halo_in,ovrlap_in,ext_in,cdesc, info)
goto 9999
end if
cdesc%matrix_data(psb_tovr_xch_) = nxch
cdesc%matrix_data(psb_tovr_snd_) = nsnd
cdesc%matrix_data(psb_tovr_rcv_) = nrcv
!!$ cdesc%matrix_data(psb_tovr_xch_) = nxch
!!$ cdesc%matrix_data(psb_tovr_snd_) = nsnd
!!$ cdesc%matrix_data(psb_tovr_rcv_) = nrcv
! next ovrlap_elem
if (debug_level>0) write(debug_unit,*) me,'Calling crea_ovr_elem'
@ -170,9 +170,9 @@ subroutine psi_cnv_dsc(halo_in,ovrlap_in,ext_in,cdesc, info)
goto 9999
end if
cdesc%matrix_data(psb_tmov_xch_) = nxch
cdesc%matrix_data(psb_tmov_snd_) = nsnd
cdesc%matrix_data(psb_tmov_rcv_) = nrcv
!!$ cdesc%matrix_data(psb_tmov_xch_) = nxch
!!$ cdesc%matrix_data(psb_tmov_snd_) = nsnd
!!$ cdesc%matrix_data(psb_tmov_rcv_) = nrcv
! finally bnd_elem
call psi_crea_bnd_elem(idx_out,cdesc,info)

@ -119,7 +119,7 @@ subroutine psi_idx_ins_cnv1(nv,idxin,desc,info,mask)
goto 9999
end if
desc%matrix_data(psb_n_col_) = desc%indxmap%get_lc()
!!$ desc%matrix_data(psb_n_col_) = desc%indxmap%get_lc()
call psb_erractionrestore(err_act)
return

@ -200,7 +200,7 @@ module psb_descriptor_type
type psb_desc_type
integer, allocatable :: matrix_data(:)
!!$ integer, allocatable :: matrix_data(:)
integer, allocatable :: halo_index(:)
integer, allocatable :: ext_index(:)
integer, allocatable :: ovrlap_index(:)
@ -241,16 +241,11 @@ module psb_descriptor_type
module procedure psb_is_bld_desc
end interface psb_is_bld_desc
interface psb_is_large_desc
module procedure psb_is_large_desc
end interface psb_is_large_desc
interface psb_move_alloc
module procedure psb_cdtransfer
end interface psb_move_alloc
interface psb_free
module procedure psb_cdfree
end interface psb_free
@ -269,7 +264,7 @@ contains
integer(psb_long_int_k_) :: val
val = 0
if (allocated(desc%matrix_data)) val = val + psb_sizeof_int*size(desc%matrix_data)
!!$ if (allocated(desc%matrix_data)) val = val + psb_sizeof_int*size(desc%matrix_data)
if (allocated(desc%halo_index)) val = val + psb_sizeof_int*size(desc%halo_index)
if (allocated(desc%ext_index)) val = val + psb_sizeof_int*size(desc%ext_index)
if (allocated(desc%bnd_elem)) val = val + psb_sizeof_int*size(desc%bnd_elem)
@ -354,14 +349,6 @@ contains
end function psb_is_bld_desc
function psb_is_large_desc(desc) result(val)
type(psb_desc_type), intent(in) :: desc
logical :: val
val = .false.
end function psb_is_large_desc
function psb_is_upd_desc(desc) result(val)
type(psb_desc_type), intent(in) :: desc
logical :: val
@ -625,11 +612,11 @@ contains
name = 'psb_cdfree'
if (.not.allocated(desc_a%matrix_data)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
end if
!!$ if (.not.allocated(desc_a%matrix_data)) then
!!$ info=psb_err_forgot_spall_
!!$ call psb_errpush(info,name)
!!$ return
!!$ end if
ictxt=psb_cd_get_context(desc_a)
@ -723,7 +710,7 @@ contains
end if
end if
deallocate(desc_a%matrix_data)
!!$ deallocate(desc_a%matrix_data)
call psb_nullify_desc(desc_a)
@ -783,7 +770,7 @@ contains
! function might be called even when desc_in is
! empty.
call psb_move_alloc( desc_in%matrix_data , desc_out%matrix_data , info)
!!$ call psb_move_alloc( desc_in%matrix_data , desc_out%matrix_data , info)
if (info == psb_success_) &
& call psb_move_alloc( desc_in%halo_index , desc_out%halo_index , info)
if (info == psb_success_) &

@ -11,7 +11,7 @@ LIBDIR=..
MODDIR=../modules
FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG)$(MODDIR) $(FMFLAG).
lib: auxd f77d f03d lib1
lib: auxd f77d impld lib1
$(AR) $(LIBDIR)/$(LIBNAME) $(FOBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)
@ -25,13 +25,13 @@ auxd:
f77d:
(cd f77; $(MAKE) lib)
f03d:
(cd f03; $(MAKE) lib)
impld:
(cd impl; $(MAKE) lib)
clean:
/bin/rm -f $(FOBJS) *$(.mod)
(cd aux; $(MAKE) clean)
(cd f77; $(MAKE) clean)
(cd f03; $(MAKE) clean)
(cd impl; $(MAKE) clean)
veryclean: clean

@ -0,0 +1,44 @@
include ../../../Make.inc
#
# The object files
#
BOBJS=psb_base_mat_impl.o psb_s_base_mat_impl.o psb_d_base_mat_impl.o psb_c_base_mat_impl.o psb_z_base_mat_impl.o
SOBJS=psb_s_csr_impl.o psb_s_coo_impl.o psb_s_csc_impl.o psb_s_mat_impl.o
DOBJS=psb_d_csr_impl.o psb_d_coo_impl.o psb_d_csc_impl.o psb_d_mat_impl.o
COBJS=psb_c_csr_impl.o psb_c_coo_impl.o psb_c_csc_impl.o psb_c_mat_impl.o
ZOBJS=psb_z_csr_impl.o psb_z_coo_impl.o psb_z_csc_impl.o psb_z_mat_impl.o
OBJS=$(BOBJS) $(SOBJS) $(DOBJS) $(COBJS) $(ZOBJS)
#
# Where the library should go, and how it is called.
# Note that we are regenerating most of libsparker.a on the fly.
SPARKERDIR=..
LIBDIR=../..
MODDIR=../../modules
FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG)$(MODDIR) $(FMFLAG)$(SPARKERDIR) $(FMFLAG).
#LIBNAME=libsparker.a
LIBFILE=$(LIBDIR)/$(LIBNAME)
#
# No change should be needed below
#
default: lib
lib: $(OBJS)
$(AR) $(LIBDIR)/$(LIBNAME) $(OBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME)
# A bit excessive, but safe
$(OBJS): $(MODDIR)/psb_sparse_mod.o
clean: cleanobjs
veryclean: cleanobjs
cleanobjs:
/bin/rm -f $(OBJS)

@ -0,0 +1,337 @@
function psb_base_get_nz_row(idx,a) result(res)
use psb_error_mod
use psb_base_mat_mod, psb_protect_name => psb_base_get_nz_row
implicit none
integer, intent(in) :: idx
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
Integer :: err_act
character(len=20) :: name='base_get_nz_row'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
res = -1
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end function psb_base_get_nz_row
function psb_base_get_nzeros(a) result(res)
use psb_base_mat_mod, psb_protect_name => psb_base_get_nzeros
use psb_error_mod
implicit none
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
Integer :: err_act
character(len=20) :: name='base_get_nzeros'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
res = -1
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end function psb_base_get_nzeros
function psb_base_get_size(a) result(res)
use psb_base_mat_mod, psb_protect_name => psb_base_get_size
use psb_error_mod
implicit none
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
Integer :: err_act
character(len=20) :: name='get_size'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
res = -1
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end function psb_base_get_size
subroutine psb_base_reinit(a,clear)
use psb_base_mat_mod, psb_protect_name => psb_base_reinit
use psb_error_mod
implicit none
class(psb_base_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: clear
Integer :: err_act, info
character(len=20) :: name='reinit'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
info = psb_err_missing_override_method_
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_base_reinit
subroutine psb_base_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc)
use psb_base_mat_mod, psb_protect_name => psb_base_sparse_print
use psb_error_mod
implicit none
integer, intent(in) :: iout
class(psb_base_sparse_mat), intent(in) :: a
integer, intent(in), optional :: iv(:)
integer, intent(in), optional :: eirs,eics
character(len=*), optional :: head
integer, intent(in), optional :: ivr(:), ivc(:)
Integer :: err_act, info
character(len=20) :: name='sparse_print'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
info = psb_err_missing_override_method_
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_base_sparse_print
subroutine psb_base_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale)
! Output is always in COO format
use psb_error_mod
use psb_const_mod
use psb_base_mat_mod, psb_protect_name => psb_base_csgetptn
implicit none
class(psb_base_sparse_mat), intent(in) :: a
integer, intent(in) :: imin,imax
integer, intent(out) :: nz
integer, allocatable, intent(inout) :: ia(:), ja(:)
integer,intent(out) :: info
logical, intent(in), optional :: append
integer, intent(in), optional :: iren(:)
integer, intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale
Integer :: err_act
character(len=20) :: name='csget'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
info = psb_err_missing_override_method_
call psb_errpush(info,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_base_csgetptn
subroutine psb_base_get_neigh(a,idx,neigh,n,info,lev)
use psb_base_mat_mod, psb_protect_name => psb_base_get_neigh
use psb_error_mod
use psb_realloc_mod
use psb_sort_mod
implicit none
class(psb_base_sparse_mat), intent(in) :: a
integer, intent(in) :: idx
integer, intent(out) :: n
integer, allocatable, intent(out) :: neigh(:)
integer, intent(out) :: info
integer, optional, intent(in) :: lev
integer :: lev_, i, nl, ifl,ill,&
& n1, err_act, nn, nidx,ntl,ma
integer, allocatable :: ia(:), ja(:)
character(len=20) :: name='get_neigh'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
info = psb_success_
if(present(lev)) then
lev_ = lev
else
lev_=1
end if
! Turns out we can write get_neigh at this
! level
n = 0
ma = a%get_nrows()
call a%csget(idx,idx,n,ia,ja,info)
if (info == psb_success_) call psb_realloc(n,neigh,info)
if (info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
neigh(1:n) = ja(1:n)
ifl = 1
ill = n
do nl = 2, lev_
n1 = ill - ifl + 1
call psb_ensure_size(ill+n1*n1,neigh,info)
if (info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
ntl = 0
do i=ifl,ill
nidx=neigh(i)
if ((nidx /= idx).and.(nidx > 0).and.(nidx <= ma)) then
call a%csget(nidx,nidx,nn,ia,ja,info)
if (info == psb_success_) call psb_ensure_size(ill+ntl+nn,neigh,info)
if (info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
neigh(ill+ntl+1:ill+ntl+nn)=ja(1:nn)
ntl = ntl+nn
end if
end do
call psb_msort_unique(neigh(ill+1:ill+ntl),nn)
ifl = ill + 1
ill = ill + nn
end do
call psb_msort_unique(neigh(1:ill),nn,dir=psb_sort_up_)
n = nn
call psb_erractionrestore(err_act)
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_base_get_neigh
subroutine psb_base_allocate_mnnz(m,n,a,nz)
use psb_base_mat_mod, psb_protect_name => psb_base_allocate_mnnz
use psb_error_mod
implicit none
integer, intent(in) :: m,n
class(psb_base_sparse_mat), intent(inout) :: a
integer, intent(in), optional :: nz
Integer :: err_act
character(len=20) :: name='allocate_mnz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_base_allocate_mnnz
subroutine psb_base_reallocate_nz(nz,a)
use psb_base_mat_mod, psb_protect_name => psb_base_reallocate_nz
use psb_error_mod
implicit none
integer, intent(in) :: nz
class(psb_base_sparse_mat), intent(inout) :: a
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_base_reallocate_nz
subroutine psb_base_free(a)
use psb_base_mat_mod, psb_protect_name => psb_base_free
use psb_error_mod
implicit none
class(psb_base_sparse_mat), intent(inout) :: a
Integer :: err_act
character(len=20) :: name='free'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_base_free
subroutine psb_base_trim(a)
use psb_base_mat_mod, psb_protect_name => psb_base_trim
use psb_error_mod
implicit none
class(psb_base_sparse_mat), intent(inout) :: a
Integer :: err_act
character(len=20) :: name='trim'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
call psb_errpush(psb_err_missing_override_method_,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_base_trim

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -63,7 +63,7 @@ subroutine psb_casb(x, desc_a, info)
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_input_matrix_unassembled_
call psb_errpush(info,name)
goto 9999

@ -285,12 +285,11 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
end if
! allocate work vector
allocate(desc%matrix_data(psb_mdata_size_),&
&temp_ovrlap(max(1,2*loc_row)),desc%lprm(1),&
allocate(temp_ovrlap(max(1,2*loc_row)),desc%lprm(1),&
& stat=info)
if (info == psb_success_) then
desc%lprm(1) = 0
desc%matrix_data(:) = 0
!!$ desc%matrix_data(:) = 0
end if
if (info /= psb_success_) then
info=psb_err_alloc_request_
@ -300,11 +299,11 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
endif
temp_ovrlap(:) = -1
desc%matrix_data(psb_m_) = m
desc%matrix_data(psb_n_) = n
! This has to be set BEFORE any call to SET_BLD
desc%matrix_data(psb_ctxt_) = ictxt
call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
!!$ desc%matrix_data(psb_m_) = m
!!$ desc%matrix_data(psb_n_) = n
!!$ ! This has to be set BEFORE any call to SET_BLD
!!$ desc%matrix_data(psb_ctxt_) = ictxt
!!$ call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
if (debug_level >= psb_debug_ext_) &
@ -372,9 +371,9 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
goto 9999
endif
! set fields in desc%MATRIX_DATA....
desc%matrix_data(psb_n_row_) = loc_row
desc%matrix_data(psb_n_col_) = loc_row
!!$ ! set fields in desc%MATRIX_DATA....
!!$ desc%matrix_data(psb_n_row_) = loc_row
!!$ desc%matrix_data(psb_n_col_) = loc_row
!!$ call psb_realloc(max(1,loc_row/2),desc%halo_index, info)
!!$ if (info == psb_success_) call psb_realloc(1,desc%ext_index, info)

@ -39,7 +39,7 @@ subroutine psb_cd_set_ovl_bld(desc,info)
if (info == psb_success_) then
if (desc%indxmap%row_extendable()) then
call desc%indxmap%set_state(psb_desc_ovl_bld_)
desc%matrix_data(psb_dec_type_) = psb_desc_ovl_bld_
!!$ desc%matrix_data(psb_dec_type_) = psb_desc_ovl_bld_
else
info = psb_err_invalid_cd_state_
end if
@ -73,7 +73,7 @@ subroutine psb_cd_set_bld(desc,info)
if (psb_is_asb_desc(desc)) then
end if
desc%matrix_data(psb_dec_type_) = psb_desc_bld_
!!$ desc%matrix_data(psb_dec_type_) = psb_desc_bld_
call desc%indxmap%set_state(psb_desc_bld_)
if (debug) write(psb_err_unit,*) me,'SET_BLD: done'

@ -128,12 +128,12 @@ subroutine psb_cdall(ictxt, desc, info,mg,ng,parts,vg,vl,flag,nl,repl, globalche
else if (present(nl)) then
allocate(desc%matrix_data(psb_mdata_size_))
desc%matrix_data(psb_m_) = nl
call psb_sum(ictxt,desc%matrix_data(psb_m_))
desc%matrix_data(psb_n_) = desc%matrix_data(psb_m_)
desc%matrix_data(psb_ctxt_) = ictxt
call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
!!$ allocate(desc%matrix_data(psb_mdata_size_))
!!$ desc%matrix_data(psb_m_) = nl
!!$ call psb_sum(ictxt,desc%matrix_data(psb_m_))
!!$ desc%matrix_data(psb_n_) = desc%matrix_data(psb_m_)
!!$ desc%matrix_data(psb_ctxt_) = ictxt
!!$ call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
@ -176,12 +176,12 @@ subroutine psb_cdall(ictxt, desc, info,mg,ng,parts,vg,vl,flag,nl,repl, globalche
call psb_errpush(info,name,a_err='psb_realloc')
Goto 999
end if
desc%matrix_data(psb_pnt_h_) = 1
!!$ desc%matrix_data(psb_pnt_h_) = 1
desc%halo_index(:) = -1
desc%ext_index(:) = -1
call psb_cd_set_bld(desc,info)
desc%matrix_data(psb_n_row_) = desc%indxmap%get_lr()
desc%matrix_data(psb_n_col_) = desc%indxmap%get_lc()
!!$ desc%matrix_data(psb_n_row_) = desc%indxmap%get_lr()
!!$ desc%matrix_data(psb_n_col_) = desc%indxmap%get_lc()
if (info /= psb_success_) goto 999
call psb_erractionrestore(err_act)

@ -125,9 +125,10 @@ subroutine psb_cdals(m, n, parts, ictxt, desc, info)
! count local rows number
loc_row = max(1,(m+np-1)/np)
! allocate work vector
allocate(desc%matrix_data(psb_mdata_size_),&
& temp_ovrlap(max(1,2*loc_row)), prc_v(np),stat=info)
desc%matrix_data(:) = 0
!!$ allocate(desc%matrix_data(psb_mdata_size_),&
!!$ & temp_ovrlap(max(1,2*loc_row)), prc_v(np),stat=info)
!!$ desc%matrix_data(:) = 0
allocate(temp_ovrlap(max(1,2*loc_row)), prc_v(np),stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_request_
@ -136,11 +137,11 @@ subroutine psb_cdals(m, n, parts, ictxt, desc, info)
call psb_errpush(err,name,int_err,a_err='integer')
goto 9999
endif
desc%matrix_data(psb_m_) = m
desc%matrix_data(psb_n_) = n
! This has to be set BEFORE any call to SET_BLD
desc%matrix_data(psb_ctxt_) = ictxt
call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
!!$ desc%matrix_data(psb_m_) = m
!!$ desc%matrix_data(psb_n_) = n
!!$ ! This has to be set BEFORE any call to SET_BLD
!!$ desc%matrix_data(psb_ctxt_) = ictxt
!!$ call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
if (debug_level >= psb_debug_ext_) &
@ -288,9 +289,9 @@ subroutine psb_cdals(m, n, parts, ictxt, desc, info)
Goto 9999
endif
! set fields in desc%MATRIX_DATA....
desc%matrix_data(psb_n_row_) = loc_row
desc%matrix_data(psb_n_col_) = loc_row
!!$ ! set fields in desc%MATRIX_DATA....
!!$ desc%matrix_data(psb_n_row_) = loc_row
!!$ desc%matrix_data(psb_n_col_) = loc_row
!!$ write(0,*) me,'CDALS: after init ', &
!!$ & desc%indxmap%get_gr(), &

@ -137,22 +137,18 @@ subroutine psb_cdalv(v, ictxt, desc, info, flag)
! count local rows number
loc_row = max(1,(m+np-1)/np)
! allocate work vector
allocate(desc%matrix_data(psb_mdata_size_),&
&temp_ovrlap(max(1,2*loc_row)),stat=info)
if (info == psb_success_) then
desc%matrix_data(:) = 0
end if
allocate(temp_ovrlap(2),stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_request_
int_err(1)=2*m+psb_mdata_size_
call psb_errpush(info,name,i_err=int_err,a_err='integer')
goto 9999
endif
desc%matrix_data(psb_m_) = m
desc%matrix_data(psb_n_) = n
! This has to be set BEFORE any call to SET_BLD
desc%matrix_data(psb_ctxt_) = ictxt
call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
!!$ desc%matrix_data(psb_m_) = m
!!$ desc%matrix_data(psb_n_) = n
!!$ ! This has to be set BEFORE any call to SET_BLD
!!$ desc%matrix_data(psb_ctxt_) = ictxt
!!$ call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
if (debug_level >= psb_debug_ext_) &
& write(debug_unit,*) me,' ',trim(name),': starting main loop' ,info
@ -215,10 +211,10 @@ subroutine psb_cdalv(v, ictxt, desc, info, flag)
goto 9999
endif
! set fields in desc%MATRIX_DATA....
desc%matrix_data(psb_n_row_) = loc_row
desc%matrix_data(psb_n_col_) = loc_row
!!$ ! set fields in desc%MATRIX_DATA....
!!$ desc%matrix_data(psb_n_row_) = loc_row
!!$ desc%matrix_data(psb_n_col_) = loc_row
!!$
if (debug_level >= psb_debug_ext_) &
& write(debug_unit,*) me,' ',trim(name),': end'

@ -73,7 +73,7 @@ subroutine psb_cdcpy(desc_in, desc_out, info)
goto 9999
endif
call psb_safe_ab_cpy(desc_in%matrix_data,desc_out%matrix_data,info)
!!$ call psb_safe_ab_cpy(desc_in%matrix_data,desc_out%matrix_data,info)
if (info == psb_success_) call psb_safe_ab_cpy(desc_in%halo_index,desc_out%halo_index,info)
if (info == psb_success_) call psb_safe_ab_cpy(desc_in%ext_index,desc_out%ext_index,info)
if (info == psb_success_) call psb_safe_ab_cpy(desc_in%ovrlap_index,&
@ -85,17 +85,19 @@ subroutine psb_cdcpy(desc_in, desc_out, info)
if (info == psb_success_) call psb_safe_ab_cpy(desc_in%idx_space,desc_out%idx_space,info)
if (allocated(desc_in%indxmap)) then
!!$ if (allocated(desc_out%indxmap)) then
!!$ ! This should never happen
!!$ call desc_out%indxmap%free()
!!$ deallocate(desc_out%indxmap)
!!$ end if
!!$ write(debug_unit,*) me,' ',trim(name),': Calling allocate(SOURCE = )'
!!$ if (info == psb_success_)&
!!$ & allocate(desc_out%indxmap, source=desc_in%indxmap, stat=info)
#ifdef SOURCE_WORKAROUND
call desc_in%indxmap%clone(desc_out%indxmap,info)
#else
if (info == psb_success_)&
& allocate(desc_out%indxmap, source=desc_in%indxmap, stat=info)
#endif
end if

@ -61,12 +61,15 @@ subroutine psb_cdprt(iout,desc_p,glob,short)
else
lshort = .true.
endif
write(0,*) 'To be reimplemented ye'
return
if (.not.lglob) then
write(iout,*) 'Communication descriptor:',desc_p%matrix_data(1:10)
m=desc_p%matrix_data(psb_m_)
n_row=desc_p%matrix_data(psb_n_row_)
n_col=desc_p%matrix_data(psb_n_col_)
!!$ write(iout,*) 'Communication descriptor:',desc_p%matrix_data(1:10)
!!$ m=desc_p%matrix_data(psb_m_)
!!$ n_row=desc_p%matrix_data(psb_n_row_)
!!$ n_col=desc_p%matrix_data(psb_n_col_)
!!$ if (.not.lshort) &
!!$ & write(iout,*) 'Loc_to_glob ',desc_p%idxmap%loc_to_glob(1:n_row), ': ',&
!!$ & desc_p%idxmap%loc_to_glob(n_row+1:n_col)
@ -139,10 +142,10 @@ subroutine psb_cdprt(iout,desc_p,glob,short)
else if (lglob) then
write(iout,*) 'Communication descriptor:',desc_p%matrix_data(1:10)
m=desc_p%matrix_data(psb_m_)
n_row=desc_p%matrix_data(psb_n_row_)
n_col=desc_p%matrix_data(psb_n_col_)
!!$ write(iout,*) 'Communication descriptor:',desc_p%matrix_data(1:10)
!!$ m=desc_p%matrix_data(psb_m_)
!!$ n_row=desc_p%matrix_data(psb_n_row_)
!!$ n_col=desc_p%matrix_data(psb_n_col_)
if (.not.lshort) then
!!$ write(iout,*) 'Loc_to_glob '
!!$ do i=1, n_row

@ -174,24 +174,24 @@ subroutine psb_cdrep(m, ictxt, desc, info)
!count local rows number
! allocate work vector
allocate(desc%matrix_data(psb_mdata_size_),&
& desc%ovrlap_elem(0,3),stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_request_
int_err(1)=2*m+psb_mdata_size_+1
call psb_errpush(info,name,i_err=int_err,a_err='integer')
goto 9999
endif
! If the index space is replicated there's no point in not having
! the full map on the current process.
desc%matrix_data(psb_m_) = m
desc%matrix_data(psb_n_) = n
desc%matrix_data(psb_n_row_) = m
desc%matrix_data(psb_n_col_) = n
desc%matrix_data(psb_ctxt_) = ictxt
call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
desc%matrix_data(psb_dec_type_) = psb_desc_bld_
!!$ allocate(desc%matrix_data(psb_mdata_size_),&
!!$ & desc%ovrlap_elem(0,3),stat=info)
!!$ if (info /= psb_success_) then
!!$ info=psb_err_alloc_request_
!!$ int_err(1)=2*m+psb_mdata_size_+1
!!$ call psb_errpush(info,name,i_err=int_err,a_err='integer')
!!$ goto 9999
!!$ endif
!!$ ! If the index space is replicated there's no point in not having
!!$ ! the full map on the current process.
!!$
!!$ desc%matrix_data(psb_m_) = m
!!$ desc%matrix_data(psb_n_) = n
!!$ desc%matrix_data(psb_n_row_) = m
!!$ desc%matrix_data(psb_n_col_) = n
!!$ desc%matrix_data(psb_ctxt_) = ictxt
!!$ call psb_get_mpicomm(ictxt,desc%matrix_data(psb_mpi_c_))
!!$ desc%matrix_data(psb_dec_type_) = psb_desc_bld_
allocate(psb_repl_map :: desc%indxmap, stat=info)
@ -208,7 +208,7 @@ subroutine psb_cdrep(m, ictxt, desc, info)
tovr = -1
call psi_bld_tmpovrl(tovr,desc,info)
desc%matrix_data(psb_dec_type_) = psb_desc_bld_
!!$ desc%matrix_data(psb_dec_type_) = psb_desc_bld_
if (debug_level >= psb_debug_ext_) &

@ -56,10 +56,10 @@ subroutine psb_cfree(x, desc_a, info)
info=psb_success_
call psb_erractionsave(err_act)
name='psb_cfree'
if (.not.allocated(desc_a%matrix_data)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
end if
ictxt=psb_cd_get_context(desc_a)
@ -128,7 +128,7 @@ subroutine psb_cfreev(x, desc_a, info)
name='psb_cfreev'
if (.not.allocated(desc_a%matrix_data)) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999

@ -76,7 +76,7 @@ subroutine psb_cinsvi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_cinsvi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return
@ -122,13 +122,13 @@ subroutine psb_cinsvi(m, irw, val, x, desc_a, info, dupl)
call psb_errpush(info,name)
goto 9999
endif
if (present(dupl)) then
dupl_ = dupl
else
dupl_ = psb_dupl_ovwrt_
endif
call psi_idx_cnv(m,irw,irl,desc_a,info,owned=.true.)
select case(dupl_)
@ -150,8 +150,8 @@ subroutine psb_cinsvi(m, irw, val, x, desc_a, info, dupl)
!loop over all val's rows
if (irl(i) > 0) then
! this row belongs to me
! copy i-th row of block val in x
! this row belongs to me
! copy i-th row of block val in x
x(irl(i)) = x(irl(i)) + val(i)
end if
enddo
@ -257,7 +257,7 @@ subroutine psb_cinsi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_cinsi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return

@ -56,7 +56,7 @@ subroutine psb_cspfree(a, desc_a,info)
name = 'psb_cspfree'
call psb_erractionsave(err_act)
if (.not.allocated(desc_a%matrix_data)) then
if (.not.psb_is_ok_desc(desc_a)) then
info = psb_err_forgot_spall_
call psb_errpush(info,name)
return

@ -63,7 +63,7 @@ subroutine psb_dasb(x, desc_a, info)
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_input_matrix_unassembled_
call psb_errpush(info,name)
goto 9999

@ -56,7 +56,7 @@ subroutine psb_dfree(x, desc_a, info)
info=psb_success_
call psb_erractionsave(err_act)
name='psb_dfree'
if (.not.allocated(desc_a%matrix_data)) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
@ -126,7 +126,7 @@ subroutine psb_dfreev(x, desc_a, info)
call psb_erractionsave(err_act)
name='psb_dfreev'
if (.not.allocated(desc_a%matrix_data)) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return

@ -75,7 +75,7 @@ subroutine psb_dinsvi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_dinsvi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return
@ -257,7 +257,7 @@ subroutine psb_dinsi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_dinsi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return

@ -56,7 +56,7 @@ subroutine psb_dspfree(a, desc_a,info)
name = 'psb_dspfree'
call psb_erractionsave(err_act)
if (.not.allocated(desc_a%matrix_data)) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return

@ -180,7 +180,7 @@ subroutine psb_glob_to_loc(x,desc_a,info,iact,owned)
!....locals....
integer :: n
character :: act
integer :: err_act, dectype
integer :: err_act
logical :: owned_
integer, parameter :: zero=0
character(len=20) :: name
@ -189,11 +189,10 @@ subroutine psb_glob_to_loc(x,desc_a,info,iact,owned)
if(psb_get_errstatus() /= 0) return
info=psb_success_
name = 'glob_to_loc'
ictxt = desc_a%matrix_data(psb_ctxt_)
ictxt = psb_cd_get_context(desc_a)
call psb_info(ictxt,iam,np)
call psb_erractionsave(err_act)
dectype = desc_a%matrix_data(psb_dec_type_)
if (present(iact)) then
act=iact
else

@ -63,7 +63,7 @@ subroutine psb_iasb(x, desc_a, info)
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_input_matrix_unassembled_
call psb_errpush(info,name)
goto 9999

@ -148,10 +148,10 @@ subroutine psb_icdasb(desc_a,info,ext_hv)
info = psb_success_
end if
desc_a%matrix_data(psb_n_row_) = desc_a%indxmap%get_lr()
desc_a%matrix_data(psb_n_col_) = desc_a%indxmap%get_lc()
! Ok, register into MATRIX_DATA
desc_a%matrix_data(psb_dec_type_) = psb_desc_asb_
!!$ desc_a%matrix_data(psb_n_row_) = desc_a%indxmap%get_lr()
!!$ desc_a%matrix_data(psb_n_col_) = desc_a%indxmap%get_lc()
!!$ ! Ok, register into MATRIX_DATA
!!$ desc_a%matrix_data(psb_dec_type_) = psb_desc_asb_
else
info = psb_err_spmat_invalid_state_

@ -57,7 +57,7 @@ subroutine psb_ifree(x, desc_a, info)
call psb_erractionsave(err_act)
name = 'psb_ifree'
if (.not.allocated(desc_a%matrix_data)) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
@ -157,11 +157,11 @@ subroutine psb_ifreev(x, desc_a,info)
call psb_erractionsave(err_act)
name = 'psb_ifreev'
if (.not.allocated(desc_a%matrix_data)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
end if
ictxt=psb_cd_get_context(desc_a)
@ -174,26 +174,26 @@ subroutine psb_ifreev(x, desc_a,info)
endif
if (.not.allocated(x)) then
info=psb_err_forgot_geall_
call psb_errpush(info,name)
goto 9999
info=psb_err_forgot_geall_
call psb_errpush(info,name)
goto 9999
end if
!deallocate x
deallocate(x,stat=info)
if (info /= psb_no_err_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
endif
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
call psb_error(ictxt)
return
end if
return

@ -75,7 +75,7 @@ subroutine psb_iinsvi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_insvi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return
@ -256,7 +256,7 @@ subroutine psb_iinsi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_iinsi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return

@ -63,7 +63,7 @@ subroutine psb_sasb(x, desc_a, info)
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_input_matrix_unassembled_
call psb_errpush(info,name)
goto 9999

@ -56,10 +56,10 @@ subroutine psb_sfree(x, desc_a, info)
info=psb_success_
call psb_erractionsave(err_act)
name='psb_sfree'
if (.not.allocated(desc_a%matrix_data)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
end if
ictxt = psb_cd_get_context(desc_a)
@ -73,9 +73,9 @@ subroutine psb_sfree(x, desc_a, info)
endif
if (.not.allocated(x)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
end if
!deallocate x
@ -93,8 +93,8 @@ subroutine psb_sfree(x, desc_a, info)
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
call psb_error(ictxt)
return
end if
return
@ -126,10 +126,10 @@ subroutine psb_sfreev(x, desc_a, info)
call psb_erractionsave(err_act)
name='psb_sfreev'
if (.not.allocated(desc_a%matrix_data)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
end if
ictxt = psb_cd_get_context(desc_a)
@ -141,9 +141,9 @@ subroutine psb_sfreev(x, desc_a, info)
endif
if (.not.allocated(x)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
end if
!deallocate x
@ -159,8 +159,8 @@ subroutine psb_sfreev(x, desc_a, info)
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
call psb_error(ictxt)
return
end if
return

@ -75,7 +75,7 @@ subroutine psb_sinsvi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_sinsvi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return
@ -257,7 +257,7 @@ subroutine psb_sinsi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_sinsi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return

@ -56,7 +56,7 @@ subroutine psb_sspfree(a, desc_a,info)
name = 'psb_sspfree'
call psb_erractionsave(err_act)
if (.not.allocated(desc_a%matrix_data)) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return

@ -63,7 +63,7 @@ subroutine psb_zasb(x, desc_a, info)
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_input_matrix_unassembled_
call psb_errpush(info,name)
goto 9999

@ -56,10 +56,10 @@ subroutine psb_zfree(x, desc_a, info)
info=psb_success_
call psb_erractionsave(err_act)
name='psb_zfree'
if (.not.allocated(desc_a%matrix_data)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
return
end if
ictxt=psb_cd_get_context(desc_a)
@ -73,9 +73,9 @@ subroutine psb_zfree(x, desc_a, info)
endif
if (.not.allocated(x)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
end if
!deallocate x
@ -85,7 +85,7 @@ subroutine psb_zfree(x, desc_a, info)
call psb_errpush(info,name)
goto 9999
endif
call psb_erractionrestore(err_act)
return
@ -93,8 +93,8 @@ subroutine psb_zfree(x, desc_a, info)
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error(ictxt)
return
call psb_error(ictxt)
return
end if
return
@ -128,34 +128,34 @@ subroutine psb_zfreev(x, desc_a, info)
name='psb_zfreev'
if (.not.allocated(desc_a%matrix_data)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
if (.not.psb_is_ok_desc(desc_a)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
end if
ictxt=psb_cd_get_context(desc_a)
call psb_info(ictxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
goto 9999
info = psb_err_context_error_
call psb_errpush(info,name)
goto 9999
endif
if (.not.allocated(x)) then
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
info=psb_err_forgot_spall_
call psb_errpush(info,name)
goto 9999
end if
!deallocate x
deallocate(x,stat=info)
if (info /= psb_no_err_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
endif
call psb_erractionrestore(err_act)
return
@ -163,9 +163,9 @@ subroutine psb_zfreev(x, desc_a, info)
call psb_erractionrestore(err_act)
if (err_act == psb_act_ret_) then
return
return
else
call psb_error(ictxt)
call psb_error(ictxt)
end if
return

@ -76,7 +76,7 @@ subroutine psb_zinsvi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_zinsvi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return
@ -257,7 +257,7 @@ subroutine psb_zinsi(m, irw, val, x, desc_a, info, dupl)
call psb_erractionsave(err_act)
name = 'psb_zinsi'
if ((.not.allocated(desc_a%matrix_data))) then
if (.not.psb_is_ok_desc(desc_a)) then
int_err(1)=3110
call psb_errpush(info,name)
return

@ -56,7 +56,7 @@ subroutine psb_zspfree(a, desc_a,info)
name = 'psb_zspfree'
call psb_erractionsave(err_act)
if (.not.allocated(desc_a%matrix_data)) then
if (.not.psb_is_ok_desc(desc_a)) then
info = psb_err_forgot_spall_
call psb_errpush(info,name)
return

Loading…
Cancel
Save