OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_fvb_atit.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_atit (ctext, str, titl, ltitl, maxpart)

Function/Subroutine Documentation

◆ spmd_fvb_atit()

subroutine spmd_fvb_atit ( integer, dimension(*) ctext,
character*(*) str,
character*(*) titl,
integer ltitl,
integer maxpart )

Definition at line 33 of file spmd_fvb_atit.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 CTEXT(*), LTITL,MAXPART
55 CHARACTER*(*) STR, TITL
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59#ifdef MPI
60 INTEGER I, PMAIN, J, K, ITAG, MSGOFF, NPOLH_ANIM,
61 . STAT(MPI_STATUS_SIZE), IERR
62C-----------------------------------------------
63 DATA msgoff/7045/
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)%NPOLH_ANIM
70 WRITE(str,'(I9,A1)') j+maxpart,':'
71 DO k=1,10
72 ctext(k)=ichar(str(k:k))
73 ENDDO
74 titl=' '
75 WRITE(titl,'(A11,I9)') 'POLYHEDRON ',j
76 DO k=1,ltitl
77 ctext(k+10)=ichar(titl(k:k))
78 ENDDO
79 ctext(31)=0
80 CALL write_c_c(ctext,10+ltitl)
81 ENDDO
82 ELSE
83 itag=msgoff
84 CALL mpi_recv(npolh_anim, 1, mpi_integer,
85 . it_spmd(pmain), itag, spmd_comm_world,
86 . stat, ierr)
87 DO j=1,npolh_anim
88 WRITE(str,'(I8,A1)') j+maxpart,':'
89 DO k=1,10
90 ctext(k)=ichar(str(k:k))
91 ENDDO
92 titl=' '
93 WRITE(titl,'(A11,I9)') 'POLYHEDRON ',j
94 DO k=1,ltitl
95 ctext(k+10)=ichar(titl(k:k))
96 ENDDO
97 ctext(31)=0
98 CALL write_c_c(ctext,10+ltitl)
99 ENDDO
100 ENDIF
101 ELSE
102 IF (ispmd==pmain-1) THEN
103 itag=msgoff
104 CALL mpi_send(fvdata(i)%NPOLH_ANIM, 1, mpi_integer,
105 . it_spmd(1), itag, spmd_comm_world,
106 . ierr)
107 ENDIF
108 ENDIF
109 maxpart = maxpart + fvdata(i)%NPOLH_ANIM
110 ENDDO
111C
112#endif
113 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_c_c(int *w, int *len)