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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_fvb_comm_pattern (ifv)

Function/Subroutine Documentation

◆ spmd_fvb_comm_pattern()

subroutine spmd_fvb_comm_pattern ( integer ifv)

Definition at line 32 of file spmd_fvb_comm_pattern.F.

33
34! Prepare the communication pattern for the FVB
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE fvbag_mod
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------------------------
44C M e s s a g e P a s s i n g
45C-----------------------------------------------
46#include "spmd.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "com01_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER IFV
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58#ifdef MPI
59 INTEGER IERROR, LENG,ITABL(4)
60 INTEGER II, I, ITAG, LEN, ITAB(3,NSPMD-1),REQ(2*(NSPMD-1)),
61 . STAT(MPI_STATUS_SIZE,2*(NSPMD-1)), IERR,
62 . MSGOFF
63 DATA msgoff/238/
64
65C-----------------------------------------------
66C S o u r c e L i n e s
67C-----------------------------------------------
68 leng=1
69 IF(fvspmd(ifv)%RANK > -1) THEN
70 CALL mpi_allreduce(fvspmd(ifv)%NNA_L,fvspmd(ifv)%NNA_L_GLOB,leng,
71 . mpi_integer,mpi_sum, fvspmd(ifv)%MPI_COMM, ierror)
72C
73 ELSE
74 fvspmd(ifv)%NNA_L_GLOB = 0
75 ENDIF
76
77 IF (fvspmd(ifv)%RANK == 0) THEN
78C Reception des longueurs
79 ii=0
80 DO i=1,fvspmd(ifv)%NSPMD-1
81 ii=ii+1
82 itag=msgoff+i
83 len=4
84 CALL mpi_irecv(fvspmd(ifv)%ITAB(1,ii), len, mpi_integer, i,
85 . itag, fvspmd(ifv)%MPI_COMM, req(ii), ierr)
86 ENDDO
87 CALL mpi_waitall(fvspmd(ifv)%NSPMD-1, req, stat, ierr)
88
89 ELSE IF(fvspmd(ifv)%RANK > 0) THEN
90 itabl(1)=fvspmd(ifv)%NN_L
91C ajout noeuds internes
92 itabl(2)=fvspmd(ifv)%NNA_L
93 itabl(3)=fvspmd(ifv)%NNSA_L
94 itabl(4)=fvspmd(ifv)%NNI_L
95 itag=msgoff+fvspmd(ifv)%RANK
96 len=4
97 CALL mpi_send(itabl, len, mpi_integer, 0,
98 . itag, fvspmd(ifv)%MPI_COMM, ierr)
99C
100 ENDIF
101#endif
102 RETURN
subroutine mpi_waitall(cnt, array_of_requests, status, ierr)
Definition mpi.f:536
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
subroutine mpi_allreduce(sendbuf, recvbuf, cnt, datatype, operation, comm, ierr)
Definition mpi.f:103
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)
Definition mpi.f:372
type(fvbag_spmd), dimension(:), allocatable fvspmd
Definition fvbag_mod.F:129