SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ btsend()

subroutine btsend ( integer  dtype,
integer  n,
real, dimension(*)  buff,
integer  dest,
integer  msgid 
)

Definition at line 114 of file btprim.f.

115*
116* -- BLACS tester (version 1.0) --
117* University of Tennessee
118* December 15, 1994
119*
120* .. Scalar Arguments ..
121 INTEGER N, DTYPE, DEST, MSGID
122* ..
123* .. Array Arguments ..
124 REAL BUFF(*)
125* ..
126*
127* PURPOSE
128* =======
129* BTSEND: Communication primitive used to send messages independent
130* of the BLACS. May safely be either locally or globally blocking.
131*
132* Arguments
133* =========
134* DTYPE (input) INTEGER
135* Indicates what data type BUFF is (same as PVM):
136* 1 = RAW BYTES
137* 3 = INTEGER
138* 4 = SINGLE PRECISION REAL
139* 6 = DOUBLE PRECISION REAL
140* 5 = SINGLE PRECISION COMPLEX
141* 7 = DOUBLE PRECISION COMPLEX
142*
143* N (input) INTEGER
144* The number of elements of type DTYPE in BUFF.
145*
146* BUFF (input) accepted as INTEGER array
147* The array to be communicated. Its true data type is
148* indicated by DTYPE.
149*
150* DEST (input) INTEGER
151* The destination of the message.
152*
153* MSGID (input) INTEGER
154* The message ID (AKA message tag or type).
155*
156* =====================================================================
157* .. External Functions ..
158 INTEGER IBTMYPROC, IBTNPROCS, IBTSIZEOF
159 EXTERNAL ibtmyproc, ibtnprocs, ibtsizeof
160* ..
161* .. Local Scalars ..
162 INTEGER I, IAM, MPIDTYPE
163* ..
164* .. Include Files ..
165 include 'mpif.h'
166* ..
167* .. Common Blocks ..
168 COMMON /btmpi/ btcomm, ierr
169 INTEGER BTCOMM, IERR
170*
171 IF( dtype .EQ. 1 ) THEN
172 mpidtype = mpi_byte
173 ELSE IF( dtype .EQ. 3 ) THEN
174 mpidtype = mpi_integer
175 ELSE IF( dtype .EQ. 4 ) THEN
176 mpidtype = mpi_real
177 ELSE IF( dtype .EQ. 5 ) THEN
178 mpidtype = mpi_complex
179 ELSE IF( dtype .EQ. 6 ) THEN
180 mpidtype = mpi_double_precision
181 ELSE IF( dtype .EQ. 7 ) THEN
182 mpidtype = mpi_double_complex
183 END IF
184*
185* Send the message
186*
187 IF( dest .EQ. -1 ) THEN
188 iam = ibtmyproc()
189 DO 10 i = 0, ibtnprocs()-1
190 IF( i .NE. iam ) THEN
191 CALL mpi_send(buff, n, mpidtype, i, 0, btcomm, ierr)
192 IF (ierr.NE.0) CALL btmpierr("MPI_SEND", ierr)
193 END IF
194 10 CONTINUE
195 ELSE
196 CALL mpi_send(buff, n, mpidtype, dest, 0, btcomm, ierr)
197 IF (ierr.NE.0) CALL btmpierr("MPI_SEND", ierr)
198 END IF
199*
200 RETURN
201*
202* End BTSEND
203*
subroutine btmpierr(rout, ierr0)
Definition btprim.f:362
integer function ibtnprocs()
Definition btprim.f:81
integer function ibtmyproc()
Definition btprim.f:47
integer function ibtsizeof(type)
Definition btprim.f:286
Here is the call graph for this function:
Here is the caller graph for this function: