mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-19 04:12:09 +00:00
added entrywise vector product psb_gemlt
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
!
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
@@ -15,7 +15,7 @@
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
@@ -27,8 +27,8 @@
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
!
|
||||
!
|
||||
module psb_c_psblas_mod
|
||||
use psb_desc_mod, only : psb_desc_type, psb_spk_, psb_ipk_
|
||||
use psb_c_vect_mod, only : psb_c_vect_type
|
||||
@@ -44,7 +44,7 @@ module psb_c_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_cdot_vect
|
||||
function psb_cdotv(x, y, desc_a,info,global)
|
||||
function psb_cdotv(x, y, desc_a,info,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
complex(psb_spk_) :: psb_cdotv
|
||||
@@ -53,7 +53,7 @@ module psb_c_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_cdotv
|
||||
function psb_cdot(x, y, desc_a, info, jx, jy,global)
|
||||
function psb_cdot(x, y, desc_a, info, jx, jy,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
complex(psb_spk_) :: psb_cdot
|
||||
@@ -69,7 +69,7 @@ module psb_c_psblas_mod
|
||||
interface psb_gedots
|
||||
subroutine psb_cdotvs(res,x, y, desc_a, info,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
complex(psb_spk_), intent(out) :: res
|
||||
complex(psb_spk_), intent(in) :: x(:), y(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
@@ -78,7 +78,7 @@ module psb_c_psblas_mod
|
||||
end subroutine psb_cdotvs
|
||||
subroutine psb_cmdots(res,x, y, desc_a,info,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
complex(psb_spk_), intent(out) :: res(:)
|
||||
complex(psb_spk_), intent(in) :: x(:,:), y(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
@@ -155,10 +155,10 @@ module psb_c_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_genrmi
|
||||
procedure psb_camax, psb_camaxv, psb_camax_vect
|
||||
end interface
|
||||
end interface
|
||||
interface psb_normi
|
||||
procedure psb_camax, psb_camaxv, psb_camax_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_geamaxs
|
||||
@@ -238,10 +238,10 @@ module psb_c_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_genrm1
|
||||
procedure psb_casum, psb_casumv, psb_casum_vect
|
||||
end interface
|
||||
end interface
|
||||
interface psb_norm1
|
||||
procedure psb_casum, psb_casumv, psb_casum_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_genrm2
|
||||
@@ -278,7 +278,7 @@ module psb_c_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_norm2
|
||||
procedure psb_cnrm2, psb_cnrm2v, psb_cnrm2_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_genrm2s
|
||||
@@ -309,7 +309,7 @@ module psb_c_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_normi
|
||||
procedure psb_cnrmi
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_spnrm1
|
||||
@@ -323,11 +323,11 @@ module psb_c_psblas_mod
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_cspnrm1
|
||||
end interface
|
||||
|
||||
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_norm1
|
||||
procedure psb_cspnrm1
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_spmm
|
||||
@@ -378,7 +378,7 @@ module psb_c_psblas_mod
|
||||
|
||||
interface psb_spsm
|
||||
subroutine psb_cspsm(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, n, jx, jy, work)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
@@ -395,7 +395,7 @@ module psb_c_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_cspsm
|
||||
subroutine psb_cspsv(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, work)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
@@ -411,7 +411,7 @@ module psb_c_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_cspsv
|
||||
subroutine psb_cspsv_vect(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, work)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
@@ -428,4 +428,15 @@ module psb_c_psblas_mod
|
||||
end subroutine psb_cspsv_vect
|
||||
end interface
|
||||
|
||||
interface psb_gemlt
|
||||
subroutine psb_cmlt_vect(x,y,desc_a,info)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_c_vect_type
|
||||
type(psb_c_vect_type), intent (inout) :: x
|
||||
type(psb_c_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_cmlt_vect
|
||||
end interface
|
||||
|
||||
end module psb_c_psblas_mod
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
!
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
@@ -15,7 +15,7 @@
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
@@ -27,8 +27,8 @@
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
!
|
||||
!
|
||||
module psb_d_psblas_mod
|
||||
use psb_desc_mod, only : psb_desc_type, psb_dpk_, psb_ipk_
|
||||
use psb_d_vect_mod, only : psb_d_vect_type
|
||||
@@ -44,7 +44,7 @@ module psb_d_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_ddot_vect
|
||||
function psb_ddotv(x, y, desc_a,info,global)
|
||||
function psb_ddotv(x, y, desc_a,info,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
real(psb_dpk_) :: psb_ddotv
|
||||
@@ -53,7 +53,7 @@ module psb_d_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_ddotv
|
||||
function psb_ddot(x, y, desc_a, info, jx, jy,global)
|
||||
function psb_ddot(x, y, desc_a, info, jx, jy,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
real(psb_dpk_) :: psb_ddot
|
||||
@@ -69,7 +69,7 @@ module psb_d_psblas_mod
|
||||
interface psb_gedots
|
||||
subroutine psb_ddotvs(res,x, y, desc_a, info,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
real(psb_dpk_), intent(out) :: res
|
||||
real(psb_dpk_), intent(in) :: x(:), y(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
@@ -78,7 +78,7 @@ module psb_d_psblas_mod
|
||||
end subroutine psb_ddotvs
|
||||
subroutine psb_dmdots(res,x, y, desc_a,info,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
real(psb_dpk_), intent(out) :: res(:)
|
||||
real(psb_dpk_), intent(in) :: x(:,:), y(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
@@ -155,10 +155,10 @@ module psb_d_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_genrmi
|
||||
procedure psb_damax, psb_damaxv, psb_damax_vect
|
||||
end interface
|
||||
end interface
|
||||
interface psb_normi
|
||||
procedure psb_damax, psb_damaxv, psb_damax_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_geamaxs
|
||||
@@ -238,10 +238,10 @@ module psb_d_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_genrm1
|
||||
procedure psb_dasum, psb_dasumv, psb_dasum_vect
|
||||
end interface
|
||||
end interface
|
||||
interface psb_norm1
|
||||
procedure psb_dasum, psb_dasumv, psb_dasum_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_genrm2
|
||||
@@ -278,7 +278,7 @@ module psb_d_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_norm2
|
||||
procedure psb_dnrm2, psb_dnrm2v, psb_dnrm2_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_genrm2s
|
||||
@@ -309,7 +309,7 @@ module psb_d_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_normi
|
||||
procedure psb_dnrmi
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_spnrm1
|
||||
@@ -323,11 +323,11 @@ module psb_d_psblas_mod
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_dspnrm1
|
||||
end interface
|
||||
|
||||
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_norm1
|
||||
procedure psb_dspnrm1
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_spmm
|
||||
@@ -378,7 +378,7 @@ module psb_d_psblas_mod
|
||||
|
||||
interface psb_spsm
|
||||
subroutine psb_dspsm(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, n, jx, jy, work)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
@@ -395,7 +395,7 @@ module psb_d_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_dspsm
|
||||
subroutine psb_dspsv(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, work)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
@@ -411,7 +411,7 @@ module psb_d_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_dspsv
|
||||
subroutine psb_dspsv_vect(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, work)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
@@ -428,4 +428,15 @@ module psb_d_psblas_mod
|
||||
end subroutine psb_dspsv_vect
|
||||
end interface
|
||||
|
||||
interface psb_gemlt
|
||||
subroutine psb_dmlt_vect(x,y,desc_a,info)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_d_vect_type
|
||||
type(psb_d_vect_type), intent (inout) :: x
|
||||
type(psb_d_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_dmlt_vect
|
||||
end interface
|
||||
|
||||
end module psb_d_psblas_mod
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
!
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
@@ -15,7 +15,7 @@
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
@@ -27,8 +27,8 @@
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
!
|
||||
!
|
||||
module psb_s_psblas_mod
|
||||
use psb_desc_mod, only : psb_desc_type, psb_spk_, psb_ipk_
|
||||
use psb_s_vect_mod, only : psb_s_vect_type
|
||||
@@ -44,7 +44,7 @@ module psb_s_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_sdot_vect
|
||||
function psb_sdotv(x, y, desc_a,info,global)
|
||||
function psb_sdotv(x, y, desc_a,info,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
real(psb_spk_) :: psb_sdotv
|
||||
@@ -53,7 +53,7 @@ module psb_s_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_sdotv
|
||||
function psb_sdot(x, y, desc_a, info, jx, jy,global)
|
||||
function psb_sdot(x, y, desc_a, info, jx, jy,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
real(psb_spk_) :: psb_sdot
|
||||
@@ -69,7 +69,7 @@ module psb_s_psblas_mod
|
||||
interface psb_gedots
|
||||
subroutine psb_sdotvs(res,x, y, desc_a, info,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
real(psb_spk_), intent(out) :: res
|
||||
real(psb_spk_), intent(in) :: x(:), y(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
@@ -78,7 +78,7 @@ module psb_s_psblas_mod
|
||||
end subroutine psb_sdotvs
|
||||
subroutine psb_smdots(res,x, y, desc_a,info,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
real(psb_spk_), intent(out) :: res(:)
|
||||
real(psb_spk_), intent(in) :: x(:,:), y(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
@@ -155,10 +155,10 @@ module psb_s_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_genrmi
|
||||
procedure psb_samax, psb_samaxv, psb_samax_vect
|
||||
end interface
|
||||
end interface
|
||||
interface psb_normi
|
||||
procedure psb_samax, psb_samaxv, psb_samax_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_geamaxs
|
||||
@@ -238,10 +238,10 @@ module psb_s_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_genrm1
|
||||
procedure psb_sasum, psb_sasumv, psb_sasum_vect
|
||||
end interface
|
||||
end interface
|
||||
interface psb_norm1
|
||||
procedure psb_sasum, psb_sasumv, psb_sasum_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_genrm2
|
||||
@@ -278,7 +278,7 @@ module psb_s_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_norm2
|
||||
procedure psb_snrm2, psb_snrm2v, psb_snrm2_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_genrm2s
|
||||
@@ -309,7 +309,7 @@ module psb_s_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_normi
|
||||
procedure psb_snrmi
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_spnrm1
|
||||
@@ -323,11 +323,11 @@ module psb_s_psblas_mod
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_sspnrm1
|
||||
end interface
|
||||
|
||||
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_norm1
|
||||
procedure psb_sspnrm1
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_spmm
|
||||
@@ -378,7 +378,7 @@ module psb_s_psblas_mod
|
||||
|
||||
interface psb_spsm
|
||||
subroutine psb_sspsm(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, n, jx, jy, work)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
@@ -395,7 +395,7 @@ module psb_s_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_sspsm
|
||||
subroutine psb_sspsv(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, work)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
@@ -411,7 +411,7 @@ module psb_s_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_sspsv
|
||||
subroutine psb_sspsv_vect(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, work)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
@@ -428,4 +428,15 @@ module psb_s_psblas_mod
|
||||
end subroutine psb_sspsv_vect
|
||||
end interface
|
||||
|
||||
interface psb_gemlt
|
||||
subroutine psb_smlt_vect(x,y,desc_a,info)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_s_vect_type
|
||||
type(psb_s_vect_type), intent (inout) :: x
|
||||
type(psb_s_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_smlt_vect
|
||||
end interface
|
||||
|
||||
end module psb_s_psblas_mod
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
!
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
@@ -15,7 +15,7 @@
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
@@ -27,8 +27,8 @@
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
!
|
||||
!
|
||||
module psb_z_psblas_mod
|
||||
use psb_desc_mod, only : psb_desc_type, psb_dpk_, psb_ipk_
|
||||
use psb_z_vect_mod, only : psb_z_vect_type
|
||||
@@ -44,7 +44,7 @@ module psb_z_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_zdot_vect
|
||||
function psb_zdotv(x, y, desc_a,info,global)
|
||||
function psb_zdotv(x, y, desc_a,info,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
complex(psb_dpk_) :: psb_zdotv
|
||||
@@ -53,7 +53,7 @@ module psb_z_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_zdotv
|
||||
function psb_zdot(x, y, desc_a, info, jx, jy,global)
|
||||
function psb_zdot(x, y, desc_a, info, jx, jy,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
complex(psb_dpk_) :: psb_zdot
|
||||
@@ -69,7 +69,7 @@ module psb_z_psblas_mod
|
||||
interface psb_gedots
|
||||
subroutine psb_zdotvs(res,x, y, desc_a, info,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
complex(psb_dpk_), intent(out) :: res
|
||||
complex(psb_dpk_), intent(in) :: x(:), y(:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
@@ -78,7 +78,7 @@ module psb_z_psblas_mod
|
||||
end subroutine psb_zdotvs
|
||||
subroutine psb_zmdots(res,x, y, desc_a,info,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
complex(psb_dpk_), intent(out) :: res(:)
|
||||
complex(psb_dpk_), intent(in) :: x(:,:), y(:,:)
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
@@ -155,10 +155,10 @@ module psb_z_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_genrmi
|
||||
procedure psb_zamax, psb_zamaxv, psb_zamax_vect
|
||||
end interface
|
||||
end interface
|
||||
interface psb_normi
|
||||
procedure psb_zamax, psb_zamaxv, psb_zamax_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_geamaxs
|
||||
@@ -238,10 +238,10 @@ module psb_z_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_genrm1
|
||||
procedure psb_zasum, psb_zasumv, psb_zasum_vect
|
||||
end interface
|
||||
end interface
|
||||
interface psb_norm1
|
||||
procedure psb_zasum, psb_zasumv, psb_zasum_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_genrm2
|
||||
@@ -278,7 +278,7 @@ module psb_z_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_norm2
|
||||
procedure psb_znrm2, psb_znrm2v, psb_znrm2_vect
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_genrm2s
|
||||
@@ -309,7 +309,7 @@ module psb_z_psblas_mod
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_normi
|
||||
procedure psb_znrmi
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_spnrm1
|
||||
@@ -323,11 +323,11 @@ module psb_z_psblas_mod
|
||||
logical, intent(in), optional :: global
|
||||
end function psb_zspnrm1
|
||||
end interface
|
||||
|
||||
|
||||
#if ! defined(HAVE_BUGGY_GENERICS)
|
||||
interface psb_norm1
|
||||
procedure psb_zspnrm1
|
||||
end interface
|
||||
end interface
|
||||
#endif
|
||||
|
||||
interface psb_spmm
|
||||
@@ -378,7 +378,7 @@ module psb_z_psblas_mod
|
||||
|
||||
interface psb_spsm
|
||||
subroutine psb_zspsm(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, n, jx, jy, work)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
@@ -395,7 +395,7 @@ module psb_z_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_zspsm
|
||||
subroutine psb_zspsv(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, work)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
@@ -411,7 +411,7 @@ module psb_z_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_zspsv
|
||||
subroutine psb_zspsv_vect(alpha, t, x, beta, y,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& desc_a, info, trans, scale, choice,&
|
||||
& diag, work)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
@@ -428,4 +428,15 @@ module psb_z_psblas_mod
|
||||
end subroutine psb_zspsv_vect
|
||||
end interface
|
||||
|
||||
interface psb_gemlt
|
||||
subroutine psb_zmlt_vect(x,y,desc_a,info)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_z_vect_type
|
||||
type(psb_z_vect_type), intent (inout) :: x
|
||||
type(psb_z_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_zmlt_vect
|
||||
end interface
|
||||
|
||||
end module psb_z_psblas_mod
|
||||
|
||||
@@ -9,7 +9,8 @@ OBJS= psb_ddot.o psb_damax.o psb_dasum.o psb_daxpby.o\
|
||||
psb_saxpby.o psb_sdot.o psb_sasum.o psb_samax.o\
|
||||
psb_snrm2.o psb_snrmi.o psb_sspmm.o psb_sspsm.o\
|
||||
psb_camax.o psb_casum.o psb_caxpby.o psb_cdot.o \
|
||||
psb_cnrm2.o psb_cnrmi.o psb_cspmm.o psb_cspsm.o
|
||||
psb_cnrm2.o psb_cnrmi.o psb_cspmm.o psb_cspsm.o \
|
||||
psb_cmlt_vect.o psb_dmlt_vect.o psb_zmlt_vect.o psb_smlt_vect.o
|
||||
|
||||
|
||||
LIBDIR=..
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: psb_cmlt_vect
|
||||
|
||||
subroutine psb_cmlt_vect(x,y,desc_a,info)
|
||||
use psb_base_mod, psb_protect_name => psb_cmlt_vect
|
||||
implicit none
|
||||
type(psb_c_vect_type), intent (inout) :: x
|
||||
type(psb_c_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! locals
|
||||
integer(psb_ipk_) :: ictxt, np, me,&
|
||||
& err_act, iix, jjx, iiy, jjy
|
||||
integer(psb_lpk_) :: ix, ijx, iy, ijy, m
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
name='psb_c_mlt_vect'
|
||||
if (psb_errstatus_fatal()) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt=desc_a%get_context()
|
||||
|
||||
call psb_info(ictxt, me, np)
|
||||
if (np == -ione) then
|
||||
info = psb_err_context_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(x%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(y%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = ione
|
||||
iy = ione
|
||||
|
||||
m = desc_a%get_global_rows()
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,lone,x%get_nrows(),ix,lone,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 1'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_chkvect(m,lone,y%get_nrows(),iy,lone,desc_a,info,iiy,jjy)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 2'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%mlt(x,info)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(ictxt,err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_cmlt_vect
|
||||
@@ -0,0 +1,111 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: psb_cvmlt.f90
|
||||
|
||||
subroutine psb_cvmlt(x,y,desc_a,info)
|
||||
use psb_base_mod, psb_protect_name => psb_cvmlt
|
||||
implicit none
|
||||
type(psb_c_vect_type), intent (inout) :: x
|
||||
type(psb_c_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! locals
|
||||
integer(psb_ipk_) :: ictxt, np, me,&
|
||||
& err_act, iix, jjx, iiy, jjy
|
||||
integer(psb_lpk_) :: ix, ijx, iy, ijy, m
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
name='psb_cgevmlt'
|
||||
if (psb_errstatus_fatal()) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt=desc_a%get_context()
|
||||
|
||||
call psb_info(ictxt, me, np)
|
||||
if (np == -ione) then
|
||||
info = psb_err_context_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(x%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(y%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = ione
|
||||
iy = ione
|
||||
|
||||
m = desc_a%get_global_rows()
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,lone,x%get_nrows(),ix,lone,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 1'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_chkvect(m,lone,y%get_nrows(),iy,lone,desc_a,info,iiy,jjy)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 2'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if ((iix /= ione).or.(iiy /= ione)) then
|
||||
info=psb_err_ix_n1_iy_n1_unsupported_
|
||||
call psb_errpush(info,name)
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%base_mlt_v(desc_a%get_local_rows(),&
|
||||
& alpha,x,beta,info)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(ictxt,err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_cvmlt
|
||||
@@ -0,0 +1,105 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: psb_dmlt_vect
|
||||
|
||||
subroutine psb_dmlt_vect(x,y,desc_a,info)
|
||||
use psb_base_mod, psb_protect_name => psb_dmlt_vect
|
||||
implicit none
|
||||
type(psb_d_vect_type), intent (inout) :: x
|
||||
type(psb_d_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! locals
|
||||
integer(psb_ipk_) :: ictxt, np, me,&
|
||||
& err_act, iix, jjx, iiy, jjy
|
||||
integer(psb_lpk_) :: ix, ijx, iy, ijy, m
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
name='psb_d_mlt_vect'
|
||||
if (psb_errstatus_fatal()) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt=desc_a%get_context()
|
||||
|
||||
call psb_info(ictxt, me, np)
|
||||
if (np == -ione) then
|
||||
info = psb_err_context_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(x%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(y%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = ione
|
||||
iy = ione
|
||||
|
||||
m = desc_a%get_global_rows()
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,lone,x%get_nrows(),ix,lone,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 1'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_chkvect(m,lone,y%get_nrows(),iy,lone,desc_a,info,iiy,jjy)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 2'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%mlt(x,info)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(ictxt,err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_dmlt_vect
|
||||
@@ -0,0 +1,111 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: psb_dvmlt.f90
|
||||
|
||||
subroutine psb_dvmlt(x,y,desc_a,info)
|
||||
use psb_base_mod, psb_protect_name => psb_dvmlt
|
||||
implicit none
|
||||
type(psb_d_vect_type), intent (inout) :: x
|
||||
type(psb_d_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! locals
|
||||
integer(psb_ipk_) :: ictxt, np, me,&
|
||||
& err_act, iix, jjx, iiy, jjy
|
||||
integer(psb_lpk_) :: ix, ijx, iy, ijy, m
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
name='psb_dgevmlt'
|
||||
if (psb_errstatus_fatal()) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt=desc_a%get_context()
|
||||
|
||||
call psb_info(ictxt, me, np)
|
||||
if (np == -ione) then
|
||||
info = psb_err_context_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(x%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(y%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = ione
|
||||
iy = ione
|
||||
|
||||
m = desc_a%get_global_rows()
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,lone,x%get_nrows(),ix,lone,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 1'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_chkvect(m,lone,y%get_nrows(),iy,lone,desc_a,info,iiy,jjy)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 2'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if ((iix /= ione).or.(iiy /= ione)) then
|
||||
info=psb_err_ix_n1_iy_n1_unsupported_
|
||||
call psb_errpush(info,name)
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%base_mlt_v(desc_a%get_local_rows(),&
|
||||
& alpha,x,beta,info)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(ictxt,err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_dvmlt
|
||||
@@ -0,0 +1,105 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: psb_smlt_vect
|
||||
|
||||
subroutine psb_smlt_vect(x,y,desc_a,info)
|
||||
use psb_base_mod, psb_protect_name => psb_smlt_vect
|
||||
implicit none
|
||||
type(psb_s_vect_type), intent (inout) :: x
|
||||
type(psb_s_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! locals
|
||||
integer(psb_ipk_) :: ictxt, np, me,&
|
||||
& err_act, iix, jjx, iiy, jjy
|
||||
integer(psb_lpk_) :: ix, ijx, iy, ijy, m
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
name='psb_s_mlt_vect'
|
||||
if (psb_errstatus_fatal()) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt=desc_a%get_context()
|
||||
|
||||
call psb_info(ictxt, me, np)
|
||||
if (np == -ione) then
|
||||
info = psb_err_context_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(x%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(y%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = ione
|
||||
iy = ione
|
||||
|
||||
m = desc_a%get_global_rows()
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,lone,x%get_nrows(),ix,lone,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 1'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_chkvect(m,lone,y%get_nrows(),iy,lone,desc_a,info,iiy,jjy)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 2'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%mlt(x,info)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(ictxt,err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_smlt_vect
|
||||
@@ -0,0 +1,111 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: psb_svmlt.f90
|
||||
|
||||
subroutine psb_svmlt(x,y,desc_a,info)
|
||||
use psb_base_mod, psb_protect_name => psb_svmlt
|
||||
implicit none
|
||||
type(psb_s_vect_type), intent (inout) :: x
|
||||
type(psb_s_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! locals
|
||||
integer(psb_ipk_) :: ictxt, np, me,&
|
||||
& err_act, iix, jjx, iiy, jjy
|
||||
integer(psb_lpk_) :: ix, ijx, iy, ijy, m
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
name='psb_sgevmlt'
|
||||
if (psb_errstatus_fatal()) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt=desc_a%get_context()
|
||||
|
||||
call psb_info(ictxt, me, np)
|
||||
if (np == -ione) then
|
||||
info = psb_err_context_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(x%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(y%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = ione
|
||||
iy = ione
|
||||
|
||||
m = desc_a%get_global_rows()
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,lone,x%get_nrows(),ix,lone,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 1'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_chkvect(m,lone,y%get_nrows(),iy,lone,desc_a,info,iiy,jjy)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 2'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if ((iix /= ione).or.(iiy /= ione)) then
|
||||
info=psb_err_ix_n1_iy_n1_unsupported_
|
||||
call psb_errpush(info,name)
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%base_mlt_v(desc_a%get_local_rows(),&
|
||||
& alpha,x,beta,info)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(ictxt,err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_svmlt
|
||||
@@ -0,0 +1,105 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: psb_zmlt_vect
|
||||
|
||||
subroutine psb_zmlt_vect(x,y,desc_a,info)
|
||||
use psb_base_mod, psb_protect_name => psb_zmlt_vect
|
||||
implicit none
|
||||
type(psb_z_vect_type), intent (inout) :: x
|
||||
type(psb_z_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! locals
|
||||
integer(psb_ipk_) :: ictxt, np, me,&
|
||||
& err_act, iix, jjx, iiy, jjy
|
||||
integer(psb_lpk_) :: ix, ijx, iy, ijy, m
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
name='psb_z_mlt_vect'
|
||||
if (psb_errstatus_fatal()) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt=desc_a%get_context()
|
||||
|
||||
call psb_info(ictxt, me, np)
|
||||
if (np == -ione) then
|
||||
info = psb_err_context_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(x%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(y%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = ione
|
||||
iy = ione
|
||||
|
||||
m = desc_a%get_global_rows()
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,lone,x%get_nrows(),ix,lone,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 1'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_chkvect(m,lone,y%get_nrows(),iy,lone,desc_a,info,iiy,jjy)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 2'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%mlt(x,info)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(ictxt,err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_zmlt_vect
|
||||
@@ -0,0 +1,111 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5
|
||||
! (C) Copyright 2006-2018
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: psb_zvmlt.f90
|
||||
|
||||
subroutine psb_zvmlt(x,y,desc_a,info)
|
||||
use psb_base_mod, psb_protect_name => psb_zvmlt
|
||||
implicit none
|
||||
type(psb_z_vect_type), intent (inout) :: x
|
||||
type(psb_z_vect_type), intent (inout) :: y
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
! locals
|
||||
integer(psb_ipk_) :: ictxt, np, me,&
|
||||
& err_act, iix, jjx, iiy, jjy
|
||||
integer(psb_lpk_) :: ix, ijx, iy, ijy, m
|
||||
character(len=20) :: name, ch_err
|
||||
|
||||
name='psb_zgevmlt'
|
||||
if (psb_errstatus_fatal()) return
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt=desc_a%get_context()
|
||||
|
||||
call psb_info(ictxt, me, np)
|
||||
if (np == -ione) then
|
||||
info = psb_err_context_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(x%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
if (.not.allocated(y%v)) then
|
||||
info = psb_err_invalid_vect_state_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
ix = ione
|
||||
iy = ione
|
||||
|
||||
m = desc_a%get_global_rows()
|
||||
|
||||
! check vector correctness
|
||||
call psb_chkvect(m,lone,x%get_nrows(),ix,lone,desc_a,info,iix,jjx)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 1'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_chkvect(m,lone,y%get_nrows(),iy,lone,desc_a,info,iiy,jjy)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='psb_chkvect 2'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if ((iix /= ione).or.(iiy /= ione)) then
|
||||
info=psb_err_ix_n1_iy_n1_unsupported_
|
||||
call psb_errpush(info,name)
|
||||
end if
|
||||
|
||||
if(desc_a%get_local_rows() > 0) then
|
||||
call y%base_mlt_v(desc_a%get_local_rows(),&
|
||||
& alpha,x,beta,info)
|
||||
end if
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(ictxt,err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_zvmlt
|
||||
+15
-13
@@ -12,36 +12,38 @@ LDLIBS=$(PSBLDLIBS)
|
||||
FINCLUDES=$(FMFLAG)$(MODDIR) $(FMFLAG).
|
||||
|
||||
|
||||
DTOBJS=d_file_spmv.o
|
||||
STOBJS=s_file_spmv.o
|
||||
DTOBJS=d_file_spmv.o
|
||||
STOBJS=s_file_spmv.o
|
||||
DPGOBJS=pdgenspmv.o
|
||||
DVECOBJS=vecoperation.o
|
||||
EXEDIR=./runs
|
||||
|
||||
all: runsd d_file_spmv s_file_spmv pdgenspmv
|
||||
all: runsd d_file_spmv s_file_spmv pdgenspmv vecoperation
|
||||
|
||||
runsd:
|
||||
(if test ! -d runs ; then mkdir runs; fi)
|
||||
|
||||
d_file_spmv: $(DTOBJS)
|
||||
$(FLINK) $(LOPT) $(DTOBJS) -o d_file_spmv $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv d_file_spmv $(EXEDIR)
|
||||
$(FLINK) $(LOPT) $(DTOBJS) -o d_file_spmv $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv d_file_spmv $(EXEDIR)
|
||||
|
||||
pdgenspmv: $(DPGOBJS)
|
||||
$(FLINK) $(LOPT) $(DPGOBJS) -o pdgenspmv $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv pdgenspmv $(EXEDIR)
|
||||
$(FLINK) $(LOPT) $(DPGOBJS) -o pdgenspmv $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv pdgenspmv $(EXEDIR)
|
||||
|
||||
|
||||
s_file_spmv: $(STOBJS)
|
||||
$(FLINK) $(LOPT) $(STOBJS) -o s_file_spmv $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv s_file_spmv $(EXEDIR)
|
||||
$(FLINK) $(LOPT) $(STOBJS) -o s_file_spmv $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv s_file_spmv $(EXEDIR)
|
||||
|
||||
vecoperation: $(DVECOBJS)
|
||||
$(FLINK) $(LOPT) $(DVECOBJS) -o vecoperation $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv vecoperation $(EXEDIR)
|
||||
|
||||
|
||||
clean:
|
||||
/bin/rm -f $(DBOBJSS) $(DBOBJS) $(DTOBJS) $(STOBJS)
|
||||
clean:
|
||||
/bin/rm -f $(DBOBJSS) $(DBOBJS) $(DTOBJS) $(STOBJS) $(DVECOBJS)
|
||||
|
||||
lib:
|
||||
(cd ../../; make library)
|
||||
verycleanlib:
|
||||
(cd ../../; make veryclean)
|
||||
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
!
|
||||
! Parallel Sparse BLAS version 3.5.1
|
||||
! (C) Copyright 2015
|
||||
! Salvatore Filippone
|
||||
! Alfredo Buttari
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions
|
||||
! are met:
|
||||
! 1. Redistributions of source code must retain the above copyright
|
||||
! notice, this list of conditions and the following disclaimer.
|
||||
! 2. Redistributions in binary form must reproduce the above copyright
|
||||
! notice, this list of conditions, and the following disclaimer in the
|
||||
! documentation and/or other materials provided with the distribution.
|
||||
! 3. The name of the PSBLAS group or the names of its contributors may
|
||||
! not be used to endorse or promote products derived from this
|
||||
! software without specific written permission.
|
||||
!
|
||||
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
|
||||
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
!
|
||||
! File: vecoperation.f90
|
||||
!
|
||||
program vecoperation
|
||||
use psb_base_mod
|
||||
use psb_util_mod
|
||||
implicit none
|
||||
|
||||
! input parameters
|
||||
integer(psb_ipk_) :: idim = 100
|
||||
|
||||
! miscellaneous
|
||||
real(psb_dpk_), parameter :: one = 1.d0
|
||||
real(psb_dpk_) :: t1, t2
|
||||
|
||||
! descriptor
|
||||
type(psb_desc_type) :: desc_a
|
||||
! vector
|
||||
type(psb_d_vect_type) :: x,y
|
||||
! blacs parameters
|
||||
integer(psb_ipk_) :: ictxt, iam, np
|
||||
! other variables
|
||||
integer(psb_ipk_) :: nr, nlr, info, i, ii, ib=1
|
||||
integer(psb_lpk_) :: nt
|
||||
integer(psb_lpk_), allocatable :: myidx(:)
|
||||
real(psb_dpk_) :: zt(1), dotresult, norm2, norm1, norminf
|
||||
character(len=20) :: name,ch_err,readinput
|
||||
|
||||
info=psb_success_
|
||||
|
||||
|
||||
call psb_init(ictxt)
|
||||
call psb_info(ictxt,iam,np)
|
||||
|
||||
if (iam < 0) then
|
||||
call psb_exit(ictxt) ! This should not happen, but just in case
|
||||
stop
|
||||
endif
|
||||
if(psb_get_errstatus() /= 0) goto 9999
|
||||
name='vecoperation'
|
||||
call psb_set_errverbosity(itwo)
|
||||
!
|
||||
! Hello world
|
||||
!
|
||||
if (iam == psb_root_) then
|
||||
write(*,*) 'Welcome to PSBLAS version: ',psb_version_string_
|
||||
write(*,*) 'This is the ',trim(name),' sample program'
|
||||
end if
|
||||
|
||||
call get_command_argument(1,readinput)
|
||||
if (len_trim(readinput) /= 0) read(readinput,*)idim
|
||||
|
||||
if (iam == psb_root_) write(psb_out_unit,'(" ")')
|
||||
if (iam == psb_root_) write(psb_out_unit,'("Vector size",I10)')idim
|
||||
|
||||
!
|
||||
! Data distribution
|
||||
! We assume a simple contiguous block distribution
|
||||
!
|
||||
nt = (idim+np-1)/np
|
||||
nr = max(0,min(nt,idim-(iam*nt)))
|
||||
nt = nr
|
||||
|
||||
call psb_sum(ictxt,nt)
|
||||
if (nt /= idim) then
|
||||
write(psb_err_unit,*) iam, 'Initialization error ',nr,nt,idim
|
||||
info = -1
|
||||
call psb_barrier(ictxt)
|
||||
call psb_abort(ictxt)
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_cdall(ictxt,desc_a,info,nl=nr)
|
||||
myidx = desc_a%get_global_indices()
|
||||
nlr = size(myidx)
|
||||
|
||||
!
|
||||
! allocate and fill in the vectors
|
||||
!
|
||||
call psb_barrier(ictxt)
|
||||
t1 = psb_wtime()
|
||||
! Allocate memory
|
||||
call psb_geall(x,desc_a,info)
|
||||
call psb_geall(y,desc_a,info)
|
||||
! Put entries into the vectors
|
||||
do ii=1,nlr
|
||||
zt(1) = 1.0
|
||||
call psb_geins(ib,myidx(ii:),zt(1:),x,desc_a,info)
|
||||
zt(1) = 2.0
|
||||
call psb_geins(ib,myidx(ii:),zt(1:),y,desc_a,info)
|
||||
end do
|
||||
! Assemble
|
||||
call psb_cdasb(desc_a,info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='comm asb rout.'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
if (info == psb_success_) call psb_geasb(x,desc_a,info)
|
||||
if (info == psb_success_) call psb_geasb(y,desc_a,info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='vec asb rout.'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
call psb_barrier(ictxt)
|
||||
t2 = psb_wtime() - t1
|
||||
|
||||
if (iam == psb_root_) write(psb_out_unit,'("Overall vector creation time : ",es12.5)')t2
|
||||
|
||||
!
|
||||
! Vector operations
|
||||
!
|
||||
dotresult = psb_gedot(x,y,desc_a,info) ! Dot-product
|
||||
if (iam == psb_root_) write(psb_out_unit,'("Dot product result : ",es12.5)')dotresult
|
||||
norm1 = psb_norm1(x,desc_a,info)
|
||||
norm2 = psb_norm2(x,desc_a,info)
|
||||
norminf = psb_normi(x,desc_a,info)
|
||||
if (iam == psb_root_) write(psb_out_unit,'("\|x\|_inf : ",es12.5," \|x\|_1 :",es12.5," \|x\|_2",es12.5)')norminf,norm1,norm2
|
||||
call psb_geaxpby(1.0_psb_dpk_, x, 1.0_psb_dpk_, y, desc_a, info) ! \alpha x + \beta y
|
||||
call psb_gemlt(x,y,desc_a,info)
|
||||
|
||||
|
||||
|
||||
!
|
||||
! cleanup storage and exit
|
||||
!
|
||||
call psb_gefree(x,desc_a,info)
|
||||
call psb_gefree(y,desc_a,info)
|
||||
call psb_cdfree(desc_a,info)
|
||||
if(info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='free routine'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call psb_exit(ictxt)
|
||||
stop
|
||||
|
||||
9999 call psb_error(ictxt)
|
||||
|
||||
stop
|
||||
end program vecoperation
|
||||
Reference in New Issue
Block a user