OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_anim_ply_init.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_anim_ply_init ../engine/source/mpi/anim/spmd_anim_ply_init.F
25!||--- called by ------------------------------------------------------
26!|| resol_init ../engine/source/engine/resol_init.F
27!||--- calls -----------------------------------------------------
28!||--- uses -----------------------------------------------------
29!|| plyxfem_mod ../engine/share/modules/plyxfem_mod.F
30!|| spmd_mod ../engine/source/mpi/spmd_mod.F90
31!||====================================================================
32 SUBROUTINE spmd_anim_ply_init()
33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE plyxfem_mod
37 USE spmd_mod
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------------------------
43C M e s s a g e P a s s i n g
44C-----------------------------------------------
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 "param_c.inc"
51#include "task_c.inc"
52C-----------------------------------------------
53C L o c a l V a r i a b l e s
54C-----------------------------------------------
55#ifdef MPI
56 INTEGER, DIMENSION(:),ALLOCATABLE :: PLYNODTAG,SENDBUF,RECBUF
57 INTEGER MAXSENDSZ,RECSZ,PLYSZ
58 INTEGER I,J,P,ND, ITAG, IDCMAXP(NSPMD-1), REQ(NSPMD-1),NODCOUNT
59 INTEGER MSGOFF,MSGOFF2,STAT(MPI_STATUS_SIZE,NSPMD-1), IERR
60C-----------------------------------------------
61 DATA msgoff/7054/
62C-----------------------------------------------
63C
64C Allocate Global PLY Structure
65C
66 IF (ispmd==0)THEN
67 ALLOCATE (plyiadnod(nplymax,nspmd))
68 plyiadnod = 0
69 ELSE
70 ALLOCATE (plyiadnod(1,1))
71 ENDIF
72 plyiadnod = 0
73
74
75C Need to rebuild a global PLYNOD Structure on processor 0 to have
76C a conversion array from Global Node ID to Internal PLYNOD ID
77
78 DO i=1,nplymax
79 IF (ispmd==0)THEN
80C PROC 0, RECEIVE NODES NUM for each ply
81 DO p=2,nspmd
82 itag=msgoff
83 CALL mpi_recv(recsz,1, mpi_integer, it_spmd(p),
84 . itag, spmd_comm_world, stat, ierr)
85 plyiadnod(i,p) = recsz
86 ENDDO
87 ELSE
88 itag=msgoff
89 CALL mpi_send(plynod(i)%PLYNUMNODS,1,mpi_integer,it_spmd(1),
90 . itag,spmd_comm_world,ierr)
91 ENDIF
92 ENDDO
93
94C
95#endif
96 RETURN
97 END
subroutine spmd_anim_ply_init()
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
type(plynods), dimension(:), allocatable plynod
Definition plyxfem_mod.F:44
integer, dimension(:,:), allocatable plyiadnod
Definition plyxfem_mod.F:46