From 48fd24a4d3dbeb3fe4a28840cd7dc48b05013e4f Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 21 Apr 2018 08:01:10 +0100 Subject: [PATCH] Fix LPK in tools impl. --- base/tools/psb_cspalloc.f90 | 15 +++++++-------- base/tools/psb_cspasb.f90 | 5 ++--- base/tools/psb_csphalo.F90 | 5 +++-- base/tools/psb_dspalloc.f90 | 15 +++++++-------- base/tools/psb_dspasb.f90 | 5 ++--- base/tools/psb_dsphalo.F90 | 5 +++-- base/tools/psb_sspalloc.f90 | 15 +++++++-------- base/tools/psb_sspasb.f90 | 5 ++--- base/tools/psb_ssphalo.F90 | 5 +++-- base/tools/psb_zspalloc.f90 | 15 +++++++-------- base/tools/psb_zspasb.f90 | 5 ++--- base/tools/psb_zsphalo.F90 | 5 +++-- 12 files changed, 48 insertions(+), 52 deletions(-) diff --git a/base/tools/psb_cspalloc.f90 b/base/tools/psb_cspalloc.f90 index 30f51063..ddf11ef3 100644 --- a/base/tools/psb_cspalloc.f90 +++ b/base/tools/psb_cspalloc.f90 @@ -52,9 +52,9 @@ subroutine psb_cspalloc(a, desc_a, info, nnz) integer(psb_ipk_), optional, intent(in) :: nnz !locals - integer(psb_ipk_) :: ictxt, dectype - integer(psb_ipk_) :: np,me,loc_row,loc_col,& - & length_ia1,length_ia2, err_act,m,n + integer(psb_ipk_) :: ictxt, np, me, err_act + integer(psb_ipk_) :: loc_row,loc_col, nnz_ + integer(psb_lpk_) :: m, n integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -89,17 +89,16 @@ subroutine psb_cspalloc(a, desc_a, info, nnz) call psb_errpush(info,name,i_err=(/7_psb_ipk_,nnz/)) goto 9999 endif - length_ia1=nnz - length_ia2=nnz + nnz_ = nnz else - length_ia1=max(1,5*loc_row) + nnz_ = max(1,5*loc_row) endif if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),':allocating size:',length_ia1 + & write(debug_unit,*) me,' ',trim(name),':allocating size:',nnz_ call a%free() !....allocate aspk, ia1, ia2..... - call a%csall(loc_row,loc_col,info,nz=length_ia1) + call a%csall(loc_row,loc_col,info,nz=nnz_) if(info /= psb_success_) then info=psb_err_from_subroutine_ call psb_errpush(info,name,a_err='sp_all') diff --git a/base/tools/psb_cspasb.f90 b/base/tools/psb_cspasb.f90 index cc24c594..1c783cf4 100644 --- a/base/tools/psb_cspasb.f90 +++ b/base/tools/psb_cspasb.f90 @@ -63,9 +63,8 @@ subroutine psb_cspasb(a,desc_a, info, afmt, upd, dupl, mold) class(psb_c_base_sparse_mat), intent(in), optional :: mold !....Locals.... integer(psb_ipk_) :: int_err(5) - integer(psb_ipk_) :: np,me,n_col, err_act - integer(psb_ipk_) :: spstate - integer(psb_ipk_) :: ictxt,n_row + integer(psb_ipk_) :: ictxt,np,me, err_act + integer(psb_ipk_) :: n_row,n_col integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err diff --git a/base/tools/psb_csphalo.F90 b/base/tools/psb_csphalo.F90 index a0f75d68..41f25a65 100644 --- a/base/tools/psb_csphalo.F90 +++ b/base/tools/psb_csphalo.F90 @@ -75,8 +75,9 @@ Subroutine psb_csphalo(a,desc_a,blk,info,rowcnv,colcnv,& character(len=5), optional :: outfmt integer(psb_ipk_), intent(in), optional :: data ! ...local scalars.... - integer(psb_ipk_) :: np,me,counter,proc,i, & - & n_el_send,k,n_el_recv,ictxt, idx, r, tot_elem,& + integer(psb_ipk_) :: ictxt, np,me + integer(psb_ipk_) :: counter,proc,i, & + & n_el_send,k,n_el_recv,idx, r, tot_elem,& & n_elem, j, ipx,mat_recv, iszs, iszr,idxs,idxr,nz,& & irmin,icmin,irmax,icmax,data_,ngtz,totxch,nxs, nxr,& & l1, err_act diff --git a/base/tools/psb_dspalloc.f90 b/base/tools/psb_dspalloc.f90 index f702f326..1a57e3f5 100644 --- a/base/tools/psb_dspalloc.f90 +++ b/base/tools/psb_dspalloc.f90 @@ -52,9 +52,9 @@ subroutine psb_dspalloc(a, desc_a, info, nnz) integer(psb_ipk_), optional, intent(in) :: nnz !locals - integer(psb_ipk_) :: ictxt, dectype - integer(psb_ipk_) :: np,me,loc_row,loc_col,& - & length_ia1,length_ia2, err_act,m,n + integer(psb_ipk_) :: ictxt, np, me, err_act + integer(psb_ipk_) :: loc_row,loc_col, nnz_ + integer(psb_lpk_) :: m, n integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -89,17 +89,16 @@ subroutine psb_dspalloc(a, desc_a, info, nnz) call psb_errpush(info,name,i_err=(/7_psb_ipk_,nnz/)) goto 9999 endif - length_ia1=nnz - length_ia2=nnz + nnz_ = nnz else - length_ia1=max(1,5*loc_row) + nnz_ = max(1,5*loc_row) endif if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),':allocating size:',length_ia1 + & write(debug_unit,*) me,' ',trim(name),':allocating size:',nnz_ call a%free() !....allocate aspk, ia1, ia2..... - call a%csall(loc_row,loc_col,info,nz=length_ia1) + call a%csall(loc_row,loc_col,info,nz=nnz_) if(info /= psb_success_) then info=psb_err_from_subroutine_ call psb_errpush(info,name,a_err='sp_all') diff --git a/base/tools/psb_dspasb.f90 b/base/tools/psb_dspasb.f90 index 1e25e43c..60ad8c59 100644 --- a/base/tools/psb_dspasb.f90 +++ b/base/tools/psb_dspasb.f90 @@ -63,9 +63,8 @@ subroutine psb_dspasb(a,desc_a, info, afmt, upd, dupl, mold) class(psb_d_base_sparse_mat), intent(in), optional :: mold !....Locals.... integer(psb_ipk_) :: int_err(5) - integer(psb_ipk_) :: np,me,n_col, err_act - integer(psb_ipk_) :: spstate - integer(psb_ipk_) :: ictxt,n_row + integer(psb_ipk_) :: ictxt,np,me, err_act + integer(psb_ipk_) :: n_row,n_col integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err diff --git a/base/tools/psb_dsphalo.F90 b/base/tools/psb_dsphalo.F90 index 4a9c702a..f60ced48 100644 --- a/base/tools/psb_dsphalo.F90 +++ b/base/tools/psb_dsphalo.F90 @@ -75,8 +75,9 @@ Subroutine psb_dsphalo(a,desc_a,blk,info,rowcnv,colcnv,& character(len=5), optional :: outfmt integer(psb_ipk_), intent(in), optional :: data ! ...local scalars.... - integer(psb_ipk_) :: np,me,counter,proc,i, & - & n_el_send,k,n_el_recv,ictxt, idx, r, tot_elem,& + integer(psb_ipk_) :: ictxt, np,me + integer(psb_ipk_) :: counter,proc,i, & + & n_el_send,k,n_el_recv,idx, r, tot_elem,& & n_elem, j, ipx,mat_recv, iszs, iszr,idxs,idxr,nz,& & irmin,icmin,irmax,icmax,data_,ngtz,totxch,nxs, nxr,& & l1, err_act diff --git a/base/tools/psb_sspalloc.f90 b/base/tools/psb_sspalloc.f90 index ff518631..e2fe7b27 100644 --- a/base/tools/psb_sspalloc.f90 +++ b/base/tools/psb_sspalloc.f90 @@ -52,9 +52,9 @@ subroutine psb_sspalloc(a, desc_a, info, nnz) integer(psb_ipk_), optional, intent(in) :: nnz !locals - integer(psb_ipk_) :: ictxt, dectype - integer(psb_ipk_) :: np,me,loc_row,loc_col,& - & length_ia1,length_ia2, err_act,m,n + integer(psb_ipk_) :: ictxt, np, me, err_act + integer(psb_ipk_) :: loc_row,loc_col, nnz_ + integer(psb_lpk_) :: m, n integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -89,17 +89,16 @@ subroutine psb_sspalloc(a, desc_a, info, nnz) call psb_errpush(info,name,i_err=(/7_psb_ipk_,nnz/)) goto 9999 endif - length_ia1=nnz - length_ia2=nnz + nnz_ = nnz else - length_ia1=max(1,5*loc_row) + nnz_ = max(1,5*loc_row) endif if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),':allocating size:',length_ia1 + & write(debug_unit,*) me,' ',trim(name),':allocating size:',nnz_ call a%free() !....allocate aspk, ia1, ia2..... - call a%csall(loc_row,loc_col,info,nz=length_ia1) + call a%csall(loc_row,loc_col,info,nz=nnz_) if(info /= psb_success_) then info=psb_err_from_subroutine_ call psb_errpush(info,name,a_err='sp_all') diff --git a/base/tools/psb_sspasb.f90 b/base/tools/psb_sspasb.f90 index 00ef0db9..c8876cdd 100644 --- a/base/tools/psb_sspasb.f90 +++ b/base/tools/psb_sspasb.f90 @@ -63,9 +63,8 @@ subroutine psb_sspasb(a,desc_a, info, afmt, upd, dupl, mold) class(psb_s_base_sparse_mat), intent(in), optional :: mold !....Locals.... integer(psb_ipk_) :: int_err(5) - integer(psb_ipk_) :: np,me,n_col, err_act - integer(psb_ipk_) :: spstate - integer(psb_ipk_) :: ictxt,n_row + integer(psb_ipk_) :: ictxt,np,me, err_act + integer(psb_ipk_) :: n_row,n_col integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err diff --git a/base/tools/psb_ssphalo.F90 b/base/tools/psb_ssphalo.F90 index b66047f4..00e683d7 100644 --- a/base/tools/psb_ssphalo.F90 +++ b/base/tools/psb_ssphalo.F90 @@ -75,8 +75,9 @@ Subroutine psb_ssphalo(a,desc_a,blk,info,rowcnv,colcnv,& character(len=5), optional :: outfmt integer(psb_ipk_), intent(in), optional :: data ! ...local scalars.... - integer(psb_ipk_) :: np,me,counter,proc,i, & - & n_el_send,k,n_el_recv,ictxt, idx, r, tot_elem,& + integer(psb_ipk_) :: ictxt, np,me + integer(psb_ipk_) :: counter,proc,i, & + & n_el_send,k,n_el_recv,idx, r, tot_elem,& & n_elem, j, ipx,mat_recv, iszs, iszr,idxs,idxr,nz,& & irmin,icmin,irmax,icmax,data_,ngtz,totxch,nxs, nxr,& & l1, err_act diff --git a/base/tools/psb_zspalloc.f90 b/base/tools/psb_zspalloc.f90 index 057ba7dc..acdcf8b9 100644 --- a/base/tools/psb_zspalloc.f90 +++ b/base/tools/psb_zspalloc.f90 @@ -52,9 +52,9 @@ subroutine psb_zspalloc(a, desc_a, info, nnz) integer(psb_ipk_), optional, intent(in) :: nnz !locals - integer(psb_ipk_) :: ictxt, dectype - integer(psb_ipk_) :: np,me,loc_row,loc_col,& - & length_ia1,length_ia2, err_act,m,n + integer(psb_ipk_) :: ictxt, np, me, err_act + integer(psb_ipk_) :: loc_row,loc_col, nnz_ + integer(psb_lpk_) :: m, n integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -89,17 +89,16 @@ subroutine psb_zspalloc(a, desc_a, info, nnz) call psb_errpush(info,name,i_err=(/7_psb_ipk_,nnz/)) goto 9999 endif - length_ia1=nnz - length_ia2=nnz + nnz_ = nnz else - length_ia1=max(1,5*loc_row) + nnz_ = max(1,5*loc_row) endif if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),':allocating size:',length_ia1 + & write(debug_unit,*) me,' ',trim(name),':allocating size:',nnz_ call a%free() !....allocate aspk, ia1, ia2..... - call a%csall(loc_row,loc_col,info,nz=length_ia1) + call a%csall(loc_row,loc_col,info,nz=nnz_) if(info /= psb_success_) then info=psb_err_from_subroutine_ call psb_errpush(info,name,a_err='sp_all') diff --git a/base/tools/psb_zspasb.f90 b/base/tools/psb_zspasb.f90 index 995782b8..73a69776 100644 --- a/base/tools/psb_zspasb.f90 +++ b/base/tools/psb_zspasb.f90 @@ -63,9 +63,8 @@ subroutine psb_zspasb(a,desc_a, info, afmt, upd, dupl, mold) class(psb_z_base_sparse_mat), intent(in), optional :: mold !....Locals.... integer(psb_ipk_) :: int_err(5) - integer(psb_ipk_) :: np,me,n_col, err_act - integer(psb_ipk_) :: spstate - integer(psb_ipk_) :: ictxt,n_row + integer(psb_ipk_) :: ictxt,np,me, err_act + integer(psb_ipk_) :: n_row,n_col integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err diff --git a/base/tools/psb_zsphalo.F90 b/base/tools/psb_zsphalo.F90 index e1ae0154..cb38ab76 100644 --- a/base/tools/psb_zsphalo.F90 +++ b/base/tools/psb_zsphalo.F90 @@ -75,8 +75,9 @@ Subroutine psb_zsphalo(a,desc_a,blk,info,rowcnv,colcnv,& character(len=5), optional :: outfmt integer(psb_ipk_), intent(in), optional :: data ! ...local scalars.... - integer(psb_ipk_) :: np,me,counter,proc,i, & - & n_el_send,k,n_el_recv,ictxt, idx, r, tot_elem,& + integer(psb_ipk_) :: ictxt, np,me + integer(psb_ipk_) :: counter,proc,i, & + & n_el_send,k,n_el_recv,idx, r, tot_elem,& & n_elem, j, ipx,mat_recv, iszs, iszr,idxs,idxr,nz,& & irmin,icmin,irmax,icmax,data_,ngtz,totxch,nxs, nxr,& & l1, err_act