TABLE OF CONTENTS


ABINIT/xmpi_allgather [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather

FUNCTION

  This module contains functions that calls MPI routine,
  if we compile the code using the  MPI CPP flags.
  xmpi_allgather is the generic function.

COPYRIGHT

  Copyright (C) 2001-2018 ABINIT group (AR,XG)
  This file is distributed under the terms of the
  GNU General Public License, see ~ABINIT/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

SOURCE


ABINIT/xmpi_allgather_char [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather_char

FUNCTION

  Gathers data from all tasks and distributes it to all.
  Target: one-dimensional character(20) arrays.

INPUTS

  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  charval= buffer array
  recvbuf= received elements

PARENTS

CHILDREN

      mpi_allgather

SOURCE

107 subroutine xmpi_allgather_char(charval,recvbuf,spaceComm,ier)
108 
109 
110 !This section has been created automatically by the script Abilint (TD).
111 !Do not modify the following lines by hand.
112 #undef ABI_FUNC
113 #define ABI_FUNC 'xmpi_allgather_char'
114 !End of the abilint section
115 
116  implicit none
117 
118 !Arguments-------------------------
119  integer,intent(in)  :: spaceComm
120  integer,intent(out) :: ier
121  character(len=20),intent(inout) :: charval
122  character(len=20), DEV_CONTARRD intent(inout) :: recvbuf(:)
123 
124 ! *************************************************************************
125  ier=0
126 #if defined HAVE_MPI
127  if (spaceComm /= MPI_COMM_SELF .and. spaceComm /= MPI_COMM_NULL) then
128 !  allgather xval on all proc. in spaceComm
129    call MPI_ALLGATHER(charval,20,MPI_CHARACTER,recvbuf,20,MPI_CHARACTER,spaceComm,ier)
130  else if (spaceComm == MPI_COMM_SELF) then
131    recvbuf=charval
132  end if
133 #else
134  recvbuf=charval
135 #endif
136 
137 end subroutine xmpi_allgather_char

ABINIT/xmpi_allgather_dp1d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather_dp1d

FUNCTION

  Gathers data from all tasks and distributes it to all.
  Target: double precision one-dimensional arrays.

INPUTS

  xval= buffer array
  nelem= number of elements
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  recvbuf= received elements

PARENTS

CHILDREN

      mpi_allgather

SOURCE

286 subroutine xmpi_allgather_dp1d(xval,nelem,recvbuf,spaceComm,ier)
287 
288 
289 
290 !This section has been created automatically by the script Abilint (TD).
291 !Do not modify the following lines by hand.
292 #undef ABI_FUNC
293 #define ABI_FUNC 'xmpi_allgather_dp1d'
294 !End of the abilint section
295 
296  implicit none
297 
298 !Arguments-------------------------
299  real(dp), DEV_CONTARRD intent(in) :: xval(:)
300  real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:)
301  integer ,intent(in) :: nelem,spaceComm
302  integer ,intent(out) :: ier
303 
304 ! *************************************************************************
305  ier=0
306 #if defined HAVE_MPI
307  if (spaceComm /= MPI_COMM_SELF .and. spaceComm /= MPI_COMM_NULL) then
308 !  allgather xval on all proc. in spaceComm
309    call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,spaceComm,ier)
310  else if (spaceComm == MPI_COMM_SELF) then
311    recvbuf(1:nelem)=xval(1:nelem)
312  end if
313 #else
314  recvbuf(1:nelem)=xval(1:nelem)
315 #endif
316 end subroutine xmpi_allgather_dp1d

ABINIT/xmpi_allgather_dp2d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather_dp2d

FUNCTION

  Gathers data from all tasks and distributes it to all.
  Target: double precision two-dimensional arrays.

INPUTS

  xval= buffer array
  nelem= number of elements
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  recvbuf= received elements

PARENTS

CHILDREN

      mpi_allgather

SOURCE

345 subroutine xmpi_allgather_dp2d(xval,nelem,recvbuf,spaceComm,ier)
346 
347 
348 
349 !This section has been created automatically by the script Abilint (TD).
350 !Do not modify the following lines by hand.
351 #undef ABI_FUNC
352 #define ABI_FUNC 'xmpi_allgather_dp2d'
353 !End of the abilint section
354 
355  implicit none
356 
357 !Arguments-------------------------
358  real(dp), DEV_CONTARRD intent(in) :: xval(:,:)
359  real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:)
360  integer ,intent(in) :: nelem,spaceComm
361  integer ,intent(out)   :: ier
362 
363 ! *************************************************************************
364  ier=0
365 #if defined HAVE_MPI
366  if (spaceComm /= MPI_COMM_SELF .and. spaceComm /= MPI_COMM_NULL) then
367 !  allgather xval on all proc. in spaceComm
368    call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,spaceComm,ier)
369  else if (spaceComm == MPI_COMM_SELF) then
370    recvbuf(:,:)=xval(:,:)
371  end if
372 #else
373  recvbuf(:,:)=xval(:,:)
374 #endif
375 end subroutine xmpi_allgather_dp2d

ABINIT/xmpi_allgather_dp3d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather_dp3d

FUNCTION

  Gathers data from all tasks and distributes it to all.
  Target: double precision three-dimensional arrays.

INPUTS

  xval= buffer array
  nelem= number of elements
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  recvbuf= received elements

PARENTS

CHILDREN

      mpi_allgather

SOURCE

404 subroutine xmpi_allgather_dp3d(xval,nelem,recvbuf,spaceComm,ier)
405 
406 
407 
408 !This section has been created automatically by the script Abilint (TD).
409 !Do not modify the following lines by hand.
410 #undef ABI_FUNC
411 #define ABI_FUNC 'xmpi_allgather_dp3d'
412 !End of the abilint section
413 
414  implicit none
415 
416 
417 !Arguments-------------------------
418  real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:)
419  real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:)
420  integer ,intent(in) :: nelem,spaceComm
421  integer ,intent(out)   :: ier
422 
423 ! *************************************************************************
424  ier=0
425 #if defined HAVE_MPI
426  if (spaceComm /= MPI_COMM_SELF .and. spaceComm /= MPI_COMM_NULL) then
427 !  allgather xval on all proc. in spaceComm
428    call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,spaceComm,ier)
429  else if (spaceComm == MPI_COMM_SELF) then
430    recvbuf(:,:,:)=xval(:,:,:)
431  end if
432 #else
433  recvbuf(:,:,:)=xval(:,:,:)
434 #endif
435 end subroutine xmpi_allgather_dp3d

ABINIT/xmpi_allgather_dp4d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather_dp4d

FUNCTION

  Gathers data from all tasks and distributes it to all.
  Target: double precision four-dimensional arrays.

INPUTS

  xval= buffer array
  nelem= number of elements
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  recvbuf= received elements

PARENTS

CHILDREN

      mpi_allgather

SOURCE

464 subroutine xmpi_allgather_dp4d(xval,nelem,recvbuf,spaceComm,ier)
465 
466 
467 
468 !This section has been created automatically by the script Abilint (TD).
469 !Do not modify the following lines by hand.
470 #undef ABI_FUNC
471 #define ABI_FUNC 'xmpi_allgather_dp4d'
472 !End of the abilint section
473 
474  implicit none
475 
476 !Arguments-------------------------
477  real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:)
478  real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:)
479  integer ,intent(in) :: nelem,spaceComm
480  integer ,intent(out)   :: ier
481 
482 ! *************************************************************************
483  ier=0
484 #if defined HAVE_MPI
485  if (spaceComm /= MPI_COMM_SELF .and. spaceComm /= MPI_COMM_NULL) then
486 !  allgather xval on all proc. in spaceComm
487    call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,spaceComm,ier)
488  else if (spaceComm == MPI_COMM_SELF) then
489    recvbuf(:,:,:,:)=xval(:,:,:,:)
490  end if
491 #else
492  recvbuf(:,:,:,:)=xval(:,:,:,:)
493 #endif
494 end subroutine xmpi_allgather_dp4d

ABINIT/xmpi_allgather_int [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather_int

FUNCTION

  Gathers data from all tasks and distributes it to all.
  Target: one-dimensional integer arrays.

INPUTS

  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array
  recvbuf= received elements

PARENTS

CHILDREN

      mpi_allgather

SOURCE

46 subroutine xmpi_allgather_int(xval,recvbuf,spaceComm,ier)
47 
48 
49 
50 !This section has been created automatically by the script Abilint (TD).
51 !Do not modify the following lines by hand.
52 #undef ABI_FUNC
53 #define ABI_FUNC 'xmpi_allgather_int'
54 !End of the abilint section
55 
56  implicit none
57 
58 !Arguments-------------------------
59  integer,intent(inout) :: xval
60  integer, DEV_CONTARRD intent(inout) :: recvbuf(:)
61  integer, intent(in) :: spaceComm
62  integer,intent(out) :: ier
63 
64 !Local variables-------------------
65 
66 ! *************************************************************************
67  ier=0
68 #if defined HAVE_MPI
69  if (spaceComm /= MPI_COMM_SELF .and. spaceComm /= MPI_COMM_NULL) then
70 !  allgather xval on all proc. in spaceComm
71    call MPI_ALLGATHER(xval,1,MPI_INTEGER,recvbuf,1,MPI_INTEGER,spaceComm,ier)
72  else if (spaceComm == MPI_COMM_SELF) then
73    recvbuf(1)=xval
74  end if
75 #else
76  recvbuf(1)=xval
77 #endif
78 end subroutine xmpi_allgather_int

ABINIT/xmpi_allgather_int1d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather_int1d

FUNCTION

  Gathers data from all tasks and distributes it to all.
  Target: one-dimensional integer arrays.

INPUTS

  xval= buffer array
  nelem= number of elements
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  recvbuf= received elements

PARENTS

CHILDREN

      mpi_allgather

SOURCE

167 subroutine xmpi_allgather_int1d(xval,nelem,recvbuf,spaceComm,ier)
168 
169 
170 
171 !This section has been created automatically by the script Abilint (TD).
172 !Do not modify the following lines by hand.
173 #undef ABI_FUNC
174 #define ABI_FUNC 'xmpi_allgather_int1d'
175 !End of the abilint section
176 
177  implicit none
178 
179 !Arguments-------------------------
180  integer, DEV_CONTARRD intent(in) :: xval(:)
181  integer, DEV_CONTARRD intent(inout) :: recvbuf(:)
182  integer ,intent(in) :: nelem,spaceComm
183  integer ,intent(out) :: ier
184 
185 ! *************************************************************************
186  ier=0
187 #if defined HAVE_MPI
188  if (spaceComm /= MPI_COMM_SELF .and. spaceComm /= MPI_COMM_NULL) then
189 !  allgather xval on all proc. in spaceComm
190    call MPI_ALLGATHER(xval,nelem,MPI_INTEGER,recvbuf,nelem,MPI_INTEGER,spaceComm,ier)
191  else if (spaceComm == MPI_COMM_SELF) then
192    recvbuf(1:nelem)=xval(1:nelem)
193  end if
194 #else
195  recvbuf(1:nelem)=xval(1:nelem)
196 #endif
197 end subroutine xmpi_allgather_int1d

ABINIT/xmpi_allgather_int2d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_allgather_int2d

FUNCTION

  Gathers data from all tasks and distributes it to all.
  Target: two-dimensional integer arrays.

INPUTS

  xval= buffer array
  nelem= number of elements
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  recvbuf= received elements

PARENTS

CHILDREN

      mpi_allgather

SOURCE

226 subroutine xmpi_allgather_int2d(xval,nelem,recvbuf,spaceComm,ier)
227 
228 
229 
230 !This section has been created automatically by the script Abilint (TD).
231 !Do not modify the following lines by hand.
232 #undef ABI_FUNC
233 #define ABI_FUNC 'xmpi_allgather_int2d'
234 !End of the abilint section
235 
236  implicit none
237 
238 !Arguments-------------------------
239  integer, DEV_CONTARRD intent(in) :: xval(:,:)
240  integer, DEV_CONTARRD intent(inout) :: recvbuf(:,:)
241  integer ,intent(in) :: nelem,spaceComm
242  integer ,intent(out) :: ier
243 
244 ! *************************************************************************
245  ier=0
246 #if defined HAVE_MPI
247  if (spaceComm /= MPI_COMM_SELF .and. spaceComm /= MPI_COMM_NULL) then
248 !  allgather xval on all proc. in spaceComm
249    call MPI_ALLGATHER(xval,nelem,MPI_INTEGER,recvbuf,nelem,MPI_INTEGER,spaceComm,ier)
250  else if (spaceComm == MPI_COMM_SELF) then
251    recvbuf(:,:)=xval(:,:)
252  end if
253 #else
254  recvbuf(:,:)=xval(:,:)
255 #endif
256 end subroutine xmpi_allgather_int2d