From 983833679db57d137d0b522e648a0ec65548537f Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 6 Dec 2012 10:57:41 +0000 Subject: [PATCH] mld2p4-2: mlprec/impl/mld_cprecaply.f90 mlprec/impl/mld_cprecinit.F90 mlprec/impl/mld_cprecset.F90 mlprec/impl/mld_dprecaply.f90 mlprec/impl/mld_dprecinit.F90 mlprec/impl/mld_dprecset.F90 mlprec/impl/mld_sprecaply.f90 mlprec/impl/mld_sprecinit.F90 mlprec/impl/mld_sprecset.F90 mlprec/impl/mld_zprecaply.f90 mlprec/impl/mld_zprecinit.F90 mlprec/impl/mld_zprecset.F90 precaply under preprocessing, and fix integer kinds for precinit/precset. --- mlprec/impl/mld_cprecaply.f90 | 60 +++++++++++++++++-------------- mlprec/impl/mld_cprecinit.F90 | 16 ++++----- mlprec/impl/mld_cprecset.F90 | 62 ++++++++++++++++---------------- mlprec/impl/mld_dprecaply.f90 | 65 ++++++++++++++++++--------------- mlprec/impl/mld_dprecinit.F90 | 16 ++++----- mlprec/impl/mld_dprecset.F90 | 60 +++++++++++++++---------------- mlprec/impl/mld_sprecaply.f90 | 67 ++++++++++++++++++++--------------- mlprec/impl/mld_sprecinit.F90 | 16 ++++----- mlprec/impl/mld_sprecset.F90 | 62 ++++++++++++++++---------------- mlprec/impl/mld_zprecaply.f90 | 64 ++++++++++++++++++--------------- mlprec/impl/mld_zprecinit.F90 | 16 ++++----- mlprec/impl/mld_zprecset.F90 | 60 +++++++++++++++---------------- 12 files changed, 298 insertions(+), 266 deletions(-) diff --git a/mlprec/impl/mld_cprecaply.f90 b/mlprec/impl/mld_cprecaply.f90 index 8c1b8060..641dfee4 100644 --- a/mlprec/impl/mld_cprecaply.f90 +++ b/mlprec/impl/mld_cprecaply.f90 @@ -83,15 +83,16 @@ subroutine mld_cprecaply(prec,x,y,desc_data,info,trans,work) type(mld_cprec_type), intent(in) :: prec complex(psb_spk_),intent(inout) :: x(:) complex(psb_spk_),intent(inout) :: y(:) - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans complex(psb_spk_),intent(inout), optional, target :: work(:) ! Local variables character :: trans_ complex(psb_spk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_cprecaply' info = psb_success_ @@ -112,8 +113,9 @@ subroutine mld_cprecaply(prec,x,y,desc_data,info,trans,work) iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='complex(psb_spk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='complex(psb_spk_)') goto 9999 end if @@ -145,7 +147,7 @@ subroutine mld_cprecaply(prec,x,y,desc_data,info,trans,work) else info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif @@ -214,12 +216,13 @@ subroutine mld_cprecaply1(prec,x,desc_data,info,trans) ! Arguments type(psb_desc_type),intent(in) :: desc_data type(mld_cprec_type), intent(in) :: prec - complex(psb_spk_),intent(inout) :: x(:) - integer, intent(out) :: info + complex(psb_spk_),intent(inout) :: x(:) + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans ! Local variables - integer :: ictxt,np,me, err_act + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act complex(psb_spk_), pointer :: WW(:), w1(:) character(len=20) :: name @@ -234,7 +237,8 @@ subroutine mld_cprecaply1(prec,x,desc_data,info,trans) allocate(ww(size(x)),w1(size(x)),stat=info) if (info /= psb_success_) then info=psb_err_alloc_request_ - call psb_errpush(info,name,i_err=(/2*size(x),0,0,0,0/),& + call psb_errpush(info,name, & + & i_err=(/itwo*size(x),izero,izero,izero,izero/),& & a_err='complex(psb_spk_)') goto 9999 end if @@ -279,21 +283,22 @@ subroutine mld_cprecaply2_vect(prec,x,y,desc_data,info,trans,work) type(mld_cprec_type), intent(inout) :: prec type(psb_c_vect_type),intent(inout) :: x type(psb_c_vect_type),intent(inout) :: y - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans complex(psb_spk_),intent(inout), optional, target :: work(:) ! Local variables character :: trans_ complex(psb_spk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_cprecaply' info = psb_success_ call psb_erractionsave(err_act) - ictxt = psb_cd_get_context(desc_data) + ictxt = desc_data%get_context() call psb_info(ictxt, me, np) if (present(trans)) then @@ -305,11 +310,12 @@ subroutine mld_cprecaply2_vect(prec,x,y,desc_data,info,trans,work) if (present(work)) then work_ => work else - iwsz = max(1,4*psb_cd_get_local_cols(desc_data)) + iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='complex(psb_spk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='complex(psb_spk_)') goto 9999 end if @@ -343,7 +349,7 @@ subroutine mld_cprecaply2_vect(prec,x,y,desc_data,info,trans,work) info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif @@ -381,7 +387,7 @@ subroutine mld_cprecaply1_vect(prec,x,desc_data,info,trans,work) type(psb_desc_type),intent(in) :: desc_data type(mld_cprec_type), intent(inout) :: prec type(psb_c_vect_type),intent(inout) :: x - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans complex(psb_spk_),intent(inout), optional, target :: work(:) @@ -389,14 +395,15 @@ subroutine mld_cprecaply1_vect(prec,x,desc_data,info,trans,work) character :: trans_ type(psb_c_vect_type) :: ww complex(psb_spk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_cprecaply' info = psb_success_ call psb_erractionsave(err_act) - ictxt = psb_cd_get_context(desc_data) + ictxt = desc_data%get_context() call psb_info(ictxt, me, np) if (present(trans)) then @@ -408,11 +415,12 @@ subroutine mld_cprecaply1_vect(prec,x,desc_data,info,trans,work) if (present(work)) then work_ => work else - iwsz = max(1,4*psb_cd_get_local_cols(desc_data)) + iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='complex(psb_spk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='complex(psb_spk_)') goto 9999 end if @@ -447,7 +455,7 @@ subroutine mld_cprecaply1_vect(prec,x,desc_data,info,trans,work) info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif diff --git a/mlprec/impl/mld_cprecinit.F90 b/mlprec/impl/mld_cprecinit.F90 index 3e36b67d..9588d2c7 100644 --- a/mlprec/impl/mld_cprecinit.F90 +++ b/mlprec/impl/mld_cprecinit.F90 @@ -108,14 +108,14 @@ subroutine mld_cprecinit(p,ptype,info,nlev) implicit none ! Arguments - type(mld_cprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer, intent(out) :: info - integer, optional, intent(in) :: nlev + type(mld_cprec_type), intent(inout) :: p + character(len=*), intent(in) :: ptype + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: nlev ! Local variables - integer :: nlev_, ilev_ - real(psb_spk_) :: thr + integer(psb_ipk_) :: nlev_, ilev_ + real(psb_spk_) :: thr character(len=*), parameter :: name='mld_precinit' info = psb_success_ @@ -200,10 +200,10 @@ subroutine mld_cprecinit(p,ptype,info,nlev) #endif call p%precv(ilev_)%default() p%precv(ilev_)%parms%coarse_solve = mld_bjac_ - call p%precv(ilev_)%set(mld_smoother_sweeps_,4,info) + call p%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) call p%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_ovr_,0,info) + call p%precv(ilev_)%set(mld_sub_ovr_,izero,info) thr = 0.16d0 do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_cprecset.F90 b/mlprec/impl/mld_cprecset.F90 index 292091f8..38fed9c6 100644 --- a/mlprec/impl/mld_cprecset.F90 +++ b/mlprec/impl/mld_cprecset.F90 @@ -36,7 +36,7 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -! File: mld_zprecset.f90 +! File: mld_cprecset.f90 ! ! Subroutine: mld_cprecseti ! Version: complex @@ -95,14 +95,14 @@ subroutine mld_cprecseti(p,what,val,info,ilev) implicit none ! Arguments - type(mld_cprec_type), intent(inout) :: p - integer, intent(in) :: what - integer, intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_cprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_ + integer(psb_ipk_) :: ilev_, nlev_ character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -347,8 +347,8 @@ contains subroutine onelev_set_smoother(level,val,info) type(mld_c_onelev_type), intent(inout) :: level - integer, intent(in) :: val - integer, intent(out) :: info + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info info = psb_success_ ! @@ -444,8 +444,8 @@ contains subroutine onelev_set_solver(level,val,info) type(mld_c_onelev_type), intent(inout) :: level - integer, intent(in) :: val - integer, intent(out) :: info + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info info = psb_success_ ! @@ -571,13 +571,13 @@ subroutine mld_cprecsetsm(p,val,info,ilev) implicit none ! Arguments - type(mld_cprec_type), intent(inout) :: p + type(mld_cprec_type), intent(inout) :: p class(mld_c_base_smoother_type), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_, ilmin, ilmax + integer(psb_ipk_) :: ilev_, nlev_, ilmin, ilmax character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -634,13 +634,13 @@ subroutine mld_cprecsetsv(p,val,info,ilev) implicit none ! Arguments - type(mld_cprec_type), intent(inout) :: p + type(mld_cprec_type), intent(inout) :: p class(mld_c_base_solver_type), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_, ilmin, ilmax + integer(psb_ipk_) :: ilev_, nlev_, ilmin, ilmax character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -745,14 +745,14 @@ subroutine mld_cprecsetc(p,what,string,info,ilev) implicit none ! Arguments - type(mld_cprec_type), intent(inout) :: p - integer, intent(in) :: what - character(len=*), intent(in) :: string - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_cprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + character(len=*), intent(in) :: string + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_,val + integer(psb_ipk_) :: ilev_, nlev_,val character(len=*), parameter :: name='mld_precsetc' info = psb_success_ @@ -829,14 +829,14 @@ subroutine mld_cprecsetr(p,what,val,info,ilev) implicit none ! Arguments - type(mld_cprec_type), intent(inout) :: p - integer, intent(in) :: what - real(psb_spk_), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_cprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + real(psb_spk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_,nlev_ + integer(psb_ipk_) :: ilev_,nlev_ character(len=*), parameter :: name='mld_precsetr' info = psb_success_ diff --git a/mlprec/impl/mld_dprecaply.f90 b/mlprec/impl/mld_dprecaply.f90 index a8079123..71dc4de1 100644 --- a/mlprec/impl/mld_dprecaply.f90 +++ b/mlprec/impl/mld_dprecaply.f90 @@ -81,17 +81,18 @@ subroutine mld_dprecaply(prec,x,y,desc_data,info,trans,work) ! Arguments type(psb_desc_type),intent(in) :: desc_data type(mld_dprec_type), intent(in) :: prec - real(psb_dpk_),intent(inout) :: x(:) - real(psb_dpk_),intent(inout) :: y(:) - integer, intent(out) :: info + real(psb_dpk_),intent(inout) :: x(:) + real(psb_dpk_),intent(inout) :: y(:) + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans real(psb_dpk_),intent(inout), optional, target :: work(:) ! Local variables character :: trans_ real(psb_dpk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_dprecaply' info = psb_success_ @@ -112,8 +113,9 @@ subroutine mld_dprecaply(prec,x,y,desc_data,info,trans,work) iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='real(psb_dpk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='real(psb_dpk_)') goto 9999 end if @@ -145,7 +147,7 @@ subroutine mld_dprecaply(prec,x,y,desc_data,info,trans,work) else info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif @@ -214,12 +216,13 @@ subroutine mld_dprecaply1(prec,x,desc_data,info,trans) ! Arguments type(psb_desc_type),intent(in) :: desc_data type(mld_dprec_type), intent(in) :: prec - real(psb_dpk_),intent(inout) :: x(:) - integer, intent(out) :: info + real(psb_dpk_),intent(inout) :: x(:) + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans ! Local variables - integer :: ictxt,np,me, err_act + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act real(psb_dpk_), pointer :: WW(:), w1(:) character(len=20) :: name @@ -234,7 +237,8 @@ subroutine mld_dprecaply1(prec,x,desc_data,info,trans) allocate(ww(size(x)),w1(size(x)),stat=info) if (info /= psb_success_) then info=psb_err_alloc_request_ - call psb_errpush(info,name,i_err=(/2*size(x),0,0,0,0/),& + call psb_errpush(info,name, & + & i_err=(/itwo*size(x),izero,izero,izero,izero/),& & a_err='real(psb_dpk_)') goto 9999 end if @@ -279,21 +283,22 @@ subroutine mld_dprecaply2_vect(prec,x,y,desc_data,info,trans,work) type(mld_dprec_type), intent(inout) :: prec type(psb_d_vect_type),intent(inout) :: x type(psb_d_vect_type),intent(inout) :: y - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans real(psb_dpk_),intent(inout), optional, target :: work(:) ! Local variables character :: trans_ real(psb_dpk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_dprecaply' info = psb_success_ call psb_erractionsave(err_act) - ictxt = psb_cd_get_context(desc_data) + ictxt = desc_data%get_context() call psb_info(ictxt, me, np) if (present(trans)) then @@ -305,11 +310,12 @@ subroutine mld_dprecaply2_vect(prec,x,y,desc_data,info,trans,work) if (present(work)) then work_ => work else - iwsz = max(1,4*psb_cd_get_local_cols(desc_data)) + iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='real(psb_dpk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='real(psb_dpk_)') goto 9999 end if @@ -343,7 +349,7 @@ subroutine mld_dprecaply2_vect(prec,x,y,desc_data,info,trans,work) info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif @@ -370,7 +376,6 @@ subroutine mld_dprecaply2_vect(prec,x,y,desc_data,info,trans,work) end subroutine mld_dprecaply2_vect - subroutine mld_dprecaply1_vect(prec,x,desc_data,info,trans,work) use psb_base_mod @@ -382,7 +387,7 @@ subroutine mld_dprecaply1_vect(prec,x,desc_data,info,trans,work) type(psb_desc_type),intent(in) :: desc_data type(mld_dprec_type), intent(inout) :: prec type(psb_d_vect_type),intent(inout) :: x - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans real(psb_dpk_),intent(inout), optional, target :: work(:) @@ -390,14 +395,15 @@ subroutine mld_dprecaply1_vect(prec,x,desc_data,info,trans,work) character :: trans_ type(psb_d_vect_type) :: ww real(psb_dpk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_dprecaply' info = psb_success_ call psb_erractionsave(err_act) - ictxt = psb_cd_get_context(desc_data) + ictxt = desc_data%get_context() call psb_info(ictxt, me, np) if (present(trans)) then @@ -409,11 +415,12 @@ subroutine mld_dprecaply1_vect(prec,x,desc_data,info,trans,work) if (present(work)) then work_ => work else - iwsz = max(1,4*psb_cd_get_local_cols(desc_data)) + iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='real(psb_dpk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='real(psb_dpk_)') goto 9999 end if @@ -448,7 +455,7 @@ subroutine mld_dprecaply1_vect(prec,x,desc_data,info,trans,work) info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif diff --git a/mlprec/impl/mld_dprecinit.F90 b/mlprec/impl/mld_dprecinit.F90 index 632c53ba..b9bb14ac 100644 --- a/mlprec/impl/mld_dprecinit.F90 +++ b/mlprec/impl/mld_dprecinit.F90 @@ -108,14 +108,14 @@ subroutine mld_dprecinit(p,ptype,info,nlev) implicit none ! Arguments - type(mld_dprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer, intent(out) :: info - integer, optional, intent(in) :: nlev + type(mld_dprec_type), intent(inout) :: p + character(len=*), intent(in) :: ptype + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: nlev ! Local variables - integer :: nlev_, ilev_ - real(psb_dpk_) :: thr + integer(psb_ipk_) :: nlev_, ilev_ + real(psb_dpk_) :: thr character(len=*), parameter :: name='mld_precinit' info = psb_success_ @@ -200,10 +200,10 @@ subroutine mld_dprecinit(p,ptype,info,nlev) #endif call p%precv(ilev_)%default() p%precv(ilev_)%parms%coarse_solve = mld_bjac_ - call p%precv(ilev_)%set(mld_smoother_sweeps_,4,info) + call p%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) call p%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_ovr_,0,info) + call p%precv(ilev_)%set(mld_sub_ovr_,izero,info) thr = 0.16d0 do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_dprecset.F90 b/mlprec/impl/mld_dprecset.F90 index 9ad23fd5..eb8eda85 100644 --- a/mlprec/impl/mld_dprecset.F90 +++ b/mlprec/impl/mld_dprecset.F90 @@ -95,14 +95,14 @@ subroutine mld_dprecseti(p,what,val,info,ilev) implicit none ! Arguments - type(mld_dprec_type), intent(inout) :: p - integer, intent(in) :: what - integer, intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_dprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_ + integer(psb_ipk_) :: ilev_, nlev_ character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -347,8 +347,8 @@ contains subroutine onelev_set_smoother(level,val,info) type(mld_d_onelev_type), intent(inout) :: level - integer, intent(in) :: val - integer, intent(out) :: info + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info info = psb_success_ ! @@ -444,8 +444,8 @@ contains subroutine onelev_set_solver(level,val,info) type(mld_d_onelev_type), intent(inout) :: level - integer, intent(in) :: val - integer, intent(out) :: info + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info info = psb_success_ ! @@ -571,13 +571,13 @@ subroutine mld_dprecsetsm(p,val,info,ilev) implicit none ! Arguments - type(mld_dprec_type), intent(inout) :: p + type(mld_dprec_type), intent(inout) :: p class(mld_d_base_smoother_type), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_, ilmin, ilmax + integer(psb_ipk_) :: ilev_, nlev_, ilmin, ilmax character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -634,13 +634,13 @@ subroutine mld_dprecsetsv(p,val,info,ilev) implicit none ! Arguments - type(mld_dprec_type), intent(inout) :: p + type(mld_dprec_type), intent(inout) :: p class(mld_d_base_solver_type), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_, ilmin, ilmax + integer(psb_ipk_) :: ilev_, nlev_, ilmin, ilmax character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -745,14 +745,14 @@ subroutine mld_dprecsetc(p,what,string,info,ilev) implicit none ! Arguments - type(mld_dprec_type), intent(inout) :: p - integer, intent(in) :: what - character(len=*), intent(in) :: string - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_dprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + character(len=*), intent(in) :: string + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_,val + integer(psb_ipk_) :: ilev_, nlev_,val character(len=*), parameter :: name='mld_precsetc' info = psb_success_ @@ -829,14 +829,14 @@ subroutine mld_dprecsetr(p,what,val,info,ilev) implicit none ! Arguments - type(mld_dprec_type), intent(inout) :: p - integer, intent(in) :: what - real(psb_dpk_), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_dprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + real(psb_dpk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_,nlev_ + integer(psb_ipk_) :: ilev_,nlev_ character(len=*), parameter :: name='mld_precsetr' info = psb_success_ diff --git a/mlprec/impl/mld_sprecaply.f90 b/mlprec/impl/mld_sprecaply.f90 index 037fa32f..834dfffd 100644 --- a/mlprec/impl/mld_sprecaply.f90 +++ b/mlprec/impl/mld_sprecaply.f90 @@ -81,17 +81,18 @@ subroutine mld_sprecaply(prec,x,y,desc_data,info,trans,work) ! Arguments type(psb_desc_type),intent(in) :: desc_data type(mld_sprec_type), intent(in) :: prec - real(psb_spk_),intent(inout) :: x(:) - real(psb_spk_),intent(inout) :: y(:) - integer, intent(out) :: info + real(psb_spk_),intent(inout) :: x(:) + real(psb_spk_),intent(inout) :: y(:) + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans real(psb_spk_),intent(inout), optional, target :: work(:) ! Local variables character :: trans_ real(psb_spk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_sprecaply' info = psb_success_ @@ -112,8 +113,9 @@ subroutine mld_sprecaply(prec,x,y,desc_data,info,trans,work) iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='real(psb_spk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='real(psb_spk_)') goto 9999 end if @@ -145,7 +147,7 @@ subroutine mld_sprecaply(prec,x,y,desc_data,info,trans,work) else info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif @@ -214,12 +216,13 @@ subroutine mld_sprecaply1(prec,x,desc_data,info,trans) ! Arguments type(psb_desc_type),intent(in) :: desc_data type(mld_sprec_type), intent(in) :: prec - real(psb_spk_),intent(inout) :: x(:) - integer, intent(out) :: info + real(psb_spk_),intent(inout) :: x(:) + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans ! Local variables - integer :: ictxt,np,me, err_act + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act real(psb_spk_), pointer :: WW(:), w1(:) character(len=20) :: name @@ -234,7 +237,8 @@ subroutine mld_sprecaply1(prec,x,desc_data,info,trans) allocate(ww(size(x)),w1(size(x)),stat=info) if (info /= psb_success_) then info=psb_err_alloc_request_ - call psb_errpush(info,name,i_err=(/2*size(x),0,0,0,0/),& + call psb_errpush(info,name, & + & i_err=(/itwo*size(x),izero,izero,izero,izero/),& & a_err='real(psb_spk_)') goto 9999 end if @@ -279,21 +283,22 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work) type(mld_sprec_type), intent(inout) :: prec type(psb_s_vect_type),intent(inout) :: x type(psb_s_vect_type),intent(inout) :: y - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans real(psb_spk_),intent(inout), optional, target :: work(:) ! Local variables character :: trans_ real(psb_spk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_sprecaply' info = psb_success_ call psb_erractionsave(err_act) - ictxt = psb_cd_get_context(desc_data) + ictxt = desc_data%get_context() call psb_info(ictxt, me, np) if (present(trans)) then @@ -305,11 +310,12 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work) if (present(work)) then work_ => work else - iwsz = max(1,4*psb_cd_get_local_cols(desc_data)) + iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='real(psb_spk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='real(psb_spk_)') goto 9999 end if @@ -343,7 +349,7 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work) info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif @@ -369,6 +375,7 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work) end subroutine mld_sprecaply2_vect + subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work) use psb_base_mod @@ -380,7 +387,7 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work) type(psb_desc_type),intent(in) :: desc_data type(mld_sprec_type), intent(inout) :: prec type(psb_s_vect_type),intent(inout) :: x - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans real(psb_spk_),intent(inout), optional, target :: work(:) @@ -388,14 +395,15 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work) character :: trans_ type(psb_s_vect_type) :: ww real(psb_spk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_sprecaply' info = psb_success_ call psb_erractionsave(err_act) - ictxt = psb_cd_get_context(desc_data) + ictxt = desc_data%get_context() call psb_info(ictxt, me, np) if (present(trans)) then @@ -407,18 +415,19 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work) if (present(work)) then work_ => work else - iwsz = max(1,4*psb_cd_get_local_cols(desc_data)) + iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='real(psb_dpk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='real(psb_spk_)') goto 9999 end if end if if (.not.(allocated(prec%precv))) then - !! Error 1: should call mld_dprecbld + !! Error 1: should call mld_sprecbld info=3112 call psb_errpush(info,name) goto 9999 @@ -446,7 +455,7 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work) info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif diff --git a/mlprec/impl/mld_sprecinit.F90 b/mlprec/impl/mld_sprecinit.F90 index d1c38dde..53aea9f2 100644 --- a/mlprec/impl/mld_sprecinit.F90 +++ b/mlprec/impl/mld_sprecinit.F90 @@ -108,14 +108,14 @@ subroutine mld_sprecinit(p,ptype,info,nlev) implicit none ! Arguments - type(mld_sprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer, intent(out) :: info - integer, optional, intent(in) :: nlev + type(mld_sprec_type), intent(inout) :: p + character(len=*), intent(in) :: ptype + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: nlev ! Local variables - integer :: nlev_, ilev_ - real(psb_spk_) :: thr + integer(psb_ipk_) :: nlev_, ilev_ + real(psb_spk_) :: thr character(len=*), parameter :: name='mld_precinit' info = psb_success_ @@ -200,10 +200,10 @@ subroutine mld_sprecinit(p,ptype,info,nlev) #endif call p%precv(ilev_)%default() p%precv(ilev_)%parms%coarse_solve = mld_bjac_ - call p%precv(ilev_)%set(mld_smoother_sweeps_,4,info) + call p%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) call p%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_ovr_,0,info) + call p%precv(ilev_)%set(mld_sub_ovr_,izero,info) thr = 0.16d0 do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_sprecset.F90 b/mlprec/impl/mld_sprecset.F90 index 89661502..32daf90f 100644 --- a/mlprec/impl/mld_sprecset.F90 +++ b/mlprec/impl/mld_sprecset.F90 @@ -36,7 +36,7 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ -! File: mld_dprecset.f90 +! File: mld_sprecset.f90 ! ! Subroutine: mld_sprecseti ! Version: real @@ -95,14 +95,14 @@ subroutine mld_sprecseti(p,what,val,info,ilev) implicit none ! Arguments - type(mld_sprec_type), intent(inout) :: p - integer, intent(in) :: what - integer, intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_sprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_ + integer(psb_ipk_) :: ilev_, nlev_ character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -347,8 +347,8 @@ contains subroutine onelev_set_smoother(level,val,info) type(mld_s_onelev_type), intent(inout) :: level - integer, intent(in) :: val - integer, intent(out) :: info + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info info = psb_success_ ! @@ -444,8 +444,8 @@ contains subroutine onelev_set_solver(level,val,info) type(mld_s_onelev_type), intent(inout) :: level - integer, intent(in) :: val - integer, intent(out) :: info + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info info = psb_success_ ! @@ -571,13 +571,13 @@ subroutine mld_sprecsetsm(p,val,info,ilev) implicit none ! Arguments - type(mld_sprec_type), intent(inout) :: p + type(mld_sprec_type), intent(inout) :: p class(mld_s_base_smoother_type), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_, ilmin, ilmax + integer(psb_ipk_) :: ilev_, nlev_, ilmin, ilmax character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -634,13 +634,13 @@ subroutine mld_sprecsetsv(p,val,info,ilev) implicit none ! Arguments - type(mld_sprec_type), intent(inout) :: p + type(mld_sprec_type), intent(inout) :: p class(mld_s_base_solver_type), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_, ilmin, ilmax + integer(psb_ipk_) :: ilev_, nlev_, ilmin, ilmax character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -745,14 +745,14 @@ subroutine mld_sprecsetc(p,what,string,info,ilev) implicit none ! Arguments - type(mld_sprec_type), intent(inout) :: p - integer, intent(in) :: what - character(len=*), intent(in) :: string - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_sprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + character(len=*), intent(in) :: string + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_,val + integer(psb_ipk_) :: ilev_, nlev_,val character(len=*), parameter :: name='mld_precsetc' info = psb_success_ @@ -829,14 +829,14 @@ subroutine mld_sprecsetr(p,what,val,info,ilev) implicit none ! Arguments - type(mld_sprec_type), intent(inout) :: p - integer, intent(in) :: what - real(psb_spk_), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_sprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + real(psb_spk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_,nlev_ + integer(psb_ipk_) :: ilev_,nlev_ character(len=*), parameter :: name='mld_precsetr' info = psb_success_ diff --git a/mlprec/impl/mld_zprecaply.f90 b/mlprec/impl/mld_zprecaply.f90 index f41fa3f4..f97b8c87 100644 --- a/mlprec/impl/mld_zprecaply.f90 +++ b/mlprec/impl/mld_zprecaply.f90 @@ -81,17 +81,18 @@ subroutine mld_zprecaply(prec,x,y,desc_data,info,trans,work) ! Arguments type(psb_desc_type),intent(in) :: desc_data type(mld_zprec_type), intent(in) :: prec - complex(psb_dpk_),intent(inout) :: x(:) - complex(psb_dpk_),intent(inout) :: y(:) - integer, intent(out) :: info + complex(psb_dpk_),intent(inout) :: x(:) + complex(psb_dpk_),intent(inout) :: y(:) + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans complex(psb_dpk_),intent(inout), optional, target :: work(:) ! Local variables character :: trans_ complex(psb_dpk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_zprecaply' info = psb_success_ @@ -112,8 +113,9 @@ subroutine mld_zprecaply(prec,x,y,desc_data,info,trans,work) iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='complex(psb_dpk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='complex(psb_dpk_)') goto 9999 end if @@ -145,7 +147,7 @@ subroutine mld_zprecaply(prec,x,y,desc_data,info,trans,work) else info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif @@ -214,12 +216,13 @@ subroutine mld_zprecaply1(prec,x,desc_data,info,trans) ! Arguments type(psb_desc_type),intent(in) :: desc_data type(mld_zprec_type), intent(in) :: prec - complex(psb_dpk_),intent(inout) :: x(:) - integer, intent(out) :: info + complex(psb_dpk_),intent(inout) :: x(:) + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans ! Local variables - integer :: ictxt,np,me, err_act + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act complex(psb_dpk_), pointer :: WW(:), w1(:) character(len=20) :: name @@ -234,7 +237,8 @@ subroutine mld_zprecaply1(prec,x,desc_data,info,trans) allocate(ww(size(x)),w1(size(x)),stat=info) if (info /= psb_success_) then info=psb_err_alloc_request_ - call psb_errpush(info,name,i_err=(/2*size(x),0,0,0,0/),& + call psb_errpush(info,name, & + & i_err=(/itwo*size(x),izero,izero,izero,izero/),& & a_err='complex(psb_dpk_)') goto 9999 end if @@ -279,21 +283,22 @@ subroutine mld_zprecaply2_vect(prec,x,y,desc_data,info,trans,work) type(mld_zprec_type), intent(inout) :: prec type(psb_z_vect_type),intent(inout) :: x type(psb_z_vect_type),intent(inout) :: y - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans complex(psb_dpk_),intent(inout), optional, target :: work(:) ! Local variables character :: trans_ complex(psb_dpk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_zprecaply' info = psb_success_ call psb_erractionsave(err_act) - ictxt = psb_cd_get_context(desc_data) + ictxt = desc_data%get_context() call psb_info(ictxt, me, np) if (present(trans)) then @@ -305,11 +310,12 @@ subroutine mld_zprecaply2_vect(prec,x,y,desc_data,info,trans,work) if (present(work)) then work_ => work else - iwsz = max(1,4*psb_cd_get_local_cols(desc_data)) + iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='complex(psb_dpk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='complex(psb_dpk_)') goto 9999 end if @@ -343,7 +349,7 @@ subroutine mld_zprecaply2_vect(prec,x,y,desc_data,info,trans,work) info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif @@ -381,7 +387,7 @@ subroutine mld_zprecaply1_vect(prec,x,desc_data,info,trans,work) type(psb_desc_type),intent(in) :: desc_data type(mld_zprec_type), intent(inout) :: prec type(psb_z_vect_type),intent(inout) :: x - integer, intent(out) :: info + integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans complex(psb_dpk_),intent(inout), optional, target :: work(:) @@ -389,14 +395,15 @@ subroutine mld_zprecaply1_vect(prec,x,desc_data,info,trans,work) character :: trans_ type(psb_z_vect_type) :: ww complex(psb_dpk_), pointer :: work_(:) - integer :: ictxt,np,me,err_act,iwsz - character(len=20) :: name + integer(psb_mpik_) :: ictxt,np,me + integer(psb_ipk_) :: err_act,iwsz + character(len=20) :: name name='mld_zprecaply' info = psb_success_ call psb_erractionsave(err_act) - ictxt = psb_cd_get_context(desc_data) + ictxt = desc_data%get_context() call psb_info(ictxt, me, np) if (present(trans)) then @@ -408,11 +415,12 @@ subroutine mld_zprecaply1_vect(prec,x,desc_data,info,trans,work) if (present(work)) then work_ => work else - iwsz = max(1,4*psb_cd_get_local_cols(desc_data)) + iwsz = max(1,4*desc_data%get_local_cols()) allocate(work_(iwsz),stat=info) if (info /= psb_success_) then - call psb_errpush(psb_err_alloc_request_,name,i_err=(/iwsz,0,0,0,0/),& - &a_err='complex(psb_dpk_)') + call psb_errpush(psb_err_alloc_request_,name, & + & i_err=(/iwsz,izero,izero,izero,izero/),& + & a_err='complex(psb_dpk_)') goto 9999 end if @@ -447,7 +455,7 @@ subroutine mld_zprecaply1_vect(prec,x,desc_data,info,trans,work) info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& - & i_Err=(/size(prec%precv),0,0,0,0/)) + & i_Err=(/ione*size(prec%precv),izero,izero,izero,izero/)) goto 9999 endif diff --git a/mlprec/impl/mld_zprecinit.F90 b/mlprec/impl/mld_zprecinit.F90 index ae72d032..ac351b9f 100644 --- a/mlprec/impl/mld_zprecinit.F90 +++ b/mlprec/impl/mld_zprecinit.F90 @@ -108,14 +108,14 @@ subroutine mld_zprecinit(p,ptype,info,nlev) implicit none ! Arguments - type(mld_zprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer, intent(out) :: info - integer, optional, intent(in) :: nlev + type(mld_zprec_type), intent(inout) :: p + character(len=*), intent(in) :: ptype + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: nlev ! Local variables - integer :: nlev_, ilev_ - real(psb_dpk_) :: thr + integer(psb_ipk_) :: nlev_, ilev_ + real(psb_dpk_) :: thr character(len=*), parameter :: name='mld_precinit' info = psb_success_ @@ -200,10 +200,10 @@ subroutine mld_zprecinit(p,ptype,info,nlev) #endif call p%precv(ilev_)%default() p%precv(ilev_)%parms%coarse_solve = mld_bjac_ - call p%precv(ilev_)%set(mld_smoother_sweeps_,4,info) + call p%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) call p%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_ovr_,0,info) + call p%precv(ilev_)%set(mld_sub_ovr_,izero,info) thr = 0.16d0 do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_zprecset.F90 b/mlprec/impl/mld_zprecset.F90 index 4f7eb682..eecdeda7 100644 --- a/mlprec/impl/mld_zprecset.F90 +++ b/mlprec/impl/mld_zprecset.F90 @@ -95,14 +95,14 @@ subroutine mld_zprecseti(p,what,val,info,ilev) implicit none ! Arguments - type(mld_zprec_type), intent(inout) :: p - integer, intent(in) :: what - integer, intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_zprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_ + integer(psb_ipk_) :: ilev_, nlev_ character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -347,8 +347,8 @@ contains subroutine onelev_set_smoother(level,val,info) type(mld_z_onelev_type), intent(inout) :: level - integer, intent(in) :: val - integer, intent(out) :: info + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info info = psb_success_ ! @@ -444,8 +444,8 @@ contains subroutine onelev_set_solver(level,val,info) type(mld_z_onelev_type), intent(inout) :: level - integer, intent(in) :: val - integer, intent(out) :: info + integer(psb_ipk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info info = psb_success_ ! @@ -571,13 +571,13 @@ subroutine mld_zprecsetsm(p,val,info,ilev) implicit none ! Arguments - type(mld_zprec_type), intent(inout) :: p + type(mld_zprec_type), intent(inout) :: p class(mld_z_base_smoother_type), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_, ilmin, ilmax + integer(psb_ipk_) :: ilev_, nlev_, ilmin, ilmax character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -634,13 +634,13 @@ subroutine mld_zprecsetsv(p,val,info,ilev) implicit none ! Arguments - type(mld_zprec_type), intent(inout) :: p + type(mld_zprec_type), intent(inout) :: p class(mld_z_base_solver_type), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_, ilmin, ilmax + integer(psb_ipk_) :: ilev_, nlev_, ilmin, ilmax character(len=*), parameter :: name='mld_precseti' info = psb_success_ @@ -745,14 +745,14 @@ subroutine mld_zprecsetc(p,what,string,info,ilev) implicit none ! Arguments - type(mld_zprec_type), intent(inout) :: p - integer, intent(in) :: what - character(len=*), intent(in) :: string - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_zprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + character(len=*), intent(in) :: string + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_, nlev_,val + integer(psb_ipk_) :: ilev_, nlev_,val character(len=*), parameter :: name='mld_precsetc' info = psb_success_ @@ -829,14 +829,14 @@ subroutine mld_zprecsetr(p,what,val,info,ilev) implicit none ! Arguments - type(mld_zprec_type), intent(inout) :: p - integer, intent(in) :: what - real(psb_dpk_), intent(in) :: val - integer, intent(out) :: info - integer, optional, intent(in) :: ilev + type(mld_zprec_type), intent(inout) :: p + integer(psb_ipk_), intent(in) :: what + real(psb_dpk_), intent(in) :: val + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), optional, intent(in) :: ilev ! Local variables - integer :: ilev_,nlev_ + integer(psb_ipk_) :: ilev_,nlev_ character(len=*), parameter :: name='mld_precsetr' info = psb_success_