OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_h3d_gather_t_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_t_node (weight, v, len, vp0, lenp0)

Function/Subroutine Documentation

◆ spmd_h3d_gather_t_node()

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

Definition at line 31 of file spmd_h3d_gather_t_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,WEIGHT(*)
48 . v(len),vp0(lenp0),v_tmp(len)
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
58
59
60 j = 0
61 DO i=1,len/6
62 IF(weight(i) == 1) THEN
63 v_tmp(j+1) = v(6*(i-1)+1)
64 v_tmp(j+2) = v(6*(i-1)+2)
65 v_tmp(j+3) = v(6*(i-1)+3)
66 v_tmp(j+4) = v(6*(i-1)+4)
67 v_tmp(j+5) = v(6*(i-1)+5)
68 v_tmp(j+6) = v(6*(i-1)+6)
69 j = j + 6
70 ENDIF
71 ENDDO
72 len_tmp = j
73
74 CALL mpi_gather(
75 s len_tmp ,1 ,mpi_integer,
76 r lenp ,1 ,mpi_integer,it_spmd(1),
77 g spmd_comm_world,ierror)
78C
79 iad=0
80 IF(ispmd == 0)THEN
81 DO i=1,nspmd
82 disp(i) = iad
83 iad = iad+lenp(i)
84 END DO
85 END IF
86C
87 CALL mpi_gatherv(
88 s v_tmp ,len_tmp ,real,
89 r vp0 ,lenp ,disp,real,it_spmd(1),
90 g spmd_comm_world,ierror)
91#endif
92 RETURN
#define my_real
Definition cppsort.cpp:32
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