Further advances in using LPK.

ILmat
Salvatore Filippone 8 years ago
parent 141437e716
commit 5b9638c146

@ -60,19 +60,21 @@ subroutine psb_indx_map_fnd_owner(idx,iprc,idxmap,info)
#ifdef MPI_H #ifdef MPI_H
include 'mpif.h' include 'mpif.h'
#endif #endif
integer(psb_ipk_), intent(in) :: idx(:) integer(psb_lpk_), intent(in) :: idx(:)
integer(psb_ipk_), allocatable, intent(out) :: iprc(:) integer(psb_ipk_), allocatable, intent(out) :: iprc(:)
class(psb_indx_map), intent(in) :: idxmap class(psb_indx_map), intent(in) :: idxmap
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), allocatable :: helem(:),hproc(:),& integer(psb_lpk_), allocatable :: hproc(:)
integer(psb_ipk_), allocatable :: helem(:),&
& answers(:,:),idxsrch(:,:), hhidx(:) & answers(:,:),idxsrch(:,:), hhidx(:)
integer(psb_mpk_), allocatable :: hsz(:),hidx(:), & integer(psb_mpk_), allocatable :: hsz(:),hidx(:), &
& sdsz(:),sdidx(:), rvsz(:), rvidx(:) & sdsz(:),sdidx(:), rvsz(:), rvidx(:)
integer(psb_mpk_) :: icomm, minfo, iictxt integer(psb_mpk_) :: icomm, minfo, iictxt
integer(psb_ipk_) :: i,n_row,n_col,err_act,ih,hsize,ip,isz,k,j,& integer(psb_ipk_) :: i,n_row,n_col,err_act,ih,hsize,ip,isz,k,j,&
& last_ih, last_j, nv, mglob & last_ih, last_j, nv
integer(psb_lpk_) :: mglob
integer(psb_ipk_) :: ictxt,np,me, nresp integer(psb_ipk_) :: ictxt,np,me, nresp
logical, parameter :: gettime=.false. logical, parameter :: gettime=.false.
real(psb_dpk_) :: t0, t1, t2, t3, t4, tamx, tidx real(psb_dpk_) :: t0, t1, t2, t3, t4, tamx, tidx

@ -127,7 +127,7 @@ subroutine psi_i_desc_index(desc,index_in,dep_list,&
integer(psb_ipk_) :: ictxt integer(psb_ipk_) :: ictxt
integer(psb_ipk_), parameter :: no_comm=-1 integer(psb_ipk_), parameter :: no_comm=-1
! ...local arrays.. ! ...local arrays..
integer(psb_ipk_),allocatable :: sndbuf(:), rcvbuf(:) integer(psb_lpk_),allocatable :: sndbuf(:), rcvbuf(:)
integer(psb_mpk_),allocatable :: brvindx(:),rvsz(:),& integer(psb_mpk_),allocatable :: brvindx(:),rvsz(:),&
& bsdindx(:),sdsz(:) & bsdindx(:),sdsz(:)
@ -261,10 +261,12 @@ subroutine psi_i_desc_index(desc,index_in,dep_list,&
sndbuf(bsdindx(proc+1)+j) = (index_in(i+j)) sndbuf(bsdindx(proc+1)+j) = (index_in(i+j))
end do end do
else else
sndbuf(bsdindx(proc+1)+1:bsdindx(proc+1)+nerv) = index_in(i+1:i+nerv)
call desc%indxmap%l2g(index_in(i+1:i+nerv),& call desc%indxmap%l2gip(sndbuf(bsdindx(proc+1)+1:bsdindx(proc+1)+nerv),&
& sndbuf(bsdindx(proc+1)+1:bsdindx(proc+1)+nerv),&
& info) & info)
!!$ call desc%indxmap%l2g(index_in(i+1:i+nerv),&
!!$ & sndbuf(bsdindx(proc+1)+1:bsdindx(proc+1)+nerv),&
!!$ & info)
if (info /= psb_success_) then if (info /= psb_success_) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='l2g') call psb_errpush(psb_err_from_subroutine_,name,a_err='l2g')
@ -293,8 +295,8 @@ subroutine psi_i_desc_index(desc,index_in,dep_list,&
idxr = idxr + rvsz(proc+1) idxr = idxr + rvsz(proc+1)
end do end do
call mpi_alltoallv(sndbuf,sdsz,bsdindx,psb_mpi_ipk_,& call mpi_alltoallv(sndbuf,sdsz,bsdindx,psb_mpi_lpk_,&
& rcvbuf,rvsz,brvindx,psb_mpi_ipk_,icomm,minfo) & rcvbuf,rvsz,brvindx,psb_mpi_lpk_,icomm,minfo)
if (minfo /= psb_success_) then if (minfo /= psb_success_) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='mpi_alltoallv') call psb_errpush(psb_err_from_subroutine_,name,a_err='mpi_alltoallv')
goto 9999 goto 9999

@ -63,7 +63,7 @@ subroutine psi_fnd_owner(nv,idx,iprc,desc,info)
include 'mpif.h' include 'mpif.h'
#endif #endif
integer(psb_ipk_), intent(in) :: nv integer(psb_ipk_), intent(in) :: nv
integer(psb_ipk_), intent(in) :: idx(:) integer(psb_lpk_), intent(in) :: idx(:)
integer(psb_ipk_), allocatable, intent(out) :: iprc(:) integer(psb_ipk_), allocatable, intent(out) :: iprc(:)
type(psb_desc_type), intent(in) :: desc type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info

@ -35,7 +35,7 @@
! Auxiliary module for descriptor: constant values. ! Auxiliary module for descriptor: constant values.
! !
module psb_desc_const_mod module psb_desc_const_mod
use psb_const_mod, only : psb_ipk_, psb_mpk_ use psb_const_mod, only : psb_ipk_, psb_mpk_, psb_lpk_
! !
! Communication, prolongation & restriction ! Communication, prolongation & restriction
! !
@ -121,8 +121,9 @@ module psb_desc_const_mod
interface interface
subroutine psb_parts(glob_index,nrow,np,pv,nv) subroutine psb_parts(glob_index,nrow,np,pv,nv)
import :: psb_ipk_ import :: psb_ipk_, psb_lpk_
integer(psb_ipk_), intent (in) :: glob_index,nrow, np integer(psb_lpk_), intent (in) :: glob_index,nrow
integer(psb_ipk_), intent (in) :: np
integer(psb_ipk_), intent (out) :: nv, pv(*) integer(psb_ipk_), intent (out) :: nv, pv(*)
end subroutine psb_parts end subroutine psb_parts
end interface end interface

Loading…
Cancel
Save