From ac5512974ba6d8dac5c9a719a275c864ae9c46ae Mon Sep 17 00:00:00 2001 From: sfilippone Date: Tue, 13 Jan 2026 16:57:06 +0100 Subject: [PATCH] Fix vector allocation etc. --- base/modules/serial/psb_c_base_vect_mod.F90 | 10 +--------- base/modules/serial/psb_d_base_vect_mod.F90 | 10 +--------- base/modules/serial/psb_i_base_vect_mod.F90 | 10 +--------- base/modules/serial/psb_l_base_vect_mod.F90 | 10 +--------- base/modules/serial/psb_s_base_vect_mod.F90 | 10 +--------- base/modules/serial/psb_z_base_vect_mod.F90 | 10 +--------- base/tools/psb_callc.f90 | 4 +++- base/tools/psb_dallc.f90 | 4 +++- base/tools/psb_iallc.f90 | 4 +++- base/tools/psb_lallc.f90 | 4 +++- base/tools/psb_sallc.f90 | 4 +++- base/tools/psb_zallc.f90 | 4 +++- cuda/psb_c_cuda_vect_mod.F90 | 16 ++++++++++------ cuda/psb_d_cuda_vect_mod.F90 | 16 ++++++++++------ cuda/psb_i_cuda_vect_mod.F90 | 16 ++++++++++------ cuda/psb_s_cuda_vect_mod.F90 | 16 ++++++++++------ cuda/psb_z_cuda_vect_mod.F90 | 16 ++++++++++------ 17 files changed, 74 insertions(+), 90 deletions(-) diff --git a/base/modules/serial/psb_c_base_vect_mod.F90 b/base/modules/serial/psb_c_base_vect_mod.F90 index 20ee1ef0..d0ec0a5d 100644 --- a/base/modules/serial/psb_c_base_vect_mod.F90 +++ b/base/modules/serial/psb_c_base_vect_mod.F90 @@ -2657,16 +2657,8 @@ contains integer(psb_ipk_) :: info logical, intent(in), optional :: scratch - logical :: scratch_ - - - if (present(scratch)) then - scratch_ = scratch - else - scratch_ = .false. - end if call psb_realloc(m,n,x%v,info) - call x%asb(m,n,info) + call x%asb(m,n,info,scratch) end subroutine c_base_mlv_bld_n diff --git a/base/modules/serial/psb_d_base_vect_mod.F90 b/base/modules/serial/psb_d_base_vect_mod.F90 index 907d1034..6845e150 100644 --- a/base/modules/serial/psb_d_base_vect_mod.F90 +++ b/base/modules/serial/psb_d_base_vect_mod.F90 @@ -2836,16 +2836,8 @@ contains integer(psb_ipk_) :: info logical, intent(in), optional :: scratch - logical :: scratch_ - - - if (present(scratch)) then - scratch_ = scratch - else - scratch_ = .false. - end if call psb_realloc(m,n,x%v,info) - call x%asb(m,n,info) + call x%asb(m,n,info,scratch) end subroutine d_base_mlv_bld_n diff --git a/base/modules/serial/psb_i_base_vect_mod.F90 b/base/modules/serial/psb_i_base_vect_mod.F90 index 3a096eb3..1c7c00c3 100644 --- a/base/modules/serial/psb_i_base_vect_mod.F90 +++ b/base/modules/serial/psb_i_base_vect_mod.F90 @@ -1582,16 +1582,8 @@ contains integer(psb_ipk_) :: info logical, intent(in), optional :: scratch - logical :: scratch_ - - - if (present(scratch)) then - scratch_ = scratch - else - scratch_ = .false. - end if call psb_realloc(m,n,x%v,info) - call x%asb(m,n,info) + call x%asb(m,n,info,scratch) end subroutine i_base_mlv_bld_n diff --git a/base/modules/serial/psb_l_base_vect_mod.F90 b/base/modules/serial/psb_l_base_vect_mod.F90 index 4030b0a7..7e8e0528 100644 --- a/base/modules/serial/psb_l_base_vect_mod.F90 +++ b/base/modules/serial/psb_l_base_vect_mod.F90 @@ -1583,16 +1583,8 @@ contains integer(psb_ipk_) :: info logical, intent(in), optional :: scratch - logical :: scratch_ - - - if (present(scratch)) then - scratch_ = scratch - else - scratch_ = .false. - end if call psb_realloc(m,n,x%v,info) - call x%asb(m,n,info) + call x%asb(m,n,info,scratch) end subroutine l_base_mlv_bld_n diff --git a/base/modules/serial/psb_s_base_vect_mod.F90 b/base/modules/serial/psb_s_base_vect_mod.F90 index d5628e31..f425aedb 100644 --- a/base/modules/serial/psb_s_base_vect_mod.F90 +++ b/base/modules/serial/psb_s_base_vect_mod.F90 @@ -2836,16 +2836,8 @@ contains integer(psb_ipk_) :: info logical, intent(in), optional :: scratch - logical :: scratch_ - - - if (present(scratch)) then - scratch_ = scratch - else - scratch_ = .false. - end if call psb_realloc(m,n,x%v,info) - call x%asb(m,n,info) + call x%asb(m,n,info,scratch) end subroutine s_base_mlv_bld_n diff --git a/base/modules/serial/psb_z_base_vect_mod.F90 b/base/modules/serial/psb_z_base_vect_mod.F90 index cc437d4d..eb92a938 100644 --- a/base/modules/serial/psb_z_base_vect_mod.F90 +++ b/base/modules/serial/psb_z_base_vect_mod.F90 @@ -2657,16 +2657,8 @@ contains integer(psb_ipk_) :: info logical, intent(in), optional :: scratch - logical :: scratch_ - - - if (present(scratch)) then - scratch_ = scratch - else - scratch_ = .false. - end if call psb_realloc(m,n,x%v,info) - call x%asb(m,n,info) + call x%asb(m,n,info,scratch) end subroutine z_base_mlv_bld_n diff --git a/base/tools/psb_callc.f90 b/base/tools/psb_callc.f90 index 39925b40..d4211872 100644 --- a/base/tools/psb_callc.f90 +++ b/base/tools/psb_callc.f90 @@ -53,7 +53,7 @@ subroutine psb_calloc_vect(x, desc_a,info, dupl, bldmode) !locals integer(psb_ipk_) :: np,me,nr,i,err_act - integer(psb_ipk_) :: dupl_, bldmode_, nrmt_ + integer(psb_ipk_) :: bldmode_, nrmt_ type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -111,6 +111,8 @@ subroutine psb_calloc_vect(x, desc_a,info, dupl, bldmode) call x%set_bld() if (present(dupl)) then call x%set_dupl(dupl) + else + call x%set_dupl(psb_dupl_def_) end if call x%set_remote_build(bldmode_) call x%set_nrmv(izero) diff --git a/base/tools/psb_dallc.f90 b/base/tools/psb_dallc.f90 index 942ccb74..8a02d3ad 100644 --- a/base/tools/psb_dallc.f90 +++ b/base/tools/psb_dallc.f90 @@ -53,7 +53,7 @@ subroutine psb_dalloc_vect(x, desc_a,info, dupl, bldmode) !locals integer(psb_ipk_) :: np,me,nr,i,err_act - integer(psb_ipk_) :: dupl_, bldmode_, nrmt_ + integer(psb_ipk_) :: bldmode_, nrmt_ type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -111,6 +111,8 @@ subroutine psb_dalloc_vect(x, desc_a,info, dupl, bldmode) call x%set_bld() if (present(dupl)) then call x%set_dupl(dupl) + else + call x%set_dupl(psb_dupl_def_) end if call x%set_remote_build(bldmode_) call x%set_nrmv(izero) diff --git a/base/tools/psb_iallc.f90 b/base/tools/psb_iallc.f90 index 75b560e6..68b94e59 100644 --- a/base/tools/psb_iallc.f90 +++ b/base/tools/psb_iallc.f90 @@ -53,7 +53,7 @@ subroutine psb_ialloc_vect(x, desc_a,info, dupl, bldmode) !locals integer(psb_ipk_) :: np,me,nr,i,err_act - integer(psb_ipk_) :: dupl_, bldmode_, nrmt_ + integer(psb_ipk_) :: bldmode_, nrmt_ type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -111,6 +111,8 @@ subroutine psb_ialloc_vect(x, desc_a,info, dupl, bldmode) call x%set_bld() if (present(dupl)) then call x%set_dupl(dupl) + else + call x%set_dupl(psb_dupl_def_) end if call x%set_remote_build(bldmode_) call x%set_nrmv(izero) diff --git a/base/tools/psb_lallc.f90 b/base/tools/psb_lallc.f90 index 7d47b7cb..ba8cc415 100644 --- a/base/tools/psb_lallc.f90 +++ b/base/tools/psb_lallc.f90 @@ -53,7 +53,7 @@ subroutine psb_lalloc_vect(x, desc_a,info, dupl, bldmode) !locals integer(psb_ipk_) :: np,me,nr,i,err_act - integer(psb_ipk_) :: dupl_, bldmode_, nrmt_ + integer(psb_ipk_) :: bldmode_, nrmt_ type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -111,6 +111,8 @@ subroutine psb_lalloc_vect(x, desc_a,info, dupl, bldmode) call x%set_bld() if (present(dupl)) then call x%set_dupl(dupl) + else + call x%set_dupl(psb_dupl_def_) end if call x%set_remote_build(bldmode_) call x%set_nrmv(izero) diff --git a/base/tools/psb_sallc.f90 b/base/tools/psb_sallc.f90 index 00ab3812..3c4f9a99 100644 --- a/base/tools/psb_sallc.f90 +++ b/base/tools/psb_sallc.f90 @@ -53,7 +53,7 @@ subroutine psb_salloc_vect(x, desc_a,info, dupl, bldmode) !locals integer(psb_ipk_) :: np,me,nr,i,err_act - integer(psb_ipk_) :: dupl_, bldmode_, nrmt_ + integer(psb_ipk_) :: bldmode_, nrmt_ type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -111,6 +111,8 @@ subroutine psb_salloc_vect(x, desc_a,info, dupl, bldmode) call x%set_bld() if (present(dupl)) then call x%set_dupl(dupl) + else + call x%set_dupl(psb_dupl_def_) end if call x%set_remote_build(bldmode_) call x%set_nrmv(izero) diff --git a/base/tools/psb_zallc.f90 b/base/tools/psb_zallc.f90 index de6e91b0..bfc3d678 100644 --- a/base/tools/psb_zallc.f90 +++ b/base/tools/psb_zallc.f90 @@ -53,7 +53,7 @@ subroutine psb_zalloc_vect(x, desc_a,info, dupl, bldmode) !locals integer(psb_ipk_) :: np,me,nr,i,err_act - integer(psb_ipk_) :: dupl_, bldmode_, nrmt_ + integer(psb_ipk_) :: bldmode_, nrmt_ type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name @@ -111,6 +111,8 @@ subroutine psb_zalloc_vect(x, desc_a,info, dupl, bldmode) call x%set_bld() if (present(dupl)) then call x%set_dupl(dupl) + else + call x%set_dupl(psb_dupl_def_) end if call x%set_remote_build(bldmode_) call x%set_nrmv(izero) diff --git a/cuda/psb_c_cuda_vect_mod.F90 b/cuda/psb_c_cuda_vect_mod.F90 index 96c8ec1f..711ec885 100644 --- a/cuda/psb_c_cuda_vect_mod.F90 +++ b/cuda/psb_c_cuda_vect_mod.F90 @@ -1537,12 +1537,14 @@ contains end subroutine c_cuda_multi_bld_x - subroutine c_cuda_multi_bld_n(x,m,n) + subroutine c_cuda_multi_bld_n(x,m,n,scratch) integer(psb_ipk_), intent(in) :: m,n class(psb_c_multivect_cuda), intent(inout) :: x integer(psb_ipk_) :: info + logical, intent(in), optional :: scratch call x%all(m,n,info) + call x%asb(m,n,info,scratch=scratch) if (info /= 0) then call psb_errpush(info,'c_cuda_multi_bld_n',i_err=(/m,n,n,n,n/)) end if @@ -1938,7 +1940,7 @@ contains call x%set_host() end subroutine c_cuda_multi_zero - subroutine c_cuda_multi_asb(m,n, x, info) + subroutine c_cuda_multi_asb(m,n, x, info, scratch) use psi_serial_mod use psb_realloc_mod implicit none @@ -1946,12 +1948,14 @@ contains class(psb_c_multivect_cuda), intent(inout) :: x integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: nd, nc + logical, intent(in), optional :: scratch + info = 0 x%m_nrows = m x%m_ncols = n if (x%is_host()) then - call x%psb_c_base_multivect_type%asb(m,n,info) + call x%psb_c_base_multivect_type%asb(m,n,info,scratch) if (info == psb_success_) call x%sync_space(info) else if (x%is_dev()) then nd = getMultiVecDevicePitch(x%deviceVect) @@ -2088,11 +2092,11 @@ contains call x%set_sync() end subroutine c_cuda_multi_vect_finalize - subroutine c_cuda_multi_ins(n,irl,val,dupl,x,info) + subroutine c_cuda_multi_ins(n,irl,val,dupl,x,maxr,info) use psi_serial_mod implicit none class(psb_c_multivect_cuda), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n, dupl + integer(psb_ipk_), intent(in) :: n, dupl,maxr integer(psb_ipk_), intent(in) :: irl(:) complex(psb_spk_), intent(in) :: val(:,:) integer(psb_ipk_), intent(out) :: info @@ -2101,7 +2105,7 @@ contains info = 0 if (x%is_dev()) call x%sync() - call x%psb_c_base_multivect_type%ins(n,irl,val,dupl,info) + call x%psb_c_base_multivect_type%ins(n,irl,val,dupl,maxr,info) call x%set_host() end subroutine c_cuda_multi_ins diff --git a/cuda/psb_d_cuda_vect_mod.F90 b/cuda/psb_d_cuda_vect_mod.F90 index 7618c61d..036d2f01 100644 --- a/cuda/psb_d_cuda_vect_mod.F90 +++ b/cuda/psb_d_cuda_vect_mod.F90 @@ -1537,12 +1537,14 @@ contains end subroutine d_cuda_multi_bld_x - subroutine d_cuda_multi_bld_n(x,m,n) + subroutine d_cuda_multi_bld_n(x,m,n,scratch) integer(psb_ipk_), intent(in) :: m,n class(psb_d_multivect_cuda), intent(inout) :: x integer(psb_ipk_) :: info + logical, intent(in), optional :: scratch call x%all(m,n,info) + call x%asb(m,n,info,scratch=scratch) if (info /= 0) then call psb_errpush(info,'d_cuda_multi_bld_n',i_err=(/m,n,n,n,n/)) end if @@ -1938,7 +1940,7 @@ contains call x%set_host() end subroutine d_cuda_multi_zero - subroutine d_cuda_multi_asb(m,n, x, info) + subroutine d_cuda_multi_asb(m,n, x, info, scratch) use psi_serial_mod use psb_realloc_mod implicit none @@ -1946,12 +1948,14 @@ contains class(psb_d_multivect_cuda), intent(inout) :: x integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: nd, nc + logical, intent(in), optional :: scratch + info = 0 x%m_nrows = m x%m_ncols = n if (x%is_host()) then - call x%psb_d_base_multivect_type%asb(m,n,info) + call x%psb_d_base_multivect_type%asb(m,n,info,scratch) if (info == psb_success_) call x%sync_space(info) else if (x%is_dev()) then nd = getMultiVecDevicePitch(x%deviceVect) @@ -2088,11 +2092,11 @@ contains call x%set_sync() end subroutine d_cuda_multi_vect_finalize - subroutine d_cuda_multi_ins(n,irl,val,dupl,x,info) + subroutine d_cuda_multi_ins(n,irl,val,dupl,x,maxr,info) use psi_serial_mod implicit none class(psb_d_multivect_cuda), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n, dupl + integer(psb_ipk_), intent(in) :: n, dupl,maxr integer(psb_ipk_), intent(in) :: irl(:) real(psb_dpk_), intent(in) :: val(:,:) integer(psb_ipk_), intent(out) :: info @@ -2101,7 +2105,7 @@ contains info = 0 if (x%is_dev()) call x%sync() - call x%psb_d_base_multivect_type%ins(n,irl,val,dupl,info) + call x%psb_d_base_multivect_type%ins(n,irl,val,dupl,maxr,info) call x%set_host() end subroutine d_cuda_multi_ins diff --git a/cuda/psb_i_cuda_vect_mod.F90 b/cuda/psb_i_cuda_vect_mod.F90 index ae63d3a9..7020d0a5 100644 --- a/cuda/psb_i_cuda_vect_mod.F90 +++ b/cuda/psb_i_cuda_vect_mod.F90 @@ -1097,12 +1097,14 @@ contains end subroutine i_cuda_multi_bld_x - subroutine i_cuda_multi_bld_n(x,m,n) + subroutine i_cuda_multi_bld_n(x,m,n,scratch) integer(psb_ipk_), intent(in) :: m,n class(psb_i_multivect_cuda), intent(inout) :: x integer(psb_ipk_) :: info + logical, intent(in), optional :: scratch call x%all(m,n,info) + call x%asb(m,n,info,scratch=scratch) if (info /= 0) then call psb_errpush(info,'i_cuda_multi_bld_n',i_err=(/m,n,n,n,n/)) end if @@ -1498,7 +1500,7 @@ contains call x%set_host() end subroutine i_cuda_multi_zero - subroutine i_cuda_multi_asb(m,n, x, info) + subroutine i_cuda_multi_asb(m,n, x, info, scratch) use psi_serial_mod use psb_realloc_mod implicit none @@ -1506,12 +1508,14 @@ contains class(psb_i_multivect_cuda), intent(inout) :: x integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: nd, nc + logical, intent(in), optional :: scratch + info = 0 x%m_nrows = m x%m_ncols = n if (x%is_host()) then - call x%psb_i_base_multivect_type%asb(m,n,info) + call x%psb_i_base_multivect_type%asb(m,n,info,scratch) if (info == psb_success_) call x%sync_space(info) else if (x%is_dev()) then nd = getMultiVecDevicePitch(x%deviceVect) @@ -1648,11 +1652,11 @@ contains call x%set_sync() end subroutine i_cuda_multi_vect_finalize - subroutine i_cuda_multi_ins(n,irl,val,dupl,x,info) + subroutine i_cuda_multi_ins(n,irl,val,dupl,x,maxr,info) use psi_serial_mod implicit none class(psb_i_multivect_cuda), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n, dupl + integer(psb_ipk_), intent(in) :: n, dupl,maxr integer(psb_ipk_), intent(in) :: irl(:) integer(psb_ipk_), intent(in) :: val(:,:) integer(psb_ipk_), intent(out) :: info @@ -1661,7 +1665,7 @@ contains info = 0 if (x%is_dev()) call x%sync() - call x%psb_i_base_multivect_type%ins(n,irl,val,dupl,info) + call x%psb_i_base_multivect_type%ins(n,irl,val,dupl,maxr,info) call x%set_host() end subroutine i_cuda_multi_ins diff --git a/cuda/psb_s_cuda_vect_mod.F90 b/cuda/psb_s_cuda_vect_mod.F90 index ac83caf8..973ac78c 100644 --- a/cuda/psb_s_cuda_vect_mod.F90 +++ b/cuda/psb_s_cuda_vect_mod.F90 @@ -1537,12 +1537,14 @@ contains end subroutine s_cuda_multi_bld_x - subroutine s_cuda_multi_bld_n(x,m,n) + subroutine s_cuda_multi_bld_n(x,m,n,scratch) integer(psb_ipk_), intent(in) :: m,n class(psb_s_multivect_cuda), intent(inout) :: x integer(psb_ipk_) :: info + logical, intent(in), optional :: scratch call x%all(m,n,info) + call x%asb(m,n,info,scratch=scratch) if (info /= 0) then call psb_errpush(info,'s_cuda_multi_bld_n',i_err=(/m,n,n,n,n/)) end if @@ -1938,7 +1940,7 @@ contains call x%set_host() end subroutine s_cuda_multi_zero - subroutine s_cuda_multi_asb(m,n, x, info) + subroutine s_cuda_multi_asb(m,n, x, info, scratch) use psi_serial_mod use psb_realloc_mod implicit none @@ -1946,12 +1948,14 @@ contains class(psb_s_multivect_cuda), intent(inout) :: x integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: nd, nc + logical, intent(in), optional :: scratch + info = 0 x%m_nrows = m x%m_ncols = n if (x%is_host()) then - call x%psb_s_base_multivect_type%asb(m,n,info) + call x%psb_s_base_multivect_type%asb(m,n,info,scratch) if (info == psb_success_) call x%sync_space(info) else if (x%is_dev()) then nd = getMultiVecDevicePitch(x%deviceVect) @@ -2088,11 +2092,11 @@ contains call x%set_sync() end subroutine s_cuda_multi_vect_finalize - subroutine s_cuda_multi_ins(n,irl,val,dupl,x,info) + subroutine s_cuda_multi_ins(n,irl,val,dupl,x,maxr,info) use psi_serial_mod implicit none class(psb_s_multivect_cuda), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n, dupl + integer(psb_ipk_), intent(in) :: n, dupl,maxr integer(psb_ipk_), intent(in) :: irl(:) real(psb_spk_), intent(in) :: val(:,:) integer(psb_ipk_), intent(out) :: info @@ -2101,7 +2105,7 @@ contains info = 0 if (x%is_dev()) call x%sync() - call x%psb_s_base_multivect_type%ins(n,irl,val,dupl,info) + call x%psb_s_base_multivect_type%ins(n,irl,val,dupl,maxr,info) call x%set_host() end subroutine s_cuda_multi_ins diff --git a/cuda/psb_z_cuda_vect_mod.F90 b/cuda/psb_z_cuda_vect_mod.F90 index 3a3ccf8a..88c74936 100644 --- a/cuda/psb_z_cuda_vect_mod.F90 +++ b/cuda/psb_z_cuda_vect_mod.F90 @@ -1537,12 +1537,14 @@ contains end subroutine z_cuda_multi_bld_x - subroutine z_cuda_multi_bld_n(x,m,n) + subroutine z_cuda_multi_bld_n(x,m,n,scratch) integer(psb_ipk_), intent(in) :: m,n class(psb_z_multivect_cuda), intent(inout) :: x integer(psb_ipk_) :: info + logical, intent(in), optional :: scratch call x%all(m,n,info) + call x%asb(m,n,info,scratch=scratch) if (info /= 0) then call psb_errpush(info,'z_cuda_multi_bld_n',i_err=(/m,n,n,n,n/)) end if @@ -1938,7 +1940,7 @@ contains call x%set_host() end subroutine z_cuda_multi_zero - subroutine z_cuda_multi_asb(m,n, x, info) + subroutine z_cuda_multi_asb(m,n, x, info, scratch) use psi_serial_mod use psb_realloc_mod implicit none @@ -1946,12 +1948,14 @@ contains class(psb_z_multivect_cuda), intent(inout) :: x integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: nd, nc + logical, intent(in), optional :: scratch + info = 0 x%m_nrows = m x%m_ncols = n if (x%is_host()) then - call x%psb_z_base_multivect_type%asb(m,n,info) + call x%psb_z_base_multivect_type%asb(m,n,info,scratch) if (info == psb_success_) call x%sync_space(info) else if (x%is_dev()) then nd = getMultiVecDevicePitch(x%deviceVect) @@ -2088,11 +2092,11 @@ contains call x%set_sync() end subroutine z_cuda_multi_vect_finalize - subroutine z_cuda_multi_ins(n,irl,val,dupl,x,info) + subroutine z_cuda_multi_ins(n,irl,val,dupl,x,maxr,info) use psi_serial_mod implicit none class(psb_z_multivect_cuda), intent(inout) :: x - integer(psb_ipk_), intent(in) :: n, dupl + integer(psb_ipk_), intent(in) :: n, dupl,maxr integer(psb_ipk_), intent(in) :: irl(:) complex(psb_dpk_), intent(in) :: val(:,:) integer(psb_ipk_), intent(out) :: info @@ -2101,7 +2105,7 @@ contains info = 0 if (x%is_dev()) call x%sync() - call x%psb_z_base_multivect_type%ins(n,irl,val,dupl,info) + call x%psb_z_base_multivect_type%ins(n,irl,val,dupl,maxr,info) call x%set_host() end subroutine z_cuda_multi_ins