|
|
|
@ -109,7 +109,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -175,7 +174,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -204,17 +202,11 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_max,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_max,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_max,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_max,root_,icomm,info)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
@ -251,7 +243,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -281,17 +272,11 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_)&
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_max,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_max,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_max,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_max,root_,icomm,info)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
@ -330,7 +315,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -397,7 +381,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -425,17 +408,11 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_min,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_min,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_min,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_min,root_,icomm,info)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
@ -472,7 +449,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -501,17 +477,11 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_)&
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_min,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_min,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_min,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_min,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
@ -552,7 +522,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -621,7 +590,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -649,17 +617,11 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),psb_mpi_r_dpk_,&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),psb_mpi_r_dpk_,&
|
|
|
|
|
& mpi_dnrm2_op,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),psb_mpi_r_dpk_,&
|
|
|
|
|
& mpi_dnrm2_op,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),psb_mpi_r_dpk_,&
|
|
|
|
|
& mpi_dnrm2_op,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),psb_mpi_r_dpk_,&
|
|
|
|
|
& mpi_dnrm2_op,root_,icomm,info)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
@ -700,7 +662,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -768,7 +729,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -796,32 +756,20 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,info)
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_iallreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_iallreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,request,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_ireduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,request,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_ireduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,request,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_ireduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,request,info)
|
|
|
|
|
end if
|
|
|
|
|
else if (collective_end) then
|
|
|
|
|
call mpi_wait(request,status,info)
|
|
|
|
@ -849,7 +797,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -878,32 +825,20 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_iallreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_iallreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,request,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_ireduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_, icomm,request,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_ireduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_,icomm,request,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_ireduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,root_, icomm,request,info)
|
|
|
|
|
end if
|
|
|
|
|
else if (collective_end) then
|
|
|
|
|
call mpi_wait(request,status,info)
|
|
|
|
@ -933,7 +868,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -1002,7 +936,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -1030,17 +963,11 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damx_op,icomm,info)
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
psb_mpi_r_dpk_,mpi_damx_op,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damx_op,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damx_op,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damx_op,root_,icomm,info)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
@ -1077,7 +1004,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -1106,19 +1032,13 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_)&
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damx_op,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damx_op,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damx_op,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damx_op,root_,icomm,info)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
call mpi_iallreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
@ -1154,7 +1074,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -1223,7 +1142,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -1251,17 +1169,11 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_) &
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damn_op,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damn_op,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damn_op,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damn_op,root_,icomm,info)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
@ -1298,7 +1210,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -1327,17 +1238,11 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
if (collective_sync) then
|
|
|
|
|
if (root_ == -1) then
|
|
|
|
|
if (iinfo == psb_success_)&
|
|
|
|
|
& call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_allreduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damn_op,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
if (iam == root_) then
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damn_op,root_,icomm,info)
|
|
|
|
|
else
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damn_op,root_,icomm,info)
|
|
|
|
|
end if
|
|
|
|
|
call mpi_reduce(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_damn_op,root_,icomm,info)
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
@ -1376,7 +1281,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1433,7 +1337,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -1490,7 +1393,6 @@ contains
|
|
|
|
|
integer(psb_mpk_) :: iam, np, info
|
|
|
|
|
integer(psb_mpk_) :: icomm
|
|
|
|
|
integer(psb_mpk_) :: status(mpi_status_size)
|
|
|
|
|
integer(psb_ipk_) :: iinfo
|
|
|
|
|
logical :: collective_start, collective_end, collective_sync
|
|
|
|
|
|
|
|
|
|
#if !defined(SERIAL_MPI)
|
|
|
|
@ -1628,7 +1530,7 @@ contains
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,minfo)
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
|
call mpi_exscan(MPI_IN_PLACE,dat,1,&
|
|
|
|
|
call mpi_iexscan(MPI_IN_PLACE,dat,1,&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,request,minfo)
|
|
|
|
|
else if (collective_end) then
|
|
|
|
|
call mpi_wait(request,status,minfo)
|
|
|
|
@ -1680,7 +1582,7 @@ contains
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,minfo)
|
|
|
|
|
else
|
|
|
|
|
if (collective_start) then
|
|
|
|
|
call mpi_scan(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
call mpi_iscan(MPI_IN_PLACE,dat,size(dat),&
|
|
|
|
|
& psb_mpi_r_dpk_,mpi_sum,icomm,request,info)
|
|
|
|
|
else if (collective_end) then
|
|
|
|
|
call mpi_wait(request,status,info)
|
|
|
|
|