LCOV - code coverage report
Current view: top level - shared/common/src/12_hide_mpi - xmpi_iallgather.finc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 9 0
Test Date: 2026-09-21 22:40:37 Functions: 0.0 % 1 0

            Line data    Source code
       1              : !{\src2tex{textfont=tt}}
       2              : !!****f* ABINIT/xmpi_iallgather
       3              : !! NAME
       4              : !!  xmpi_iallgather
       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_iallgather is the generic function.
      10              : !!
      11              : !! COPYRIGHT
      12              : !!  Copyright (C) 2001-2026 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_iallgather_dp4d
      22              : !! NAME
      23              : !!  xmpi_iallgather_dp4d
      24              : !!
      25              : !! FUNCTION
      26              : !!  Gathers data from all tasks and distributes it to all. Non-blocking version
      27              : !!  Target: double precision four-dimensional arrays.
      28              : !!
      29              : !! INPUTS
      30              : !!  xval= buffer array
      31              : !!  nelem= number of elements
      32              : !!  comm= MPI communicator
      33              : !!
      34              : !! OUTPUT
      35              : !!  ierr= exit status, a non-zero value meaning there is an error
      36              : !!  request: MPI request
      37              : !!
      38              : !! SIDE EFFECTS
      39              : !!  recvbuf= received elements
      40              : !!
      41              : !! SOURCE
      42              : 
      43            0 : subroutine xmpi_iallgather_dp4d(xval, nelem, recvbuf, comm, request)
      44              : 
      45              : !Arguments-------------------------
      46              :  real(dp) ABI_ASYNC, intent(in) :: xval(:,:,:,:)
      47              :  real(dp) ABI_ASYNC, intent(inout) :: recvbuf(:,:,:,:)
      48              :  integer ,intent(in) :: nelem,comm
      49              :  integer,intent(out) :: request
      50              : 
      51              : !Local variables-------------------
      52              :  integer :: ierr
      53              : 
      54              : ! *************************************************************************
      55            0 :  ierr = 0
      56              : 
      57              : #ifdef HAVE_MPI_IALLGATHER
      58              :  ! Requires MPI3
      59            0 :  if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then
      60            0 :    call MPI_IALLGATHER(xval, nelem, MPI_DOUBLE_PRECISION, recvbuf, nelem, MPI_DOUBLE_PRECISION, comm, request, ierr)
      61            0 :    xmpi_count_requests = xmpi_count_requests + 1
      62            0 :  else if (comm == MPI_COMM_SELF) then
      63            0 :    recvbuf = xval
      64            0 :    request = xmpi_request_null
      65              :  end if
      66            0 :  return
      67              : #endif
      68              : 
      69              :  ! Call the blocking version and return null request.
      70              :  ! write(*,*)"will block here and return fake request"
      71              :  call xmpi_allgather(xval, nelem, recvbuf, comm, ierr)
      72              :  request = xmpi_request_null
      73              : 
      74              : end subroutine xmpi_iallgather_dp4d
      75              : !!***
        

Generated by: LCOV version 2.3-1