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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_init_idel (nindex, irsize, irecv, iad_elem)

Function/Subroutine Documentation

◆ spmd_init_idel()

subroutine spmd_init_idel ( integer nindex,
integer irsize,
integer, dimension(*) irecv,
integer, dimension(2,nspmd+1), intent(in) iad_elem )

Definition at line 33 of file spmd_init_idel.F.

34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37 USE spmd_comm_world_mod, ONLY : spmd_comm_world
38#include "implicit_f.inc"
39C-----------------------------------------------------------------
40C M e s s a g e P a s s i n g
41C-----------------------------------------------
42#include "spmd.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "task_c.inc"
47#include "com01_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER NINDEX, IRSIZE, IRECV(*)
52 INTEGER, DIMENSION(2,NSPMD+1), INTENT(in) :: IAD_ELEM
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56#ifdef MPI
57 INTEGER MSGOFF, MSGTYP, LOC_PROC,IERROR,I,
58 . REQ_S(NSPMD),STATUS(MPI_STATUS_SIZE)
59 INTEGER :: SIZ
60 DATA msgoff/106/
61C-----------------------------------------------
62 loc_proc = ispmd+1
63 DO i = 1, nspmd
64 siz = (iad_elem(1,i+1)-iad_elem(1,i))
65 IF(i.NE.loc_proc.AND.siz>0) THEN
66 msgtyp = msgoff
67 CALL mpi_isend(
68 c nindex,1,mpi_integer,it_spmd(i),msgtyp,
69 g spmd_comm_world,req_s(i),ierror)
70 ENDIF
71 ENDDO
72 irsize = 0
73 DO i = 1, nspmd
74 siz = (iad_elem(1,i+1)-iad_elem(1,i))
75 IF(i.NE.loc_proc.AND.siz>0) THEN
76 msgtyp = msgoff
77 CALL mpi_recv(
78 . irecv(i),1,mpi_integer,it_spmd(i),msgtyp,
79 . spmd_comm_world,status,ierror)
80 irsize = irsize + irecv(i)
81 ELSE
82 irecv(i) = 0
83 ENDIF
84 ENDDO
85C
86C Test reception envoi NINDEX
87C
88 DO i = 1, nspmd
89 siz = (iad_elem(1,i+1)-iad_elem(1,i))
90 IF(i.NE.loc_proc.AND.siz>0) THEN
91 CALL mpi_wait(req_s(i),status,ierror)
92 ENDIF
93 ENDDO
94C
95#endif
96 RETURN
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
Definition mpi.f:382
subroutine mpi_wait(ireq, status, ierr)
Definition mpi.f:525