81 |
|
! interface for gather scatter routines |
82 |
|
|
83 |
|
interface gather |
84 |
+ |
module procedure gather_integer |
85 |
|
module procedure gather_double |
86 |
|
module procedure gather_double_dim |
87 |
|
end interface |
153 |
|
subroutine make_Force_Grid(status) |
154 |
|
integer, intent(out) :: status ! status returns -1 if error |
155 |
|
integer :: nWorldProcs |
156 |
< |
integer :: nColumnsMax |
156 |
> |
integer :: nColumnsMax !Maximum number of columns |
157 |
|
|
158 |
|
integer :: rowIndex |
159 |
|
integer :: columnIndex |
205 |
|
|
206 |
|
|
207 |
|
|
208 |
+ |
subroutine mpi() |
209 |
|
|
210 |
|
|
211 |
|
|
212 |
+ |
end subroutine mpi_init_Forces |
213 |
+ |
|
214 |
|
!! subroutine to distribute column and row atom type info... |
215 |
|
|
216 |
|
subroutine mpi_handle_atypes(status) |
375 |
|
|
376 |
|
end subroutine unplan_gather_scatter |
377 |
|
|
378 |
+ |
subroutine gather_integer( sbuffer, rbuffer, this_plan, status) |
379 |
+ |
|
380 |
+ |
type (gs_plan), intent(in) :: this_plan |
381 |
+ |
integer, dimension(:), intent(in) :: sbuffer |
382 |
+ |
integer, dimension(:), intent(in) :: rbuffer |
383 |
+ |
integer :: noffset |
384 |
+ |
integer, intent(out), optional :: status |
385 |
+ |
|
386 |
+ |
if (present(status)) status = 0 |
387 |
+ |
noffset = this_plan%displs(this_plan%me) |
388 |
+ |
|
389 |
+ |
call mpi_allgatherv(sbuffer,this_plan%n_datum, mpi_integer, & |
390 |
+ |
rbuffer,this_plan%counts,this_plan%displs,mpi_integer, & |
391 |
+ |
this_plan%comm, mpi_err) |
392 |
+ |
|
393 |
+ |
if (mpi_err /= 0) then |
394 |
+ |
if (present(status)) status = -1 |
395 |
+ |
endif |
396 |
+ |
|
397 |
+ |
end subroutine gather_double |
398 |
+ |
|
399 |
|
subroutine gather_double( sbuffer, rbuffer, this_plan, status) |
400 |
|
|
401 |
|
type (gs_plan), intent(in) :: this_plan |