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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_get_inacti_global (ipari, nb_inter_sorted, list_inter_sorted, inter_struct)

Function/Subroutine Documentation

◆ spmd_get_inacti_global()

subroutine spmd_get_inacti_global ( integer, dimension(npari,ninter), intent(inout) ipari,
integer, intent(in) nb_inter_sorted,
integer, dimension(nb_inter_sorted), intent(in) list_inter_sorted,
type(inter_struct_type), dimension(ninter), intent(inout) inter_struct )

Definition at line 33 of file spmd_get_inacti_global.F.

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
subroutine mpi_wait(ireq, status, ierr)
Definition mpi.f:525
integer, dimension(:), allocatable list_inter_7_inacti
subroutine spmd_iallreduce_int_comm(value, res, my_size, my_operation, my_comm, my_request)