diff --git a/base/comm/psb_cspgather.F90 b/base/comm/psb_cspgather.F90 index 817eebf1..b9401061 100644 --- a/base/comm/psb_cspgather.F90 +++ b/base/comm/psb_cspgather.F90 @@ -219,6 +219,7 @@ subroutine psb_lcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -250,10 +251,9 @@ subroutine psb_lcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -270,13 +270,15 @@ subroutine psb_lcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if @@ -367,6 +369,7 @@ subroutine psb_lclcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -398,10 +401,9 @@ subroutine psb_lclcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -418,13 +420,15 @@ subroutine psb_lclcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if diff --git a/base/comm/psb_dspgather.F90 b/base/comm/psb_dspgather.F90 index f2ff6e98..d5593504 100644 --- a/base/comm/psb_dspgather.F90 +++ b/base/comm/psb_dspgather.F90 @@ -219,6 +219,7 @@ subroutine psb_ldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -250,10 +251,9 @@ subroutine psb_ldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -270,13 +270,15 @@ subroutine psb_ldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if @@ -399,10 +401,9 @@ subroutine psb_ldldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if diff --git a/base/comm/psb_ispgather.F90 b/base/comm/psb_ispgather.F90 index 54481b1a..a19d24d9 100644 --- a/base/comm/psb_ispgather.F90 +++ b/base/comm/psb_ispgather.F90 @@ -219,6 +219,7 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -250,10 +251,9 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -270,13 +270,15 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if @@ -367,6 +369,7 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -398,10 +401,9 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -418,13 +420,15 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if diff --git a/base/comm/psb_lspgather.F90 b/base/comm/psb_lspgather.F90 index a66c9abe..81c9c67c 100644 --- a/base/comm/psb_lspgather.F90 +++ b/base/comm/psb_lspgather.F90 @@ -219,6 +219,7 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -250,10 +251,9 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -270,13 +270,15 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if @@ -367,6 +369,7 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -398,10 +401,9 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -418,13 +420,15 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if diff --git a/base/comm/psb_sspgather.F90 b/base/comm/psb_sspgather.F90 index 3b8d30cf..27444ecd 100644 --- a/base/comm/psb_sspgather.F90 +++ b/base/comm/psb_sspgather.F90 @@ -219,6 +219,7 @@ subroutine psb_lssp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -250,10 +251,9 @@ subroutine psb_lssp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -270,13 +270,15 @@ subroutine psb_lssp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if @@ -367,6 +369,7 @@ subroutine psb_lslssp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -398,10 +401,9 @@ subroutine psb_lslssp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -418,13 +420,15 @@ subroutine psb_lslssp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if diff --git a/base/comm/psb_zspgather.F90 b/base/comm/psb_zspgather.F90 index 75d5e4b5..fbcae1f3 100644 --- a/base/comm/psb_zspgather.F90 +++ b/base/comm/psb_zspgather.F90 @@ -219,6 +219,7 @@ subroutine psb_lzsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -250,10 +251,9 @@ subroutine psb_lzsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -270,13 +270,15 @@ subroutine psb_lzsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if @@ -367,6 +369,7 @@ subroutine psb_lzlzsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k integer(psb_mpk_) :: ictxt,np,me integer(psb_mpk_) :: icomm, minfo, ndx integer(psb_mpk_), allocatable :: nzbr(:), idisp(:) + integer(psb_lpk_), allocatable :: lnzbr(:) integer(psb_ipk_) :: ierr(5) character(len=20) :: name integer(psb_ipk_) :: debug_level, debug_unit @@ -398,10 +401,9 @@ subroutine psb_lzlzsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nrg = desc_a%get_global_rows() ncg = desc_a%get_global_rows() - allocate(nzbr(np), idisp(np),stat=info) + allocate(nzbr(np), idisp(np),lnzbr(np),stat=info) if (info /= psb_success_) then - info=psb_err_alloc_request_ - ierr(1) = 2*np + info=psb_err_alloc_request_; ierr(1) = 3*np call psb_errpush(info,name,i_err=ierr,a_err='integer') goto 9999 end if @@ -418,13 +420,15 @@ subroutine psb_lzlzsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k nzbr(:) = 0 nzbr(me+1) = nzl call psb_sum(ictxt,nzbr(1:np)) + lnzbr = nzbr nzg = sum(nzbr) - if (nzg <0) then + if ((nzg < 0).or.(nzg /= sum(lnzbr))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if #if defined(HAVE_ISO_FORTRAN_ENV) - if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))) then + if ((nrg > HUGE(1_psb_mpk_)).or.(nzg > HUGE(1_psb_mpk_))& + & .or.(sum(lnzbr) > HUGE(1_psb_mpk_))) then info = psb_err_mpi_int_ovflw_ call psb_errpush(info,name); goto 9999 end if