OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_gather_sph.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
24C dxyzsph /anim/dxyzsph.F
25!||====================================================================
26!|| spmd_gather_sph ../engine/source/mpi/anim/spmd_gather_sph.F
27!||--- called by ------------------------------------------------------
28!|| dxyzsph ../engine/source/output/anim/generate/dxyzsph.F
29!||--- calls -----------------------------------------------------
30!|| write_r_c ../common_source/tools/input_output/write_routtines.c
31!||--- uses -----------------------------------------------------
32!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
33!||====================================================================
34 SUBROUTINE spmd_gather_sph(V,TV,NUM)
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"
40#include "spmd.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "com01_c.inc"
45#include "task_c.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 real
50 . v(*)
51 INTEGER NUM,TV
52C-----------------------------------------------
53C L O C A L V A R I A B L E S
54C-----------------------------------------------
55#ifdef MPI
56 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,MSGOFF
57 INTEGER SIZ,MSGTYP,I,K,NG,NREC,MSGOFF2
58
59 DATA msgoff/7034/
60
61C Tableau utilise par proc 0
62 REAL, DIMENSION(:),ALLOCATABLE :: XGLOB
63C-----------------------------------------------
64 ALLOCATE(xglob(num))
65
66 IF (ispmd/=0) THEN
67 msgtyp = msgoff
68 CALL mpi_send(v,3*tv,mpi_real,it_spmd(1),msgtyp,
69 . spmd_comm_world,ierror)
70
71 ELSE
72
73 CALL write_r_c(v,3*tv)
74
75 DO i=2,nspmd
76
77C Reception du buffer entier des adresses NODGLOB
78 msgtyp = msgoff
79
80 CALL mpi_probe(it_spmd(i),msgtyp,
81 . spmd_comm_world,status,ierror)
82 CALL mpi_get_count(status,mpi_integer,siz,ierror)
83
84 CALL mpi_recv(xglob,siz,mpi_real,it_spmd(i),msgtyp,
85 . spmd_comm_world,status,ierror)
86
87C
88
89 CALL write_r_c(xglob,siz)
90 ENDDO
91
92 ENDIF
93
94 DEALLOCATE(xglob)
95
96#endif
97 RETURN
98 END
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
subroutine spmd_gather_sph(v, tv, num)
void write_r_c(float *w, int *len)