OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_gather_dtnoda.F File Reference
#include "implicit_f.inc"
#include "spmd.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "task_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_gather_dtnoda (tagn, stifn, ms, weight, num, dt2_l, stf_l, ms_l)

Function/Subroutine Documentation

◆ spmd_gather_dtnoda()

subroutine spmd_gather_dtnoda ( integer, dimension(*) tagn,
stifn,
ms,
integer, dimension(*) weight,
integer num,
dt2_l,
stf_l,
ms_l )

Definition at line 31 of file spmd_gather_dtnoda.F.

32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35 USE spmd_comm_world_mod, ONLY : spmd_comm_world
36#include "implicit_f.inc"
37#include "spmd.inc"
38C-----------------------------------------------
39C C o m m o n B l o c k s
40C-----------------------------------------------
41#include "com01_c.inc"
42#include "com04_c.inc"
43#include "task_c.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
48 . stifn(*),ms(*),dt2_l(*),ms_l(*),stf_l(*)
49 INTEGER WEIGHT(*),NUM,TAGN(*)
50C-----------------------------------------------
51C L O C A L V A R I A B L E S
52C-----------------------------------------------
53#ifdef MPI
54 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,MS_LOFF,ID_G
55 INTEGER SIZ,MS_LTYP,I,K,NG,NREC,MS_LOFF2
56
57 DATA ms_loff/7014/
58 my_real, DIMENSION(:) , ALLOCATABLE :: bufsr
59C
60C=======================================================================
61 ALLOCATE (bufsr(3*num))
62C
63 IF (ispmd/=0) THEN
64 siz = 0
65 DO i=1,numnod
66 IF (tagn(i) > 0) THEN
67 siz = siz + 3
68 bufsr(siz-2) = ms(i)/stifn(i)
69 bufsr(siz-1) = stifn(i)
70 bufsr(siz ) = ms(i)
71 END IF
72 END DO
73
74C a cause de la version simple precision, on ne peux pas metre l'entier
75C dans le buffer flottant car on n a que 2puiss 24 bits dispo ~ 16 Million
76C de noeuds au max
77
78 ms_ltyp = ms_loff
79 CALL mpi_send(bufsr,siz,real,it_spmd(1),ms_ltyp,
80 . spmd_comm_world,ierror)
81
82 ELSE
83 id_g = 0
84 DO i=1,numnod
85 IF (tagn(i) > 0) THEN
86 id_g = id_g + 1
87 dt2_l(id_g) = ms(i)/stifn(i)
88 stf_l(id_g) = stifn(i)
89 ms_l(id_g) = ms(i)
90 ENDIF
91 ENDDO
92
93 DO i=2,nspmd
94C-------------
95 ms_ltyp = ms_loff
96 CALL mpi_probe(it_spmd(i),ms_ltyp,
97 . spmd_comm_world,status,ierror)
98 CALL mpi_get_count(status,real,siz,ierror)
99
100C------------ Reception du buffer flottant
101
102 CALL mpi_recv(bufsr,siz,real,it_spmd(i),ms_ltyp,
103 . spmd_comm_world,status,ierror)
104
105 nrec = siz
106 DO k = 1,nrec,3
107 id_g = id_g + 1
108 dt2_l(id_g) = bufsr(k)
109 stf_l(id_g) = bufsr(k+1)
110 ms_l(id_g) = bufsr(k+2)
111 ENDDO
112C
113 ENDDO
114
115 ENDIF
116 DEALLOCATE(bufsr)
117
118#endif
119 RETURN
#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