OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_iallreduce_int_comm.F File Reference
#include "implicit_f.inc"
#include "spmd.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_iallreduce_int_comm (value, res, my_size, my_operation, my_comm, my_request)

Function/Subroutine Documentation

◆ spmd_iallreduce_int_comm()

subroutine spmd_iallreduce_int_comm ( integer, dimension(my_size), intent(in) value,
integer, dimension(my_size), intent(out) res,
integer, intent(in) my_size,
character(len=4), intent(in) my_operation,
integer, intent(in) my_comm,
integer, intent(in) my_request )

Definition at line 29 of file spmd_iallreduce_int_comm.F.

30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------------------------
35C M e s s a g e P a s s i n g
36C-----------------------------------------------
37#include "spmd.inc"
38C-----------------------------------------------
39C D u m m y A r g u m e n t s
40C-----------------------------------------------
41 CHARACTER(len=4), INTENT(in) :: MY_OPERATION
42 INTEGER, INTENT(in) :: MY_SIZE,MY_COMM,MY_REQUEST
43 INTEGER, DIMENSION(MY_SIZE), INTENT(in) :: VALUE
44 INTEGER, DIMENSION(MY_SIZE), INTENT(out) :: RES
45
46#ifdef MPI
47C-----------------------------------------------
48C L o c a l V a r i a b l e s
49C-----------------------------------------------
50 INTEGER :: error
51 INTEGER :: MPI_OPERATION
52! ----------------------------------------
53
54 IF(my_operation(1:3)=="SUM") THEN
55 mpi_operation=mpi_sum
56 ELSEIF(my_operation(1:4)=="PROD") THEN
57 mpi_operation=mpi_prod
58 ELSEIF(my_operation(1:3)=="MAX") THEN
59 mpi_operation=mpi_max
60 ELSEIF(my_operation(1:3)=="MIN") THEN
61 mpi_operation=mpi_min
62 ENDIF
63
64! ------------------
65! mpi comm iallreduce
66 CALL mpi_iallreduce(VALUE,res,my_size,mpi_integer,mpi_operation,my_comm,my_request,error)
67! ------------------
68#else
69 res = 0
70#endif
71 RETURN