OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_get_inacti_global.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_get_inacti_global ../engine/source/mpi/interfaces/spmd_get_inacti_global.F
25!||--- called by ------------------------------------------------------
26!|| inttri ../engine/source/interfaces/intsort/inttri.F
27!||--- calls -----------------------------------------------------
28!|| spmd_iallreduce_int_comm ../engine/source/mpi/generic/spmd_iallreduce_int_comm.F
29!||--- uses -----------------------------------------------------
30!|| inter_sorting_mod ../engine/share/modules/inter_sorting_mod.F
31!|| inter_struct_mod ../engine/share/modules/inter_struct_mod.F
32!||====================================================================
33 SUBROUTINE spmd_get_inacti_global(IPARI,NB_INTER_SORTED,LIST_INTER_SORTED,INTER_STRUCT)
34
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C M e s s a g e P a s s i n g
43C-----------------------------------------------
44#include "spmd.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com04_c.inc"
49#include "param_c.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 INTEGER,DIMENSION(NPARI,NINTER), INTENT(inout) :: IPARI
54 INTEGER, INTENT(in) :: NB_INTER_SORTED ! number of interfaces that need to be sorted
55 INTEGER, DIMENSION(NB_INTER_SORTED), INTENT(in) :: LIST_INTER_SORTED ! list of interfaces that need to be sorted
56 TYPE(inter_struct_type), DIMENSION(NINTER), INTENT(inout) :: INTER_STRUCT ! structure for interface
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60#ifdef MPI
61 INTEGER :: I,N,N_BUFFER
62 INTEGER, DIMENSION(NB_INTER_7_INACTI) :: S_BUFFER
63 INTEGER, DIMENSION(NB_INTER_7_INACTI) :: R_BUFFER
64 CHARACTER(len=4) :: MY_OPERATION
65 INTEGER :: CODE
66 INTEGER :: STATUT(MPI_STATUS_SIZE)
67C-----------------------------------------------
68 IF(nb_inter_7_inacti>0) THEN
69 s_buffer(1:nb_inter_7_inacti) = 1
70 r_buffer(1:nb_inter_7_inacti) = 0
71 ENDIF
72 DO i=1,nb_inter_sorted
73 n = list_inter_sorted(i)
74 n_buffer = list_inter_7_inacti(n)
75 IF(n_buffer>0) THEN
76 IF(inter_struct(n)%INACTI<0) s_buffer( n_buffer ) = 0
77 ENDIF
78 ENDDO
79
80 my_operation(1:4) =''
81 my_operation ="SUM"
82
83 CALL spmd_iallreduce_int_comm(s_buffer,r_buffer,nb_inter_7_inacti,
84 . my_operation,comm_inacti,request_inacti)
85
86 CALL mpi_wait(request_inacti,statut,code)
87
88 IF(nb_inter_sorted>0) THEN
89 DO i=1,nb_inter_sorted
90 n = list_inter_sorted(i)
91 n_buffer = list_inter_7_inacti(n)
92 IF(n_buffer>0) THEN
93 IF (r_buffer(n_buffer)/=0) THEN
94 inter_struct(n)%INACTI=ipari(22,n)
95 ELSE
96 inter_struct(n)%INACTI=-abs(ipari(22,n))
97 END IF
98 ipari(22,n) = inter_struct(n)%INACTI
99 ENDIF
100 ENDDO
101 ENDIF
102C
103#endif
104 RETURN
105 END SUBROUTINE spmd_get_inacti_global
subroutine mpi_wait(ireq, status, ierr)
Definition mpi.f:525
integer, dimension(:), allocatable list_inter_7_inacti
subroutine spmd_get_inacti_global(ipari, nb_inter_sorted, list_inter_sorted, inter_struct)
subroutine spmd_iallreduce_int_comm(value, res, my_size, my_operation, my_comm, my_request)