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

Go to the source code of this file.

Functions/Subroutines

subroutine rad_spmd_recv (a, siz, ispmd, it_spmd, msgtag, intsize)

Function/Subroutine Documentation

◆ rad_spmd_recv()

subroutine rad_spmd_recv ( integer, dimension(*), intent(inout) a,
integer siz,
integer ispmd,
integer, dimension(*) it_spmd,
integer msgtag,
integer intsize )

Definition at line 33 of file rad_spmd_recv.F.

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 implicit none
39C#include "implicit_f.inc"
40C-----------------------------------------------
41C M e s s a g e P a s s i n g
42C-----------------------------------------------
43#include "spmd.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER SIZ,ISPMD,IT_SPMD(*),MSGTAG,INTSIZE
48 INTEGER, INTENT(INOUT) :: A(*)
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52#ifdef MPI
53 INTEGER BUFSIZMAX, ADD, LEN, SIZ_I
54 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
55C shared memory segment must be superior to 10 Mb
56 DATA bufsizmax/10000000/
57C-----------------------------------------------
58C S o u r c e L i n e s
59C-----------------------------------------------
60 add = 1
61 siz_i = siz
62 1 len = min(siz_i,bufsizmax)
63
64 CALL mpi_recv(a(add),len,mpi_byte,it_spmd(ispmd+1),msgtag,
65 . spmd_comm_world,status,ierror)
66 CALL mpi_send(a,0,mpi_byte,it_spmd(ispmd+1),msgtag,
67 . spmd_comm_world,ierror)
68
69 add = add + len/intsize
70 siz_i = siz_i - len
71 IF (siz_i>0) GO TO 1
72#endif
73 RETURN
#define min(a, b)
Definition macros.h:20
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480