Fixed definition of broadcast for vectors of charatcers, in response

to a requirement from NEMO.
psblas3-type-indexed
Salvatore Filippone 17 years ago
parent 753a7c2400
commit f14d9d0598

@ -72,7 +72,7 @@ module psb_penv_mod
module procedure psb_ibcasts, psb_ibcastv, psb_ibcastm,&
& psb_dbcasts, psb_dbcastv, psb_dbcastm,&
& psb_zbcasts, psb_zbcastv, psb_zbcastm,&
& psb_hbcasts, psb_lbcasts, psb_lbcastv, psb_hbcastv1
& psb_hbcasts, psb_hbcastv, psb_lbcasts, psb_lbcastv
end interface
@ -546,7 +546,7 @@ contains
end subroutine psb_hbcasts
subroutine psb_hbcastv1(ictxt,dat,root,length)
subroutine psb_hbcastv(ictxt,dat,root)
#ifdef MPI_H
include 'mpif.h'
#endif
@ -554,10 +554,10 @@ contains
use mpi
#endif
integer, intent(in) :: ictxt
character(len=1), intent(inout) :: dat(:)
integer, intent(in), optional :: root,length
character(len=*), intent(inout) :: dat(:)
integer, intent(in), optional :: root
integer :: iam, np, root_,icomm,length_,info
integer :: iam, np, root_,icomm,length_,info, size_
#if !defined(SERIAL_MPI)
if (present(root)) then
@ -565,19 +565,16 @@ contains
else
root_ = psb_root_
endif
if (present(length)) then
length_ = length
else
length_ = size(dat)
endif
length_ = len(dat)
size_ = size(dat)
call psb_info(ictxt,iam,np)
call psb_get_mpicomm(ictxt,icomm)
call mpi_bcast(dat,length_,MPI_CHARACTER,root_,icomm,info)
call mpi_bcast(dat,length_*size_,MPI_CHARACTER,root_,icomm,info)
#endif
end subroutine psb_hbcastv1
end subroutine psb_hbcastv
subroutine psb_lbcasts(ictxt,dat,root)
#ifdef MPI_H

Loading…
Cancel
Save