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
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: idx(:)
integer(psb_lpk_), intent(in) :: idx(:)
integer(psb_ipk_), allocatable, intent(out) :: iprc(:)
class(psb_indx_map), intent(in) :: idxmap
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(:)
integer(psb_mpk_), allocatable :: hsz(:),hidx(:), &
& sdsz(:),sdidx(:), rvsz(:), rvidx(:)
integer(psb_mpk_) :: icomm, minfo, iictxt
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
logical, parameter :: gettime=.false.
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_), parameter :: no_comm=-1
! ...local arrays..
integer(psb_ipk_),allocatable :: sndbuf(:), rcvbuf(:)
integer(psb_lpk_),allocatable :: sndbuf(:), rcvbuf(:)
integer(psb_mpk_),allocatable :: brvindx(:),rvsz(:),&
& 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))
end do
else
call desc%indxmap%l2g(index_in(i+1:i+nerv),&
& sndbuf(bsdindx(proc+1)+1:bsdindx(proc+1)+nerv),&
sndbuf(bsdindx(proc+1)+1:bsdindx(proc+1)+nerv) = index_in(i+1:i+nerv)
call desc%indxmap%l2gip(sndbuf(bsdindx(proc+1)+1:bsdindx(proc+1)+nerv),&
& 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
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)
end do
call mpi_alltoallv(sndbuf,sdsz,bsdindx,psb_mpi_ipk_,&
& rcvbuf,rvsz,brvindx,psb_mpi_ipk_,icomm,minfo)
call mpi_alltoallv(sndbuf,sdsz,bsdindx,psb_mpi_lpk_,&
& rcvbuf,rvsz,brvindx,psb_mpi_lpk_,icomm,minfo)
if (minfo /= psb_success_) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='mpi_alltoallv')
goto 9999

@ -63,7 +63,7 @@ subroutine psi_fnd_owner(nv,idx,iprc,desc,info)
include 'mpif.h'
#endif
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(:)
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(out) :: info

@ -35,7 +35,7 @@
! Auxiliary module for descriptor: constant values.
!
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
!
@ -121,8 +121,9 @@ module psb_desc_const_mod
interface
subroutine psb_parts(glob_index,nrow,np,pv,nv)
import :: psb_ipk_
integer(psb_ipk_), intent (in) :: glob_index,nrow, np
import :: psb_ipk_, psb_lpk_
integer(psb_lpk_), intent (in) :: glob_index,nrow
integer(psb_ipk_), intent (in) :: np
integer(psb_ipk_), intent (out) :: nv, pv(*)
end subroutine psb_parts
end interface

Loading…
Cancel
Save