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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_fvb_anum (fvoff, idmax, nfvnod)

Function/Subroutine Documentation

◆ spmd_fvb_anum()

subroutine spmd_fvb_anum ( integer, dimension(2,*) fvoff,
integer idmax,
integer nfvnod )

Definition at line 33 of file spmd_fvb_anum.F.

34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE fvbag_mod
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41 USE spmd_comm_world_mod, ONLY : spmd_comm_world
42#include "implicit_f.inc"
43C-----------------------------------------------------------------
44C M e s s a g e P a s s i n g
45C-----------------------------------------------
46#include "spmd.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "task_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER FVOFF(2,*), IDMAX, NFVNOD
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58#ifdef MPI
59 INTEGER I, PMAIN, J, JJ, ITAG, MSGOFF, STAT(MPI_STATUS_SIZE),
60 . IERR, NNS_ANIM
61C-----------------------------------------------
62 DATA msgoff/7050/
63C-----------------------------------------------
64C
65 DO i=1,nfvbag
66 pmain=fvspmd(i)%PMAIN
67 IF (ispmd==0) THEN
68 IF (ispmd==pmain-1) THEN
69 DO j=1,fvdata(i)%NNS_ANIM
70 jj=fvoff(2,i)+j
71 CALL write_i_c(jj,1)
72 ENDDO
73 ELSE
74 itag=msgoff
75 CALL mpi_recv(nns_anim, 1, mpi_integer, it_spmd(pmain),
76 . itag, spmd_comm_world, stat, ierr)
77C
78 DO j=1,nns_anim
79 jj=fvoff(2,i)+j
80 CALL write_i_c(jj,1)
81 ENDDO
82 ENDIF
83 ELSE
84 IF (ispmd==pmain-1) THEN
85 itag=msgoff
86 CALL mpi_send(fvdata(i)%NNS_ANIM, 1, mpi_integer,
87 . it_spmd(1), itag, spmd_comm_world,
88 . ierr)
89 ENDIF
90 ENDIF
91 ENDDO
92C
93 IF (ispmd==0) THEN
94 CALL write_i_c(idmax+nfvnod+1,1)
95 CALL write_i_c(idmax+nfvnod+2,1)
96 CALL write_i_c(idmax+nfvnod+3,1)
97 ENDIF
98C
99#endif
100 RETURN
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
type(fvbag_spmd), dimension(:), allocatable fvspmd
Definition fvbag_mod.F:129
type(fvbag_data), dimension(:), allocatable fvdata
Definition fvbag_mod.F:128
integer nfvbag
Definition fvbag_mod.F:127
void write_i_c(int *w, int *len)