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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_h3d_gather_i_node (weight, v, len, vp0, lenp0)

Function/Subroutine Documentation

◆ spmd_h3d_gather_i_node()

subroutine spmd_h3d_gather_i_node ( integer, dimension(*) weight,
integer, dimension(len) v,
integer len,
integer, dimension(lenp0) vp0,
integer lenp0 )

Definition at line 31 of file spmd_h3d_gather_i_node.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 "task_c.inc"
42#include "com01_c.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER LEN,LENP0
47 integer
48 . v(len),vp0(lenp0),weight(*)
49
50C-----------------------------------------------
51C L O C A L V A R I A B L E S
52C-----------------------------------------------
53 INTEGER IAD,J,LEN_TMP
54#ifdef MPI
55 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,
56 . MSGTYP,I,SIZ,LENP(NSPMD),DISP(NSPMD),
57 . V_TMP(LEN)
58
59 j = 0
60 DO i=1,len
61 IF(weight(i) == 1) THEN
62 j = j + 1
63 v_tmp(j) = v(i)
64 ENDIF
65 ENDDO
66 len_tmp = j
67
68 CALL mpi_gather(
69 s len_tmp ,1 ,mpi_integer,
70 r lenp ,1 ,mpi_integer,it_spmd(1),
71 g spmd_comm_world,ierror)
72C
73 iad=0
74 IF(ispmd == 0)THEN
75 DO i=1,nspmd
76 disp(i) = iad
77 iad = iad+lenp(i)
78 END DO
79 END IF
80C
81 CALL mpi_gatherv(
82 s v_tmp ,len_tmp ,mpi_integer,
83 r vp0 ,lenp ,disp,mpi_integer,it_spmd(1),
84 g spmd_comm_world,ierror)
85#endif
86 RETURN
subroutine mpi_gather(sendbuf, cnt, datatype, recvbuf, reccnt, rectype, root, comm, ierr)
Definition mpi.f:56
subroutine mpi_gatherv(sendbuf, cnt, datatype, recvbuf, reccnt, displs, rectype, root, comm, ierr)
Definition mpi.f:76