psblas-3.3-maint:

base/comm/psb_cscatter.F90
 base/comm/psb_dscatter.F90
 base/comm/psb_sscatter.F90
 base/comm/psb_zscatter.F90
 base/modules/psb_c_base_vect_mod.f90
 base/modules/psb_c_comm_mod.f90
 base/modules/psb_c_vect_mod.F90
 base/modules/psb_d_base_vect_mod.f90
 base/modules/psb_d_comm_mod.f90
 base/modules/psb_d_vect_mod.F90
 base/modules/psb_s_base_vect_mod.f90
 base/modules/psb_s_comm_mod.f90
 base/modules/psb_s_tools_mod.f90
 base/modules/psb_s_vect_mod.F90
 base/modules/psb_z_base_vect_mod.f90
 base/modules/psb_z_comm_mod.f90
 base/modules/psb_z_vect_mod.F90
 docs/psblas-3.2.pdf
 docs/psblas-3.3.pdf
 docs/src/Makefile
 docs/src/commrout.tex
 docs/src/userguide.tex
 docs/src/userhtml.tex

Define scatter on encapsulated vectors.
psblas-3.3-maint
Salvatore Filippone 9 years ago
parent 5bbdf19776
commit 9f1925499c

@ -468,3 +468,100 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot)
return
end subroutine psb_cscatterv
!!$
!!$ Parallel Sparse BLAS version 3.1
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$
!!$ 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.
!!$
!!$
! Subroutine: psb_cscatterv
! This subroutine scatters a global vector locally owned by one process
! into pieces that are local to alle the processes.
!
! Arguments:
! globx - complex,dimension(:). The global vector to scatter.
! locx - complex,dimension(:). The local piece of the ditributed vector.
! desc_a - type(psb_desc_type). The communication descriptor.
! info - integer. Return code
! iroot - integer(optional). The process that owns the global vector. If -1 all
! the processes have a copy.
!
subroutine psb_cscatter_vect(globx, locx, desc_a, info, iroot, mold)
use psb_base_mod, psb_protect_name => psb_cscatter_vect
implicit none
type(psb_c_vect_type), intent(inout) :: locx
complex(psb_spk_), intent(in) :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iroot
class(psb_c_base_vect_type), intent(in), optional :: mold
! locals
integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
complex(psb_spk_), allocatable :: vlocx(:)
character(len=20) :: name, ch_err
integer(psb_ipk_) :: debug_level, debug_unit
name='psb_scatter_vect'
if (psb_get_errstatus() /= 0) return
info=psb_success_
call psb_erractionsave(err_act)
ictxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
goto 9999
endif
call psb_scatter(globx, vlocx, desc_a, info, iroot)
if (info /= psb_success_) then
info = psb_err_from_subroutine_
call psb_errpush(info,name,a_err='psb_scatterv')
goto 9999
endif
call locx%bld(vlocx,mold)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psb_cscatter_vect

@ -468,3 +468,100 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot)
return
end subroutine psb_dscatterv
!!$
!!$ Parallel Sparse BLAS version 3.1
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$
!!$ 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.
!!$
!!$
! Subroutine: psb_dscatterv
! This subroutine scatters a global vector locally owned by one process
! into pieces that are local to alle the processes.
!
! Arguments:
! globx - real,dimension(:). The global vector to scatter.
! locx - real,dimension(:). The local piece of the ditributed vector.
! desc_a - type(psb_desc_type). The communication descriptor.
! info - integer. Return code
! iroot - integer(optional). The process that owns the global vector. If -1 all
! the processes have a copy.
!
subroutine psb_dscatter_vect(globx, locx, desc_a, info, iroot, mold)
use psb_base_mod, psb_protect_name => psb_dscatter_vect
implicit none
type(psb_d_vect_type), intent(inout) :: locx
real(psb_dpk_), intent(in) :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iroot
class(psb_d_base_vect_type), intent(in), optional :: mold
! locals
integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
real(psb_dpk_), allocatable :: vlocx(:)
character(len=20) :: name, ch_err
integer(psb_ipk_) :: debug_level, debug_unit
name='psb_scatter_vect'
if (psb_get_errstatus() /= 0) return
info=psb_success_
call psb_erractionsave(err_act)
ictxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
goto 9999
endif
call psb_scatter(globx, vlocx, desc_a, info, iroot)
if (info /= psb_success_) then
info = psb_err_from_subroutine_
call psb_errpush(info,name,a_err='psb_scatterv')
goto 9999
endif
call locx%bld(vlocx,mold)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psb_dscatter_vect

@ -468,3 +468,100 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot)
return
end subroutine psb_sscatterv
!!$
!!$ Parallel Sparse BLAS version 3.1
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$
!!$ 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.
!!$
!!$
! Subroutine: psb_sscatterv
! This subroutine scatters a global vector locally owned by one process
! into pieces that are local to alle the processes.
!
! Arguments:
! globx - real,dimension(:). The global vector to scatter.
! locx - real,dimension(:). The local piece of the ditributed vector.
! desc_a - type(psb_desc_type). The communication descriptor.
! info - integer. Return code
! iroot - integer(optional). The process that owns the global vector. If -1 all
! the processes have a copy.
!
subroutine psb_sscatter_vect(globx, locx, desc_a, info, iroot, mold)
use psb_base_mod, psb_protect_name => psb_sscatter_vect
implicit none
type(psb_s_vect_type), intent(inout) :: locx
real(psb_spk_), intent(in) :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iroot
class(psb_s_base_vect_type), intent(in), optional :: mold
! locals
integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
real(psb_spk_), allocatable :: vlocx(:)
character(len=20) :: name, ch_err
integer(psb_ipk_) :: debug_level, debug_unit
name='psb_scatter_vect'
if (psb_get_errstatus() /= 0) return
info=psb_success_
call psb_erractionsave(err_act)
ictxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
goto 9999
endif
call psb_scatter(globx, vlocx, desc_a, info, iroot)
if (info /= psb_success_) then
info = psb_err_from_subroutine_
call psb_errpush(info,name,a_err='psb_scatterv')
goto 9999
endif
call locx%bld(vlocx,mold)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psb_sscatter_vect

@ -468,3 +468,100 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot)
return
end subroutine psb_zscatterv
!!$
!!$ Parallel Sparse BLAS version 3.1
!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$
!!$ 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.
!!$
!!$
! Subroutine: psb_zscatterv
! This subroutine scatters a global vector locally owned by one process
! into pieces that are local to alle the processes.
!
! Arguments:
! globx - complex,dimension(:). The global vector to scatter.
! locx - complex,dimension(:). The local piece of the ditributed vector.
! desc_a - type(psb_desc_type). The communication descriptor.
! info - integer. Return code
! iroot - integer(optional). The process that owns the global vector. If -1 all
! the processes have a copy.
!
subroutine psb_zscatter_vect(globx, locx, desc_a, info, iroot, mold)
use psb_base_mod, psb_protect_name => psb_zscatter_vect
implicit none
type(psb_z_vect_type), intent(inout) :: locx
complex(psb_dpk_), intent(in) :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iroot
class(psb_z_base_vect_type), intent(in), optional :: mold
! locals
integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
complex(psb_dpk_), allocatable :: vlocx(:)
character(len=20) :: name, ch_err
integer(psb_ipk_) :: debug_level, debug_unit
name='psb_scatter_vect'
if (psb_get_errstatus() /= 0) return
info=psb_success_
call psb_erractionsave(err_act)
ictxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
goto 9999
endif
call psb_scatter(globx, vlocx, desc_a, info, iroot)
if (info /= psb_success_) then
info = psb_err_from_subroutine_
call psb_errpush(info,name,a_err='psb_scatterv')
goto 9999
endif
call locx%bld(vlocx,mold)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
return
end subroutine psb_zscatter_vect

@ -135,6 +135,7 @@ module psb_c_base_vect_mod
! Scaling and norms
!
procedure, pass(x) :: scal => c_base_scal
procedure, pass(x) :: absval => c_base_absval
procedure, pass(x) :: nrm2 => c_base_nrm2
procedure, pass(x) :: amax => c_base_amax
procedure, pass(x) :: asum => c_base_asum
@ -397,7 +398,7 @@ contains
class(psb_c_base_vect_type), intent(inout) :: x
if (allocated(x%v)) x%v=czero
call x%set_host()
end subroutine c_base_zero
@ -613,7 +614,7 @@ contains
integer(psb_ipk_) :: info
if (.not.allocated(x%v)) return
call x%sync()
if (.not.x%is_host()) call x%sync()
allocate(res(x%get_nrows()),stat=info)
if (info /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,'base_get_vect')
@ -636,10 +637,28 @@ contains
complex(psb_spk_), intent(in) :: val
integer(psb_ipk_) :: info
x%v = val
call x%set_host()
end subroutine c_base_set_scal
!
! Overwrite with absolute value
!
!
!> Function base_set_scal
!! \memberof psb_c_base_vect_type
!! \brief Set all entries to their respective absolute values.
!!
subroutine c_base_absval(x)
class(psb_c_base_vect_type), intent(inout) :: x
if (allocated(x%v)) &
& x%v = abs(x%v)
end subroutine c_base_absval
!
!> Function base_set_vect
!! \memberof psb_c_base_vect_type
@ -658,6 +677,7 @@ contains
else
x%v = val
end if
call x%set_host()
end subroutine c_base_set_vect

@ -111,6 +111,15 @@ module psb_c_comm_mod
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: root
end subroutine psb_cscatterv
subroutine psb_cscatter_vect(globx, locx, desc_a, info, root)
use psb_desc_mod
use psb_c_vect_mod
type(psb_c_vect_type), intent(inout) :: locx
complex(psb_spk_), intent(in) :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: root
end subroutine psb_cscatter_vect
end interface psb_scatter
interface psb_gather

@ -63,6 +63,7 @@ module psb_c_vect_mod
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2,&
& mlt_v_2, mlt_av, mlt_va
procedure, pass(x) :: scal => c_vect_scal
procedure, pass(x) :: absval => c_vect_absval
procedure, pass(x) :: nrm2 => c_vect_nrm2
procedure, pass(x) :: amax => c_vect_amax
procedure, pass(x) :: asum => c_vect_asum
@ -457,6 +458,13 @@ contains
end subroutine c_vect_scal
subroutine c_vect_absval(x)
class(psb_c_vect_type), intent(inout) :: x
if (allocated(x%v)) &
& call x%v%absval()
end subroutine c_vect_absval
function c_vect_nrm2(n,x) result(res)
implicit none

@ -135,6 +135,7 @@ module psb_d_base_vect_mod
! Scaling and norms
!
procedure, pass(x) :: scal => d_base_scal
procedure, pass(x) :: absval => d_base_absval
procedure, pass(x) :: nrm2 => d_base_nrm2
procedure, pass(x) :: amax => d_base_amax
procedure, pass(x) :: asum => d_base_asum
@ -397,7 +398,7 @@ contains
class(psb_d_base_vect_type), intent(inout) :: x
if (allocated(x%v)) x%v=dzero
call x%set_host()
end subroutine d_base_zero
@ -613,7 +614,7 @@ contains
integer(psb_ipk_) :: info
if (.not.allocated(x%v)) return
call x%sync()
if (.not.x%is_host()) call x%sync()
allocate(res(x%get_nrows()),stat=info)
if (info /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,'base_get_vect')
@ -636,10 +637,28 @@ contains
real(psb_dpk_), intent(in) :: val
integer(psb_ipk_) :: info
x%v = val
call x%set_host()
end subroutine d_base_set_scal
!
! Overwrite with absolute value
!
!
!> Function base_set_scal
!! \memberof psb_d_base_vect_type
!! \brief Set all entries to their respective absolute values.
!!
subroutine d_base_absval(x)
class(psb_d_base_vect_type), intent(inout) :: x
if (allocated(x%v)) &
& x%v = abs(x%v)
end subroutine d_base_absval
!
!> Function base_set_vect
!! \memberof psb_d_base_vect_type
@ -658,6 +677,7 @@ contains
else
x%v = val
end if
call x%set_host()
end subroutine d_base_set_vect

@ -111,6 +111,15 @@ module psb_d_comm_mod
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: root
end subroutine psb_dscatterv
subroutine psb_dscatter_vect(globx, locx, desc_a, info, root)
use psb_desc_mod
use psb_d_vect_mod
type(psb_d_vect_type), intent(inout) :: locx
real(psb_dpk_), intent(in) :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: root
end subroutine psb_dscatter_vect
end interface psb_scatter
interface psb_gather

@ -63,6 +63,7 @@ module psb_d_vect_mod
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2,&
& mlt_v_2, mlt_av, mlt_va
procedure, pass(x) :: scal => d_vect_scal
procedure, pass(x) :: absval => d_vect_absval
procedure, pass(x) :: nrm2 => d_vect_nrm2
procedure, pass(x) :: amax => d_vect_amax
procedure, pass(x) :: asum => d_vect_asum
@ -457,6 +458,13 @@ contains
end subroutine d_vect_scal
subroutine d_vect_absval(x)
class(psb_d_vect_type), intent(inout) :: x
if (allocated(x%v)) &
& call x%v%absval()
end subroutine d_vect_absval
function d_vect_nrm2(n,x) result(res)
implicit none

@ -135,6 +135,7 @@ module psb_s_base_vect_mod
! Scaling and norms
!
procedure, pass(x) :: scal => s_base_scal
procedure, pass(x) :: absval => s_base_absval
procedure, pass(x) :: nrm2 => s_base_nrm2
procedure, pass(x) :: amax => s_base_amax
procedure, pass(x) :: asum => s_base_asum
@ -397,7 +398,7 @@ contains
class(psb_s_base_vect_type), intent(inout) :: x
if (allocated(x%v)) x%v=szero
call x%set_host()
end subroutine s_base_zero
@ -613,7 +614,7 @@ contains
integer(psb_ipk_) :: info
if (.not.allocated(x%v)) return
call x%sync()
if (.not.x%is_host()) call x%sync()
allocate(res(x%get_nrows()),stat=info)
if (info /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,'base_get_vect')
@ -636,10 +637,28 @@ contains
real(psb_spk_), intent(in) :: val
integer(psb_ipk_) :: info
x%v = val
call x%set_host()
end subroutine s_base_set_scal
!
! Overwrite with absolute value
!
!
!> Function base_set_scal
!! \memberof psb_s_base_vect_type
!! \brief Set all entries to their respective absolute values.
!!
subroutine s_base_absval(x)
class(psb_s_base_vect_type), intent(inout) :: x
if (allocated(x%v)) &
& x%v = abs(x%v)
end subroutine s_base_absval
!
!> Function base_set_vect
!! \memberof psb_s_base_vect_type
@ -658,6 +677,7 @@ contains
else
x%v = val
end if
call x%set_host()
end subroutine s_base_set_vect

@ -111,6 +111,15 @@ module psb_s_comm_mod
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: root
end subroutine psb_sscatterv
subroutine psb_sscatter_vect(globx, locx, desc_a, info, root)
use psb_desc_mod
use psb_s_vect_mod
type(psb_s_vect_type), intent(inout) :: locx
real(psb_spk_), intent(in) :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: root
end subroutine psb_sscatter_vect
end interface psb_scatter
interface psb_gather

@ -22,7 +22,7 @@
!!$ 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 BUSIESS
!!$ 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

@ -63,6 +63,7 @@ module psb_s_vect_mod
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2,&
& mlt_v_2, mlt_av, mlt_va
procedure, pass(x) :: scal => s_vect_scal
procedure, pass(x) :: absval => s_vect_absval
procedure, pass(x) :: nrm2 => s_vect_nrm2
procedure, pass(x) :: amax => s_vect_amax
procedure, pass(x) :: asum => s_vect_asum
@ -457,6 +458,13 @@ contains
end subroutine s_vect_scal
subroutine s_vect_absval(x)
class(psb_s_vect_type), intent(inout) :: x
if (allocated(x%v)) &
& call x%v%absval()
end subroutine s_vect_absval
function s_vect_nrm2(n,x) result(res)
implicit none

@ -135,6 +135,7 @@ module psb_z_base_vect_mod
! Scaling and norms
!
procedure, pass(x) :: scal => z_base_scal
procedure, pass(x) :: absval => z_base_absval
procedure, pass(x) :: nrm2 => z_base_nrm2
procedure, pass(x) :: amax => z_base_amax
procedure, pass(x) :: asum => z_base_asum
@ -397,7 +398,7 @@ contains
class(psb_z_base_vect_type), intent(inout) :: x
if (allocated(x%v)) x%v=zzero
call x%set_host()
end subroutine z_base_zero
@ -613,7 +614,7 @@ contains
integer(psb_ipk_) :: info
if (.not.allocated(x%v)) return
call x%sync()
if (.not.x%is_host()) call x%sync()
allocate(res(x%get_nrows()),stat=info)
if (info /= 0) then
call psb_errpush(psb_err_alloc_dealloc_,'base_get_vect')
@ -636,10 +637,28 @@ contains
complex(psb_dpk_), intent(in) :: val
integer(psb_ipk_) :: info
x%v = val
call x%set_host()
end subroutine z_base_set_scal
!
! Overwrite with absolute value
!
!
!> Function base_set_scal
!! \memberof psb_z_base_vect_type
!! \brief Set all entries to their respective absolute values.
!!
subroutine z_base_absval(x)
class(psb_z_base_vect_type), intent(inout) :: x
if (allocated(x%v)) &
& x%v = abs(x%v)
end subroutine z_base_absval
!
!> Function base_set_vect
!! \memberof psb_z_base_vect_type
@ -658,6 +677,7 @@ contains
else
x%v = val
end if
call x%set_host()
end subroutine z_base_set_vect

@ -111,6 +111,15 @@ module psb_z_comm_mod
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: root
end subroutine psb_zscatterv
subroutine psb_zscatter_vect(globx, locx, desc_a, info, root)
use psb_desc_mod
use psb_z_vect_mod
type(psb_z_vect_type), intent(inout) :: locx
complex(psb_dpk_), intent(in) :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: root
end subroutine psb_zscatter_vect
end interface psb_scatter
interface psb_gather

@ -63,6 +63,7 @@ module psb_z_vect_mod
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2,&
& mlt_v_2, mlt_av, mlt_va
procedure, pass(x) :: scal => z_vect_scal
procedure, pass(x) :: absval => z_vect_absval
procedure, pass(x) :: nrm2 => z_vect_nrm2
procedure, pass(x) :: amax => z_vect_amax
procedure, pass(x) :: asum => z_vect_asum
@ -457,6 +458,13 @@ contains
end subroutine z_vect_scal
subroutine z_vect_absval(x)
class(psb_z_vect_type), intent(inout) :: x
if (allocated(x%v)) &
& call x%v%absval()
end subroutine z_vect_absval
function z_vect_nrm2(n,x) result(res)
implicit none

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -138,7 +138,7 @@ PDF = $(join $(BASEFILE),.pdf)
PS = $(join $(BASEFILE),.ps)
GXS = $(join $(BASEFILE),.gxs)
GLX = $(join $(BASEFILE),.glx)
TARGETPDF= ../psblas-3.2.pdf
TARGETPDF= ../psblas-3.3.pdf
BASEHTML = $(patsubst %.tex,%,$(HTMLFILE))
HTML = $(join $(HTMLFILE),.html)
HTMLDIR = ../html

@ -495,8 +495,7 @@ Long Precision Complex & psb\_scatter \\
\end{table}
\begin{lstlisting}
call psb_scatter(glob_x, loc_x, desc_a, info, root)
call psb_scatter(glob_x, loc_x, desc_a, info, root)
call psb_scatter(glob_x, loc_x, desc_a, info, root, mold)
\end{lstlisting}
\begin{description}
@ -518,6 +517,12 @@ Scope: {\bf global} \\
Type: {\bf optional}\\
Intent: {\bf in}.\\
Specified as: an integer variable $-1\le root\le np-1$, default $-1$.
\item[mold] The desired dynamic type for the internal vector storage.\\
Scope: {\bf local}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: an object of a class derived from \vbasedata; this is
only allowed when loc\_x is of type \vdata.
%% \item[iglobx] Row index to define a submatrix in glob\_x that has to
%% be scattered into local pieces.\\
%% Scope: {\bf global} \\
@ -548,7 +553,7 @@ $glob\_x$. \\
Scope: {\bf local} \\
Type: {\bf required}\\
Intent: {\bf out}.\\
Specified as: a rank one or two array containing numbers of the type
Specified as: a rank one or two array or an object of type \vdata\ containing numbers of the type
indicated in Table~\ref{tab:scatter}.
\item[info] Error code.\\
Scope: {\bf local} \\

@ -25,7 +25,7 @@
\relax
\pdfcompresslevel=0 %-- 0 = none, 9 = best
\pdfinfo{ %-- Info dictionary of PDF output /Author (Alfredo Buttari)
/Title (Parallel Sparse BLAS V. 3.2)
/Title (Parallel Sparse BLAS V. 3.3)
/Subject (Parallel Sparse Basic Linear Algebra Subroutines)
/Keywords (Computer Science Linear Algebra Fluid Dynamics Parallel Linux MPI PSBLAS Iterative Solvers Preconditioners)
/Creator (pdfLaTeX)
@ -88,7 +88,7 @@
\begin{document}
\pdfbookmark{PSBLAS-v3.2 User's Guide}{title}
\pdfbookmark{PSBLAS-v3.3 User's Guide}{title}
\lstset{language=Fortran}
\newlength{\centeroffset}
\setlength{\centeroffset}{-0.5\oddsidemargin}
@ -98,7 +98,7 @@
\vspace*{\stretch{1}}
\noindent\hspace*{\centeroffset}\makebox[0pt][l]{\begin{minipage}{\textwidth}
\flushright
{\Huge\bfseries PSBLAS 3.2 User's guide
{\Huge\bfseries PSBLAS 3.3 User's guide
}
\noindent\rule[-1ex]{\textwidth}{5pt}\\[2.5ex]
\hfill\emph{\Large A reference guide for the Parallel Sparse BLAS library}
@ -109,9 +109,10 @@
\flushright
{\bfseries
by Salvatore Filippone\\
and Alfredo Buttari}\\
University of Rome ``Tor Vergata''.\\[3ex]
March 31st, 2014.
Cranfield University, Cranfield, (UK)\\[3ex]
and Alfredo Buttari}\\
CNRS-IRIT, Toulouse (F)\\[3ex]
December 5, 2015
\end{minipage}}
%\addtolength{\textwidth}{\centeroffset}

@ -89,14 +89,14 @@
{\LARGE\bfseries PSBLAS\\[.8ex] User's and Reference
Guide}\\[\baselineskip]
\emph{\large A reference guide for the Parallel Sparse BLAS library}\\[3ex]
{\bfseries Salvatore Filippone\\
Alfredo Buttari } \\
University of Rome ``Tor Vergata'', Italy\\[2ex]
%\\[10ex]
by Salvatore Filippone\\
Cranfield University, Cranfield, (UK)\\[3ex]
and Alfredo Buttari}\\
CNRS-IRIT, Toulouse (F)\\[3ex]
%\today
Software version: 3.2\\
Software version: 3.3\\
%\today
March 31st, 2014.
December 5th, 2015
\cleardoublepage
\begingroup
\renewcommand*{\thepage}{toc}

Loading…
Cancel
Save