OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_iallreduce_int_comm.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| spmd_iallreduce_int_comm ../engine/source/mpi/generic/spmd_iallreduce_int_comm.F
25!||--- called by ------------------------------------------------------
26!|| spmd_get_inacti_global ../engine/source/mpi/interfaces/spmd_get_inacti_global.F
27!||--- calls -----------------------------------------------------
28!||====================================================================
29 SUBROUTINE spmd_iallreduce_int_comm(VALUE,RES,MY_SIZE,MY_OPERATION,MY_COMM,MY_REQUEST)
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
72 END SUBROUTINE spmd_iallreduce_int_comm
73! ----------------------------------------
74! ----------------------------------------
75
subroutine spmd_iallreduce_int_comm(value, res, my_size, my_operation, my_comm, my_request)