TABLE OF CONTENTS
- ABINIT/xmpi_max_dp0d_ip
- ABINIT/xmpi_max_dpv
- ABINIT/xmpi_max_int
- ABINIT/xmpi_max_int0d_i4b
- ABINIT/xmpi_max_int0d_i8b
- ABINIT/xmpi_max_int0d_ip
- ABINIT/xmpi_max_int1d_ip
ABINIT/xmpi_max_dp0d_ip [ Functions ]
NAME
xmpi_max_dp0d_ip
FUNCTION
Combines values from all processes and distribute the result back to all processes. Target: scalar double precisions. In place operation
INPUTS
comm= MPI communicator
OUTPUT
ier= exit status, a non-zero value meaning there is an error
SIDE EFFECTS
xval= in input: the value on the local processor in output: the maximum inside the given communicator.
SOURCE
246 subroutine xmpi_max_dp0d_ip(ioval,comm,ier) 247 248 !Arguments------------------------- 249 real(dp),intent(inout) :: ioval 250 integer ,intent(in) :: comm 251 integer ,intent(out) :: ier 252 253 !Local variables------------------- 254 #if defined HAVE_MPI 255 real(dp) :: arr_xmax(1) 256 #endif 257 258 ! ************************************************************************* 259 260 ier=0 261 #if defined HAVE_MPI 262 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then 263 call MPI_ALLREDUCE([ioval],arr_xmax,1,MPI_DOUBLE_PRECISION,MPI_MAX,comm,ier) 264 ioval = arr_xmax(1) 265 end if 266 #endif 267 268 end subroutine xmpi_max_dp0d_ip
ABINIT/xmpi_max_dpv [ Functions ]
NAME
xmpi_max_dpv
FUNCTION
Combines values from all processes and distribute the result back to all processes. Target: scalar double precisions.
INPUTS
comm= MPI communicator
OUTPUT
ier= exit status, a non-zero value meaning there is an error
SIDE EFFECTS
xval= buffer array xmax= number of elements in send buffer
SOURCE
147 subroutine xmpi_max_dpv(xval,xmax,comm,ier) 148 149 !Arguments------------------------- 150 real(dp),intent(in) :: xval 151 real(dp),intent(out) :: xmax 152 integer ,intent(in) :: comm 153 integer ,intent(out) :: ier 154 155 !Local variables------------------- 156 #if defined HAVE_MPI 157 real(dp) :: arr_xmax(1) 158 #endif 159 160 ! ************************************************************************* 161 162 ier=0 163 #if defined HAVE_MPI 164 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then 165 call MPI_ALLREDUCE([xval],arr_xmax,1,MPI_DOUBLE_PRECISION,MPI_MAX,comm,ier) 166 xmax=arr_xmax(1) 167 else 168 #endif 169 xmax=xval 170 #if defined HAVE_MPI 171 end if 172 #endif 173 174 end subroutine xmpi_max_dpv
ABINIT/xmpi_max_int [ Functions ]
NAME
xmpi_max_int
SOURCE
98 subroutine xmpi_max_int(xval,xmax,comm,ier) 99 100 !Arguments------------------------- 101 integer, DEV_CONTARRD intent(in) :: xval(:) 102 integer, DEV_CONTARRD intent(out):: xmax(:) 103 integer ,intent(in) :: comm 104 integer ,intent(out) :: ier 105 106 !Local variables------------------- 107 integer :: s1 108 109 ! ************************************************************************* 110 ier=0 111 s1 =SIZE(xval) 112 #if defined HAVE_MPI 113 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then 114 call MPI_ALLREDUCE(xval,xmax,s1,MPI_INTEGER,MPI_MAX,comm,ier) 115 else 116 #endif 117 xmax=xval 118 #if defined HAVE_MPI 119 end if 120 #endif 121 122 end subroutine xmpi_max_int
ABINIT/xmpi_max_int0d_i4b [ Functions ]
NAME
xmpi_max_int0d_i4b
FUNCTION
This module contains functions that calls MPI routine, if we compile the code using the MPI CPP flags. xmpi_max is the generic function.
COPYRIGHT
Copyright (C) 2001-2024 ABINIT group (AR,XG,MB) This file is distributed under the terms of the GNU General Public License, see ~ABINIT/COPYING or http://www.gnu.org/copyleft/gpl.txt .
CHILDREN
mpi_allreduce
SOURCE
22 subroutine xmpi_max_int0d_i4b(xval,xmax,comm,ier) 23 24 !Arguments------------------------- 25 integer ,intent(in) :: xval 26 integer, intent(out) :: xmax 27 integer ,intent(in) :: comm 28 integer ,intent(out) :: ier 29 30 !Local variables------------------- 31 #if defined HAVE_MPI 32 integer :: arr_xmax(1) 33 #endif 34 35 ! ************************************************************************* 36 ier=0 37 #if defined HAVE_MPI 38 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then 39 call MPI_ALLREDUCE([xval],arr_xmax,1,MPI_INTEGER,MPI_MAX,comm,ier) 40 xmax=arr_xmax(1) 41 else 42 #endif 43 xmax=xval 44 #if defined HAVE_MPI 45 end if 46 #endif 47 48 end subroutine xmpi_max_int0d_i4b
ABINIT/xmpi_max_int0d_i8b [ Functions ]
NAME
xmpi_max_int0d_i8b
FUNCTION
CHILDREN
mpi_allreduce
SOURCE
63 subroutine xmpi_max_int0d_i8b(xval,xmax,comm,ier) 64 65 !Arguments------------------------- 66 integer(i8b) ,intent(in) :: xval 67 integer(i8b), intent(out) :: xmax 68 integer ,intent(in) :: comm 69 integer ,intent(out) :: ier 70 71 !Local variables------------------- 72 #if defined HAVE_MPI 73 integer :: arr_xmax(1) 74 #endif 75 76 ! ************************************************************************* 77 ier=0 78 #if defined HAVE_MPI 79 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then 80 call MPI_ALLREDUCE([xval],arr_xmax,1,MPI_INTEGER8,MPI_MAX,comm,ier) 81 xmax=arr_xmax(1) 82 else 83 #endif 84 xmax=xval 85 #if defined HAVE_MPI 86 end if 87 #endif 88 89 end subroutine xmpi_max_int0d_i8b
ABINIT/xmpi_max_int0d_ip [ Functions ]
NAME
xmpi_max_int0d_ip
FUNCTION
Combines values from all processes and distribute the result back to all processes. Target: scalar integer. In place operation
INPUTS
comm= MPI communicator
OUTPUT
ier= exit status, a non-zero value meaning there is an error
SIDE EFFECTS
xval= in input: the value on the local processor in output: the maximum inside the given communicator.
SOURCE
199 subroutine xmpi_max_int0d_ip(ioval,comm,ier) 200 201 !Arguments------------------------- 202 integer ,intent(inout) :: ioval 203 integer ,intent(in) :: comm 204 integer ,intent(out) :: ier 205 206 !Local variables------------------- 207 #if defined HAVE_MPI 208 integer :: arr_xmax(1) 209 #endif 210 211 ! ************************************************************************* 212 213 ier=0 214 #if defined HAVE_MPI 215 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then 216 call MPI_ALLREDUCE([ioval],arr_xmax,1,MPI_INTEGER,MPI_MAX,comm,ier) 217 ioval = arr_xmax(1) 218 end if 219 #endif 220 221 end subroutine xmpi_max_int0d_ip
ABINIT/xmpi_max_int1d_ip [ Functions ]
NAME
xmpi_max_int1d_ip
FUNCTION
Combines values from all processes and distribute the result back to all processes. Target: 1d integer vector. In place operation
INPUTS
comm= MPI communicator
OUTPUT
ier= exit status, a non-zero value meaning there is an error
SIDE EFFECTS
xval= in input: the value on the local processor in output: the maximum inside the given communicator.
SOURCE
293 subroutine xmpi_max_int1d_ip(ioval, comm, ier) 294 295 !Arguments------------------------- 296 integer, intent(inout) :: ioval(:) 297 integer ,intent(in) :: comm 298 integer ,intent(out) :: ier 299 300 !Local variables------------------- 301 #if defined HAVE_MPI 302 integer :: xmax(size(ioval)) 303 #endif 304 305 ! ************************************************************************* 306 307 ier=0 308 #if defined HAVE_MPI 309 if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then 310 call MPI_ALLREDUCE(ioval,xmax,size(ioval),MPI_INTEGER,MPI_MAX,comm,ier) 311 ioval = xmax 312 end if 313 #endif 314 315 end subroutine xmpi_max_int1d_ip