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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_iglob_partn (iad, nbpart, iadg, sbuf)

Function/Subroutine Documentation

◆ spmd_iglob_partn()

subroutine spmd_iglob_partn ( integer, dimension(*) iad,
integer nbpart,
integer, dimension(nspmd,nbpart) iadg,
integer sbuf )

Definition at line 38 of file spmd_iglob_partn.F.

39C iglob_part reconstruit sur p0 un tableau global de part
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43 USE spmd_comm_world_mod, ONLY : spmd_comm_world
44#include "implicit_f.inc"
45C-----------------------------------------------
46C M e s s a g e P a s s i n g
47C-----------------------------------------------
48#include "spmd.inc"
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "com01_c.inc"
53#include "task_c.inc"
54C-----------------------------------------------
55C D u m m y A r g u m e n t s
56C-----------------------------------------------
57 INTEGER IAD(*), NBPART, IADG(NSPMD,NBPART)
58 INTEGER SBUF
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62#ifdef MPI
63 INTEGER MSGOFF,MSGTYP,INFO,K,N,NB_TMP
64 INTEGER, DIMENSION(:),ALLOCATABLE :: RECBUF
65 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
66
67 DATA msgoff/7028/
68C-----------------------------------------------
69C S o u r c e L i n e s
70C-----------------------------------------------
71 ALLOCATE(recbuf(sbuf))
72
73 IF (ispmd/=0) THEN
74 msgtyp= msgoff
75 CALL mpi_send(iad,nbpart,mpi_integer,it_spmd(1),msgtyp,
76 . spmd_comm_world,ierror)
77
78 ELSE
79 DO n = 1, nbpart
80 iadg(1,n) = iad(n)
81 ENDDO
82
83 DO k=2,nspmd
84 msgtyp= msgoff
85 CALL mpi_probe(it_spmd(k),msgtyp,
86 . spmd_comm_world,status,ierror)
87 CALL mpi_get_count(status,mpi_integer,nb_tmp,ierror)
88 CALL mpi_recv(recbuf,nb_tmp,mpi_integer,it_spmd(k),msgtyp,
89 . spmd_comm_world,status,ierror)
90
91 DO n = 1, nbpart
92 iadg(k,n) = recbuf(n)
93 ENDDO
94 END DO
95 ENDIF
96
97 DEALLOCATE(recbuf)
98
99#endif
100 RETURN
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