TABLE OF CONTENTS
ABINIT/xmpi_iallgather [ Functions ]
NAME
xmpi_iallgather
FUNCTION
This module contains functions that calls MPI routine, if we compile the code using the MPI CPP flags. xmpi_iallgather 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_iallgather_dp4d [ Functions ]
NAME
xmpi_iallgather_dp4d
FUNCTION
Gathers data from all tasks and distributes it to all. Non-blocking version Target: double precision four-dimensional arrays.
INPUTS
xval= buffer array nelem= number of elements comm= MPI communicator
OUTPUT
ierr= exit status, a non-zero value meaning there is an error request: MPI request
SIDE EFFECTS
recvbuf= received elements
PARENTS
CHILDREN
mpi_allgather
SOURCE
48 subroutine xmpi_iallgather_dp4d(xval, nelem, recvbuf, comm, request) 49 50 !Arguments------------------------- 51 real(dp) ABI_ASYNC, intent(in) :: xval(:,:,:,:) 52 real(dp) ABI_ASYNC, intent(inout) :: recvbuf(:,:,:,:) 53 integer ,intent(in) :: nelem,comm 54 integer,intent(out) :: request 55 56 !Local variables------------------- 57 integer :: ierr 58 59 ! ************************************************************************* 60 ierr = 0 61 62 #ifdef HAVE_MPI_IALLGATHER 63 ! Requires MPI3 64 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then 65 call MPI_IALLGATHER(xval, nelem, MPI_DOUBLE_PRECISION, recvbuf, nelem, MPI_DOUBLE_PRECISION, comm, request, ierr) 66 xmpi_count_requests = xmpi_count_requests + 1 67 else if (comm == MPI_COMM_SELF) then 68 recvbuf = xval 69 request = xmpi_request_null 70 end if 71 return 72 #endif 73 74 ! Call the blocking version and return null request. 75 ! write(*,*)"will block here and return fake request" 76 call xmpi_allgather(xval, nelem, recvbuf, comm, ierr) 77 request = xmpi_request_null 78 79 end subroutine xmpi_iallgather_dp4d