OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_fvb_anod.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_anod ()

Function/Subroutine Documentation

◆ spmd_fvb_anod()

subroutine spmd_fvb_anod

Definition at line 33 of file spmd_fvb_anod.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 L o c a l V a r i a b l e s
53C-----------------------------------------------
54#ifdef MPI
55 INTEGER I, PMAIN, J, ITAG, MSGOFF, STAT(MPI_STATUS_SIZE),
56 . IERR, LEN, NNS_ANIM, JJ,MSGOFF2
58 . , DIMENSION(:), ALLOCATABLE :: rbuf
59 REAL R4
60C-----------------------------------------------
61 DATA msgoff/7038/
62 DATA msgoff2/7039/
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 r4=fvdata(i)%NOD_ANIM(1,j)
71 CALL write_r_c(r4,1)
72 r4=fvdata(i)%NOD_ANIM(2,j)
73 CALL write_r_c(r4,1)
74 r4=fvdata(i)%NOD_ANIM(3,j)
75 CALL write_r_c(r4,1)
76 ENDDO
77 ELSE
78 itag=msgoff
79 CALL mpi_recv(nns_anim, 1, mpi_integer,
80 . it_spmd(pmain), itag, spmd_comm_world,
81 . stat, ierr)
82C
83 len=3*nns_anim
84 ALLOCATE(rbuf(len))
85 itag=msgoff2
86 CALL mpi_recv(rbuf, len, real, it_spmd(pmain),
87 . itag, spmd_comm_world, stat, ierr)
88C
89 DO j=1,len
90 r4=rbuf(j)
91 CALL write_r_c(r4,1)
92 ENDDO
93 DEALLOCATE(rbuf)
94 ENDIF
95 ELSE
96 IF (ispmd==pmain-1) THEN
97 itag=msgoff
98 CALL mpi_send(fvdata(i)%NNS_ANIM, 1, mpi_integer,
99 . it_spmd(1), itag, spmd_comm_world,
100 . ierr)
101C
102 len=3*fvdata(i)%NNS_ANIM
103 ALLOCATE(rbuf(len))
104 jj=0
105 DO j=1,fvdata(i)%NNS_ANIM
106 jj=jj+1
107 rbuf(jj)=fvdata(i)%NOD_ANIM(1,j)
108 jj=jj+1
109 rbuf(jj)=fvdata(i)%NOD_ANIM(2,j)
110 jj=jj+1
111 rbuf(jj)=fvdata(i)%NOD_ANIM(3,j)
112 ENDDO
113 itag=msgoff2
114 CALL mpi_send(rbuf, len, real, it_spmd(1),
115 . itag, spmd_comm_world, ierr)
116C
117 DEALLOCATE(rbuf)
118 ENDIF
119 ENDIF
120 ENDDO
121C
122#endif
123 RETURN
#define my_real
Definition cppsort.cpp:32
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_r_c(float *w, int *len)