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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_sd_gaug (lgauge, gauge, igaup, ngaup)

Function/Subroutine Documentation

◆ spmd_sd_gaug()

subroutine spmd_sd_gaug ( integer, dimension(3,*) lgauge,
gauge,
integer, dimension(*) igaup,
integer, dimension(*) ngaup )

Definition at line 32 of file spmd_sd_gaug.F.

33C envoi vers p0 du tableau GAUGE calcule sur chaque proc
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37 USE spmd_comm_world_mod, ONLY : spmd_comm_world
38#include "implicit_f.inc"
39C-----------------------------------------------------------------
40C M e s s a g e P a s s i n g
41C-----------------------------------------------
42#include "spmd.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "com01_c.inc"
47#include "com04_c.inc"
48#include "task_c.inc"
49#include "param_c.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 INTEGER LGAUGE(3,*), IGAUP(*), NGAUP(*)
54 my_real gauge(llgauge,*)
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58#ifdef MPI
59 INTEGER MSGTYP,MSGOFF,IERROR,LOC_PROC,NN,L,I,K,N,II,J,
60 . IDEB,SIZ,A_AR,NBIRECV,INDEX,
61 . IRINDEX(NSPMD),REQ_R(NSPMD),IAD_RECV(NSPMD),
62 . STATUS(MPI_STATUS_SIZE)
64 . buf(llgauge+1,nbgauge*nspmd) ,alpha ,alpha0
65 DATA msgoff/203/
66C-----------------------------------------------
67C S o u r c e L i n e s
68C-----------------------------------------------
69 loc_proc = ispmd + 1
70 IF (loc_proc==1) THEN
71 ideb = 1
72 nbirecv = 0
73 DO i = 2, nspmd
74 iad_recv(i) = ideb
75 nbirecv = nbirecv + 1
76 irindex(nbirecv) = i
77 nn = nbgauge
78 siz = (llgauge+1)*nn
79 msgtyp = msgoff
80 CALL mpi_irecv(
81 s buf(1,ideb),siz,real,it_spmd(i),msgtyp,
82 g spmd_comm_world,req_r(nbirecv),ierror)
83 ideb = ideb + nn
84 END DO
85C
86 DO ii = 1, nbirecv
87 CALL mpi_waitany(nbirecv,req_r,index,status,ierror)
88 i = irindex(index)
89 l = iad_recv(i)
90 nn = nbgauge
91 DO n = l, l+nn-1
92 k = nint(buf(1,n))
93 IF(lgauge(1,k) <= 0 .AND. lgauge(1,k) >= -numels)THEN
94 alpha0 = gauge(5,k)
95 alpha = buf(5+1,n)
96 IF(alpha > alpha0)THEN
97 gauge(5,k) = alpha
98 DO j = 30, 33
99 gauge(j,k) = buf(j+1,n)
100 END DO
101C a voir plus tard si (ALPHA == ALPHA0)
102 ENDIF
103 ENDIF
104 END DO
105 END DO
106C
107 ELSE
108 k = 0
109 DO n = 1, nbgauge
110cc IF(IGAUP(N)==LOC_PROC)THEN
111 k = k + 1
112 buf(1,k) = n
113 DO j = 1, llgauge
114 buf(j+1,k) = gauge(j,n)
115 END DO
116cc ENDIF
117 END DO
118cc IF(K > 0) THEN
119 siz = (llgauge+1)*k
120 msgtyp=msgoff
121 CALL mpi_send(
122 s buf,siz,real,it_spmd(1),msgtyp,
123 g spmd_comm_world,ierror)
124cc ENDIF
125 END IF
126C
127#endif
128 RETURN
#define my_real
Definition cppsort.cpp:32
#define alpha
Definition eval.h:35
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
subroutine mpi_waitany(cnt, array_of_requests, index, status, ierr)
Definition mpi.f:549
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)
Definition mpi.f:372