TABLE OF CONTENTS


ABINIT/xmpi_ialltoall [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_ialltoall

FUNCTION

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

COPYRIGHT

  Copyright (C) 2001-2024 ABINIT group (MG)
  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_ialltoall_dp4d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_ialltoall_dp4d

FUNCTION

  Sends data from all to all processes.
  Target: double precision four-dimensional arrays.
  Non-blocking version.

INPUTS

OUTPUT

PARENTS

CHILDREN

      mpi_alltoall

SOURCE

41 subroutine xmpi_ialltoall_dp4d(xval, sendsize, recvbuf, recvsize, comm, request)
42 
43 !Arguments-------------------------
44  real(dp) ABI_ASYNC, intent(in) :: xval(:,:,:,:)
45  real(dp) ABI_ASYNC, intent(inout) :: recvbuf(:,:,:,:)
46  integer,intent(in) :: sendsize,recvsize,comm
47  integer,intent(out) :: request
48 
49 !Local variables-------------------
50  integer :: ierr
51 
52 ! *************************************************************************
53 
54 #ifdef HAVE_MPI_IALLTOALL
55  ! Requires MPI3
56  if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then
57    call MPI_IALLTOALL(&
58      xval,   sendsize, MPI_DOUBLE_PRECISION,&
59      recvbuf,recvsize, MPI_DOUBLE_PRECISION, comm, request, ierr) 
60    xmpi_count_requests = xmpi_count_requests + 1
61    return
62  end if
63  return
64 #endif
65 
66  ! Call the blocking version and return null request.
67  ! write(*,*)"will block here and return fake request"
68  call xmpi_alltoall(xval, sendsize, recvbuf, recvsize, comm, ierr)
69  request = xmpi_request_null
70 
71 end subroutine xmpi_ialltoall_dp4d