OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_state_inimap_exch_siz.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_state_inimap_exch_siz ../engine/source/output/sta/spmd_state_inimap_exch_siz.F
25!||--- called by ------------------------------------------------------
26!|| stat_inimap1d_file_spmd ../engine/source/output/sta/stat_inimap1d_file_spmd.F
27!|| stat_inimap1d_spmd ../engine/source/output/sta/stat_inimap1d_spmd.F
28!|| stat_inimap2d_file_spmd ../engine/source/output/sta/stat_inimap2d_file_spmd.F
29!|| stat_inimap2d_spmd ../engine/source/output/sta/stat_inimap2d_spmd.F
30!||--- calls -----------------------------------------------------
31!||--- uses -----------------------------------------------------
32!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
33!|| state_inimap_mod ../engine/share/modules/state_inimap_mod.F
34!||====================================================================
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43 USE spmd_comm_world_mod, ONLY : spmd_comm_world
44#include "implicit_f.inc"
45#include "spmd.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "com01_c.inc"
50#include "task_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54C
55C-----------------------------------------------
56C L O C A L V A R I A B L E S
57C-----------------------------------------------
58#ifdef MPI
59 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,MSGOFF
60 INTEGER SIZ,MSGTYP,I,K,NG,NREC,MSGOFF2
61
62 DATA msgoff/10002/
63 DATA msgoff2/10002/
64 INTEGER BUFF_I(4)
65 my_real buff_r(5)
66
67 IF (ispmd/=0) THEN
68 buff_i(1) = state_inimap_buf(1)%NUM_CENTROIDS
69 buff_i(2) = state_inimap_buf(1)%NUM_POINTS
70 buff_i(3) = state_inimap_buf(1)%MLW
71 buff_i(4) = state_inimap_buf(1)%NSUBMAT
72
73 buff_r(1) = state_inimap_buf(1)%LENGTH
74 buff_r(2) = state_inimap_buf(1)%SHIFT_Ny
75 buff_r(3) = state_inimap_buf(1)%SHIFT_Cy
76 buff_r(4) = state_inimap_buf(1)%SHIFT_Nz
77 buff_r(5) = state_inimap_buf(1)%SHIFT_Cz
78
79 msgtyp = msgoff2
80 CALL mpi_send(buff_i, 4,mpi_integer,it_spmd(1),msgtyp,spmd_comm_world,ierror)
81
82 msgtyp = msgoff
83 CALL mpi_send(buff_r, 5, real,it_spmd(1),msgtyp,spmd_comm_world,ierror)
84
85 ELSE
86
87 DO i=2,nspmd
88
89 !Reception du buffer entier des adresses DATA_I
90 msgtyp = msgoff2
91 CALL mpi_probe(it_spmd(i),msgtyp,spmd_comm_world,status,ierror)
92 CALL mpi_get_count(status,mpi_integer,siz,ierror)
93 CALL mpi_recv(buff_i,4,mpi_integer,it_spmd(i),msgtyp,spmd_comm_world,status,ierror)
94
95 ! Reception du buffer flottant double des adresses DATA_I
96 msgtyp = msgoff
97 CALL mpi_recv(buff_r,5,real,it_spmd(i),msgtyp,spmd_comm_world,status,ierror)
98
99 state_inimap_buf(i)%NUM_CENTROIDS = buff_i(1)
100 state_inimap_buf(i)%NUM_POINTS = buff_i(2)
101 state_inimap_buf(i)%MLW = buff_i(3)
102 state_inimap_buf(i)%NSUBMAT = buff_i(4)
103
104 state_inimap_buf(i)%LENGTH = buff_r(1)
105 state_inimap_buf(i)%SHIFT_Ny = buff_r(2)
106 state_inimap_buf(i)%SHIFT_Cy = buff_r(3)
107 state_inimap_buf(i)%SHIFT_Nz = buff_r(4)
108 state_inimap_buf(i)%SHIFT_Cz = buff_r(5)
109
110 ENDDO
111
112 ENDIF
113
114#endif
115 RETURN
116 END SUBROUTINE spmd_state_inimap_exch_siz
#define my_real
Definition cppsort.cpp:32
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_get_count(status, datatype, cnt, ierr)
Definition mpi.f:296
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
subroutine mpi_probe(source, tag, comm, status, ierr)
Definition mpi.f:449
type(map_struct), dimension(:), allocatable state_inimap_buf
subroutine spmd_state_inimap_exch_siz()