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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_fxb_for (fxbipm, mfextp)

Function/Subroutine Documentation

◆ spmd_fxb_for()

subroutine spmd_fxb_for ( integer, dimension(nbipm,*) fxbipm,
mfextp )

Definition at line 32 of file spmd_fxb_for.F.

33C-----------------------------------------------
34C I m p l i c i t T y p e s
35C-----------------------------------------------
36 USE spmd_comm_world_mod, ONLY : spmd_comm_world
37#include "implicit_f.inc"
38C-----------------------------------------------------------------
39C M e s s a g e P a s s i n g
40C-----------------------------------------------
41#include "spmd.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "com01_c.inc"
46#include "com04_c.inc"
47#include "task_c.inc"
48#include "fxbcom.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER FXBIPM(NBIPM,*)
54 . mfextp(*)
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58#ifdef MPI
59 INTEGER NFX, NMOD, NME, LEN, AVAR, PMAIN, II, I, ITAG, MSGOFF,
60 . REQ(NSPMD-1), STAT(MPI_STATUS_SIZE,NSPMD-1), IERR,
61 . J
63 . , DIMENSION(:,:), ALLOCATABLE :: ff
64C
65 DATA msgoff /196/
66C
67 DO nfx=1,nfxbody
68 nmod=fxbipm(4,nfx)
69 nme=fxbipm(17,nfx)
70 len=nme+nmod
71 avar=fxbipm(13,nfx)
72 pmain=fxbipm(39,nfx)
73 IF (ispmd==pmain) THEN
74 ALLOCATE(ff(len,nspmd-1))
75 ii=0
76 DO i=1,nspmd
77 IF (ispmd==i-1) cycle
78 ii=ii+1
79 itag=msgoff
80 CALL mpi_irecv(ff(1,ii), len, real, it_spmd(i), itag,
81 . spmd_comm_world, req(ii), ierr)
82 ENDDO
83C
84 CALL mpi_waitall(nspmd-1, req, stat, ierr)
85 DO i=1,nspmd-1
86 DO j=1,len
87 mfextp(avar+j-1)=mfextp(avar+j-1)+ff(j,i)
88 ENDDO
89 ENDDO
90 DEALLOCATE(ff)
91 ELSE
92 itag=msgoff
93 CALL mpi_isend(mfextp(avar), len, real, it_spmd(pmain+1),
94 . itag, spmd_comm_world, req(1), ierr)
95C
96 CALL mpi_wait(req, stat, ierr)
97 ENDIF
98 ENDDO
99C
100#endif
101 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
Definition mpi.f:382
subroutine mpi_wait(ireq, status, ierr)
Definition mpi.f:525
subroutine mpi_waitall(cnt, array_of_requests, status, ierr)
Definition mpi.f:536
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)
Definition mpi.f:372