Fix: get_rank in the loop for irecv should be done unconditionally for

those cases in which we do not receive, but we do send.
psblas3-type-indexed
Salvatore Filippone 18 years ago
parent 904e2e1fce
commit dd3732bdf7

@ -259,9 +259,9 @@ subroutine psi_dswapdatam(flag,n,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nerv>0) then if (nerv>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,& call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
& mpi_double_precision,prcid(i),& & mpi_double_precision,prcid(i),&
& p2ptag, icomm,rvhd(i),iret) & p2ptag, icomm,rvhd(i),iret)
@ -683,9 +683,9 @@ subroutine psi_dswapdatav(flag,beta,y,desc_a,work,info,data)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nerv>0) then if (nerv>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(rcvbuf(rcv_pt),nerv,& call mpi_irecv(rcvbuf(rcv_pt),nerv,&
& mpi_double_precision,prcid(i),& & mpi_double_precision,prcid(i),&
& p2ptag, icomm,rvhd(i),iret) & p2ptag, icomm,rvhd(i),iret)

@ -257,9 +257,9 @@ subroutine psi_dswaptranm(flag,n,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nesd>0) then if (nesd>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(sndbuf(snd_pt),n*nesd,& call mpi_irecv(sndbuf(snd_pt),n*nesd,&
& mpi_double_precision,prcid(i),& & mpi_double_precision,prcid(i),&
& p2ptag,icomm,rvhd(i),iret) & p2ptag,icomm,rvhd(i),iret)
@ -676,9 +676,9 @@ subroutine psi_dswaptranv(flag,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nesd>0) then if (nesd>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(sndbuf(snd_pt),nesd,& call mpi_irecv(sndbuf(snd_pt),nesd,&
& mpi_double_precision,prcid(i),& & mpi_double_precision,prcid(i),&
& p2ptag,icomm,rvhd(i),iret) & p2ptag,icomm,rvhd(i),iret)

@ -259,9 +259,9 @@ subroutine psi_iswapdatam(flag,n,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nerv>0) then if (nerv>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,& call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
& mpi_integer,prcid(i),& & mpi_integer,prcid(i),&
& p2ptag, icomm,rvhd(i),iret) & p2ptag, icomm,rvhd(i),iret)
@ -683,9 +683,9 @@ subroutine psi_iswapdatav(flag,beta,y,desc_a,work,info,data)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nerv>0) then if (nerv>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(rcvbuf(rcv_pt),nerv,& call mpi_irecv(rcvbuf(rcv_pt),nerv,&
& mpi_integer,prcid(i),& & mpi_integer,prcid(i),&
& p2ptag, icomm,rvhd(i),iret) & p2ptag, icomm,rvhd(i),iret)

@ -257,9 +257,9 @@ subroutine psi_iswaptranm(flag,n,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nesd>0) then if (nesd>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(sndbuf(snd_pt),n*nesd,& call mpi_irecv(sndbuf(snd_pt),n*nesd,&
& mpi_integer,prcid(i),& & mpi_integer,prcid(i),&
& p2ptag,icomm,rvhd(i),iret) & p2ptag,icomm,rvhd(i),iret)
@ -675,9 +675,9 @@ subroutine psi_iswaptranv(flag,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nesd>0) then if (nesd>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(sndbuf(snd_pt),nesd,& call mpi_irecv(sndbuf(snd_pt),nesd,&
& mpi_integer,prcid(i),& & mpi_integer,prcid(i),&
& p2ptag,icomm,rvhd(i),iret) & p2ptag,icomm,rvhd(i),iret)

@ -259,9 +259,9 @@ subroutine psi_zswapdatam(flag,n,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nerv > 0) then if (nerv > 0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,& call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
& mpi_double_complex,prcid(i),& & mpi_double_complex,prcid(i),&
& p2ptag, icomm,rvhd(i),iret) & p2ptag, icomm,rvhd(i),iret)
@ -682,10 +682,9 @@ subroutine psi_zswapdatav(flag,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nerv>0) then if (nerv>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(rcvbuf(rcv_pt),nerv,& call mpi_irecv(rcvbuf(rcv_pt),nerv,&
& mpi_double_complex,prcid(i),& & mpi_double_complex,prcid(i),&
& p2ptag, icomm,rvhd(i),iret) & p2ptag, icomm,rvhd(i),iret)

@ -257,9 +257,9 @@ subroutine psi_zswaptranm(flag,n,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nesd>0) then if (nesd>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(sndbuf(snd_pt),n*nesd,& call mpi_irecv(sndbuf(snd_pt),n*nesd,&
& mpi_double_complex,prcid(i),& & mpi_double_complex,prcid(i),&
& p2ptag,icomm,rvhd(i),iret) & p2ptag,icomm,rvhd(i),iret)
@ -675,9 +675,9 @@ subroutine psi_zswaptranv(flag,beta,y,desc_a,work,info,data)
proc_to_comm = d_idx(pnti+psb_proc_id_) proc_to_comm = d_idx(pnti+psb_proc_id_)
nerv = d_idx(pnti+psb_n_elem_recv_) nerv = d_idx(pnti+psb_n_elem_recv_)
nesd = d_idx(pnti+nerv+psb_n_elem_send_) nesd = d_idx(pnti+nerv+psb_n_elem_send_)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
if (nesd>0) then if (nesd>0) then
p2ptag = krecvid(ictxt,proc_to_comm,me) p2ptag = krecvid(ictxt,proc_to_comm,me)
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
call mpi_irecv(sndbuf(snd_pt),nesd,& call mpi_irecv(sndbuf(snd_pt),nesd,&
& mpi_double_complex,prcid(i),& & mpi_double_complex,prcid(i),&
& p2ptag,icomm,rvhd(i),iret) & p2ptag,icomm,rvhd(i),iret)

Loading…
Cancel
Save