Skip to content

Commit 655afb9

Browse files
authored
Merge pull request #10119 from hppritcha/topic/fortran_elemental_v41x
v4.1.x: FORTRAN:add elemental attribute to handle compars
2 parents 21a2855 + a971c56 commit 655afb9

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

NEWS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ included in the vX.Y.Z section and be denoted as:
6161
4.1.3 -- March, 2022
6262
--------------------
6363

64-
- Minor datatype performance improvements in the CUDA-based code paths.q
64+
- Added support for ELEMENTAL to the MPI handle comparison functions
65+
in the mpi_f08 module. Thanks to Salvatore Filippone for raising
66+
the issue.
67+
- Minor datatype performance improvements in the CUDA-based code paths.
6568
- Fix MPI_ALLTOALLV when used with MPI_IN_PLACE.
6669
- Fix MPI_BOTTOM handling for non-blocking collectives. Thanks to
6770
Lisandro Dalcin for reporting the problem.

ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-types.F90

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -240,104 +240,104 @@ module mpi_f08_types
240240

241241
!... .EQ. operator
242242
!-----------------
243-
logical function ompi_comm_op_eq(a, b)
243+
elemental logical function ompi_comm_op_eq(a, b)
244244
type(MPI_Comm), intent(in) :: a, b
245245
ompi_comm_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
246246
end function ompi_comm_op_eq
247247

248-
logical function ompi_datatype_op_eq(a, b)
248+
elemental logical function ompi_datatype_op_eq(a, b)
249249
type(MPI_Datatype), intent(in) :: a, b
250250
ompi_datatype_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
251251
end function ompi_datatype_op_eq
252252

253-
logical function ompi_errhandler_op_eq(a, b)
253+
elemental logical function ompi_errhandler_op_eq(a, b)
254254
type(MPI_Errhandler), intent(in) :: a, b
255255
ompi_errhandler_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
256256
end function ompi_errhandler_op_eq
257257

258-
logical function ompi_file_op_eq(a, b)
258+
elemental logical function ompi_file_op_eq(a, b)
259259
type(MPI_File), intent(in) :: a, b
260260
ompi_file_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
261261
end function ompi_file_op_eq
262262

263-
logical function ompi_group_op_eq(a, b)
263+
elemental logical function ompi_group_op_eq(a, b)
264264
type(MPI_Group), intent(in) :: a, b
265265
ompi_group_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
266266
end function ompi_group_op_eq
267267

268-
logical function ompi_info_op_eq(a, b)
268+
elemental logical function ompi_info_op_eq(a, b)
269269
type(MPI_Info), intent(in) :: a, b
270270
ompi_info_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
271271
end function ompi_info_op_eq
272272

273-
logical function ompi_message_op_eq(a, b)
273+
elemental logical function ompi_message_op_eq(a, b)
274274
type(MPI_Message), intent(in) :: a, b
275275
ompi_message_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
276276
end function ompi_message_op_eq
277277

278-
logical function ompi_op_op_eq(a, b)
278+
elemental logical function ompi_op_op_eq(a, b)
279279
type(MPI_Op), intent(in) :: a, b
280280
ompi_op_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
281281
end function ompi_op_op_eq
282282

283-
logical function ompi_request_op_eq(a, b)
283+
elemental logical function ompi_request_op_eq(a, b)
284284
type(MPI_Request), intent(in) :: a, b
285285
ompi_request_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
286286
end function ompi_request_op_eq
287287

288-
logical function ompi_win_op_eq(a, b)
288+
elemental logical function ompi_win_op_eq(a, b)
289289
type(MPI_Win), intent(in) :: a, b
290290
ompi_win_op_eq = (a%MPI_VAL .EQ. b%MPI_VAL)
291291
end function ompi_win_op_eq
292292

293293
!... .NE. operator
294294
!-----------------
295-
logical function ompi_comm_op_ne(a, b)
295+
elemental logical function ompi_comm_op_ne(a, b)
296296
type(MPI_Comm), intent(in) :: a, b
297297
ompi_comm_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
298298
end function ompi_comm_op_ne
299299

300-
logical function ompi_datatype_op_ne(a, b)
300+
elemental logical function ompi_datatype_op_ne(a, b)
301301
type(MPI_Datatype), intent(in) :: a, b
302302
ompi_datatype_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
303303
end function ompi_datatype_op_ne
304304

305-
logical function ompi_errhandler_op_ne(a, b)
305+
elemental logical function ompi_errhandler_op_ne(a, b)
306306
type(MPI_Errhandler), intent(in) :: a, b
307307
ompi_errhandler_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
308308
end function ompi_errhandler_op_ne
309309

310-
logical function ompi_file_op_ne(a, b)
310+
elemental logical function ompi_file_op_ne(a, b)
311311
type(MPI_File), intent(in) :: a, b
312312
ompi_file_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
313313
end function ompi_file_op_ne
314314

315-
logical function ompi_group_op_ne(a, b)
315+
elemental logical function ompi_group_op_ne(a, b)
316316
type(MPI_Group), intent(in) :: a, b
317317
ompi_group_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
318318
end function ompi_group_op_ne
319319

320-
logical function ompi_info_op_ne(a, b)
320+
elemental logical function ompi_info_op_ne(a, b)
321321
type(MPI_Info), intent(in) :: a, b
322322
ompi_info_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
323323
end function ompi_info_op_ne
324324

325-
logical function ompi_message_op_ne(a, b)
325+
elemental logical function ompi_message_op_ne(a, b)
326326
type(MPI_Message), intent(in) :: a, b
327327
ompi_message_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
328328
end function ompi_message_op_ne
329329

330-
logical function ompi_op_op_ne(a, b)
330+
elemental logical function ompi_op_op_ne(a, b)
331331
type(MPI_Op), intent(in) :: a, b
332332
ompi_op_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
333333
end function ompi_op_op_ne
334334

335-
logical function ompi_request_op_ne(a, b)
335+
elemental logical function ompi_request_op_ne(a, b)
336336
type(MPI_Request), intent(in) :: a, b
337337
ompi_request_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
338338
end function ompi_request_op_ne
339339

340-
logical function ompi_win_op_ne(a, b)
340+
elemental logical function ompi_win_op_ne(a, b)
341341
type(MPI_Win), intent(in) :: a, b
342342
ompi_win_op_ne = (a%MPI_VAL .NE. b%MPI_VAL)
343343
end function ompi_win_op_ne

0 commit comments

Comments
 (0)