OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_init_idel.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/.
23C
24!||====================================================================
25!|| spmd_init_idel ../engine/source/mpi/interfaces/spmd_init_idel.F
26!||--- called by ------------------------------------------------------
27!|| chkload ../engine/source/interfaces/chkload.F
28!|| chkstfn3n ../engine/source/interfaces/interf/chkstfn3.F
29!||--- calls -----------------------------------------------------
30!||--- uses -----------------------------------------------------
31!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
32!||====================================================================
33 SUBROUTINE spmd_init_idel(NINDEX,IRSIZE, IRECV,IAD_ELEM)
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
97 END
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
subroutine spmd_init_idel(nindex, irsize, irecv, iad_elem)