|
|
@ -771,16 +771,17 @@ contains
|
|
|
|
#ifdef MPI_H
|
|
|
|
#ifdef MPI_H
|
|
|
|
include 'mpif.h'
|
|
|
|
include 'mpif.h'
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
integer(psb_mpk_), intent(in) :: ictxt
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt
|
|
|
|
complex(psb_spk_), intent(inout) :: dat
|
|
|
|
complex(psb_spk_), intent(inout) :: dat
|
|
|
|
complex(psb_spk_) :: dat_
|
|
|
|
complex(psb_spk_) :: dat_
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
integer(psb_ipk_) :: iam, np, info
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
integer(psb_mpk_) :: minfo, icomm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call mpi_scan(dat,dat_,1,psb_mpi_c_spk_,mpi_sum,ictxt,info)
|
|
|
|
icomm = psb_get_mpi_comm(ictxt)
|
|
|
|
|
|
|
|
call mpi_scan(dat,dat_,1,psb_mpi_c_spk_,mpi_sum,icomm,minfo)
|
|
|
|
dat = dat_
|
|
|
|
dat = dat_
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
end subroutine psb_cscan_sums
|
|
|
|
end subroutine psb_cscan_sums
|
|
|
@ -794,16 +795,17 @@ contains
|
|
|
|
#ifdef MPI_H
|
|
|
|
#ifdef MPI_H
|
|
|
|
include 'mpif.h'
|
|
|
|
include 'mpif.h'
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
integer(psb_mpk_), intent(in) :: ictxt
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt
|
|
|
|
complex(psb_spk_), intent(inout) :: dat
|
|
|
|
complex(psb_spk_), intent(inout) :: dat
|
|
|
|
complex(psb_spk_) :: dat_
|
|
|
|
complex(psb_spk_) :: dat_
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
integer(psb_ipk_) :: iam, np, info
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
integer(psb_mpk_) :: icomm, minfo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call mpi_exscan(dat,dat_,1,psb_mpi_c_spk_,mpi_sum,ictxt,info)
|
|
|
|
icomm = psb_get_mpi_comm(ictxt)
|
|
|
|
|
|
|
|
call mpi_exscan(dat,dat_,1,psb_mpi_c_spk_,mpi_sum,icomm,minfo)
|
|
|
|
dat = dat_
|
|
|
|
dat = dat_
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
dat = czero
|
|
|
|
dat = czero
|
|
|
@ -819,20 +821,21 @@ contains
|
|
|
|
#ifdef MPI_H
|
|
|
|
#ifdef MPI_H
|
|
|
|
include 'mpif.h'
|
|
|
|
include 'mpif.h'
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
integer(psb_mpk_), intent(in) :: ictxt
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt
|
|
|
|
complex(psb_spk_), intent(inout) :: dat(:)
|
|
|
|
complex(psb_spk_), intent(inout) :: dat(:)
|
|
|
|
integer(psb_mpk_), intent(in), optional :: root
|
|
|
|
integer(psb_ipk_), intent(in), optional :: root
|
|
|
|
integer(psb_mpk_) :: root_
|
|
|
|
integer(psb_mpk_) :: root_
|
|
|
|
complex(psb_spk_), allocatable :: dat_(:)
|
|
|
|
complex(psb_spk_), allocatable :: dat_(:)
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
integer(psb_ipk_) :: iam, np, info
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
integer(psb_mpk_) :: minfo, icomm
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_realloc(size(dat),dat_,iinfo)
|
|
|
|
icomm = psb_get_mpi_comm(ictxt)
|
|
|
|
|
|
|
|
call psb_realloc(size(dat),dat_,info)
|
|
|
|
dat_ = dat
|
|
|
|
dat_ = dat
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
if (info == psb_success_) &
|
|
|
|
& call mpi_scan(dat,dat_,size(dat),psb_mpi_c_spk_,mpi_sum,ictxt,info)
|
|
|
|
& call mpi_scan(dat,dat_,size(dat),psb_mpi_c_spk_,mpi_sum,icomm,minfo)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
end subroutine psb_cscan_sumv
|
|
|
|
end subroutine psb_cscan_sumv
|
|
|
|
|
|
|
|
|
|
|
@ -845,20 +848,21 @@ contains
|
|
|
|
#ifdef MPI_H
|
|
|
|
#ifdef MPI_H
|
|
|
|
include 'mpif.h'
|
|
|
|
include 'mpif.h'
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
integer(psb_mpk_), intent(in) :: ictxt
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt
|
|
|
|
complex(psb_spk_), intent(inout) :: dat(:)
|
|
|
|
complex(psb_spk_), intent(inout) :: dat(:)
|
|
|
|
integer(psb_mpk_), intent(in), optional :: root
|
|
|
|
integer(psb_ipk_), intent(in), optional :: root
|
|
|
|
integer(psb_mpk_) :: root_
|
|
|
|
integer(psb_mpk_) :: root_
|
|
|
|
complex(psb_spk_), allocatable :: dat_(:)
|
|
|
|
complex(psb_spk_), allocatable :: dat_(:)
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
integer(psb_ipk_) :: iam, np, info
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
integer(psb_mpk_) :: minfo, icomm
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
call psb_realloc(size(dat),dat_,iinfo)
|
|
|
|
icomm = psb_get_mpi_comm(ictxt)
|
|
|
|
|
|
|
|
call psb_realloc(size(dat),dat_,info)
|
|
|
|
dat_ = dat
|
|
|
|
dat_ = dat
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
if (info == psb_success_) &
|
|
|
|
& call mpi_exscan(dat,dat_,size(dat),psb_mpi_c_spk_,mpi_sum,ictxt,info)
|
|
|
|
& call mpi_exscan(dat,dat_,size(dat),psb_mpi_c_spk_,mpi_sum,icomm,minfo)
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
dat = czero
|
|
|
|
dat = czero
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|