OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_frwall_nn.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_frwall_nn ../engine/source/mpi/kinematic_conditions/spmd_frwall_nn.F
26!||--- called by ------------------------------------------------------
27!|| sms_build_diag ../engine/source/ams/sms_build_diag.F
28!|| sms_ini_kin_1 ../engine/source/ams/sms_init.F
29!||--- calls -----------------------------------------------------
30!||--- uses -----------------------------------------------------
31!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
32!||====================================================================
33 SUBROUTINE spmd_frwall_nn(FR_WALL,IWADD)
34C
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38 USE spmd_comm_world_mod, ONLY : spmd_comm_world
39#include "implicit_f.inc"
40C-----------------------------------------------------------------
41C M e s s a g e P a s s i n g
42C-----------------------------------------------
43#include "spmd.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "com01_c.inc"
48#include "task_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER FR_WALL(NSPMD+2), IWADD
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56#ifdef MPI
57 INTEGER MSGOFF,MSGOFF2,MSGTYP,INFO,P,PMAIN, LOC_PROC, J, LEN
58 DATA msgoff/112/
59 DATA msgoff2/113/
60 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
61 INTEGER ITMP
62C-----------------------------------------------
63C S o u r c e L i n e s
64C-----------------------------------------------
65 len=1
66C
67 pmain = fr_wall(nspmd+2)
68 loc_proc = ispmd+1
69 IF(loc_proc==pmain) THEN
70 DO p = 1, nspmd
71 IF(loc_proc/=p.AND.fr_wall(p)/=0)THEN
72 msgtyp = msgoff
73 CALL mpi_recv(itmp ,len ,mpi_integer,it_spmd(p),
74 . msgtyp,spmd_comm_world,status,ierror )
75C
76 iwadd = iwadd + itmp
77 ENDIF
78 ENDDO
79C
80 DO p = 1, nspmd
81 IF(loc_proc/=p.AND.fr_wall(p)/=0)THEN
82 msgtyp = msgoff2
83 CALL mpi_send(iwadd ,len ,mpi_integer,it_spmd(p),
84 . msgtyp,spmd_comm_world,ierror)
85 ENDIF
86 ENDDO
87C
88 ELSE
89 msgtyp = msgoff
90 CALL mpi_send(iwadd ,len ,mpi_integer,it_spmd(pmain),
91 . msgtyp,spmd_comm_world,ierror)
92 msgtyp = msgoff2
93 CALL mpi_recv(iwadd ,len ,mpi_integer,it_spmd(pmain),
94 . msgtyp,spmd_comm_world,status,ierror )
95 ENDIF
96C
97#endif
98 RETURN
99 END
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
subroutine spmd_frwall_nn(fr_wall, iwadd)