1!{\src2tex{textfont=tt}}
2!!****f* ABINIT/xmpi_ialltoall
3!! NAME
4!!  xmpi_ialltoall
5!!
6!! FUNCTION
7!!  This module contains functions that calls MPI routine,
8!!  if we compile the code using the MPI CPP flags.
9!!  xmpi_ialltoall is the generic function.
10!!
11!! COPYRIGHT
12!!  Copyright (C) 2001-2016 ABINIT group (MG)
13!!  This file is distributed under the terms of the
14!!  GNU General Public License, see ~ABINIT/COPYING
15!!  or http://www.gnu.org/copyleft/gpl.txt .
16!!
17!! SOURCE
18
19!!***
20
21!!****f* ABINIT/xmpi_ialltoall_dp4d
22!! NAME
23!!  xmpi_ialltoall_dp4d
24!!
25!! FUNCTION
26!!  Sends data from all to all processes.
27!!  Target: double precision four-dimensional arrays.
28!!  Non-blocking version.
29!!
30!! INPUTS
31!!
32!! OUTPUT
33!!
34!! PARENTS
35!!
36!! CHILDREN
37!!      mpi_alltoall
38!!
39!! SOURCE
40
41subroutine xmpi_ialltoall_dp4d(xval, sendsize, recvbuf, recvsize, comm, request)
42
43!This section has been created automatically by the script Abilint (TD).
44!Do not modify the following lines by hand.
45#undef ABI_FUNC
46#define ABI_FUNC 'xmpi_alltoall_dp4d'
47!End of the abilint section
48
49 implicit none
50
51!Arguments-------------------------
52 real(dp) ABI_ASYNC, intent(in) :: xval(:,:,:,:)
53 real(dp) ABI_ASYNC, intent(inout) :: recvbuf(:,:,:,:)
54 integer,intent(in) :: sendsize,recvsize,comm
55 integer,intent(out) :: request
56
57!Local variables-------------------
58 integer :: ierr
59
60! *************************************************************************
61
62#ifdef HAVE_MPI_IALLTOALL
63 ! Requires MPI3
64 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then
65   call MPI_IALLTOALL(&
66&    xval,   sendsize, MPI_DOUBLE_PRECISION,&
67&    recvbuf,recvsize, MPI_DOUBLE_PRECISION, comm, request, ierr)
68   return
69 end if
70 return
71#endif
72
73 ! Call the blocking version and return null request.
74 ! write(*,*)"will block here and return fake request"
75 call xmpi_alltoall(xval, sendsize, recvbuf, recvsize, comm, ierr)
76 request = xmpi_request_null
77
78end subroutine xmpi_ialltoall_dp4d
79!!***
80