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

Loading…
Cancel
Save