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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_split_comm_joint ()

Function/Subroutine Documentation

◆ spmd_split_comm_joint()

subroutine spmd_split_comm_joint

Definition at line 32 of file spmd_split_comm_joint.F.

33!$COMMENT
34! SPMD_SPLIT_COMM_JOINT :
35! SPMD_SPLIT_COMM_JOINT creates new communicators
36! for /CYL_JOINT
37! SPMD_SPLIT_COMM_JOINT organization :
38! - loop over the joints in order to
39! tag all the processors
40! - then create a communicator for a given
41! joint
42!$ENDCOMMENT
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE joint_mod
47C-----------------------------------------------
48C I m p l i c i t T y p e s
49C-----------------------------------------------
50 USE spmd_comm_world_mod, ONLY : spmd_comm_world
51#include "implicit_f.inc"
52C-----------------------------------------------
53C M e s s a g e P a s s i n g
54C-----------------------------------------------
55#include "spmd.inc"
56C-----------------------------------------------
57C C o m m o n B l o c k s
58C-----------------------------------------------
59#include "com04_c.inc"
60#include "task_c.inc"
61C-----------------------------------------------
62C D u m m y A r g u m e n t s
63C-----------------------------------------------
64
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68#ifdef MPI
69
70 integer :: KEY,CODE,I,P
71 INTEGER :: KK
72
73C-----------------------------------------------
74C S o u r c e L i n e s
75C-----------------------------------------------
76 p = ispmd + 1
77! -----------------------------
78! loop over the interface
79 DO kk=1,njoint
80! -----------------------------
81 ! color the processor
82 IF(cyl_join(kk)%NUMBER_NODE>0.OR.cyl_join(kk)%NUMBER_MAIN_NODE>0) THEN
83 cyl_join(kk)%COMM_MPI%COLOR=1
84 key = 1
85 ELSE
86 cyl_join(kk)%COMM_MPI%COLOR=0
87 key = 0
88 ENDIF
89 ! create the communicator
90 CALL mpi_comm_split(spmd_comm_world,cyl_join(kk)%COMM_MPI%COLOR,p,cyl_join(kk)%COMM_MPI%COMM,code)
91 IF(cyl_join(kk)%COMM_MPI%COLOR==1) THEN
92 CALL mpi_comm_rank(cyl_join(kk)%COMM_MPI%COMM,cyl_join(kk)%COMM_MPI%RANK,code)
93 ENDIF
94 ENDDO
95! -----------------------------
96#endif
97 RETURN
end diagonal values have been computed in the(sparse) matrix id.SOL
subroutine mpi_comm_split(comm, color, key, comm2, ierr)
Definition mpi.f:272
subroutine mpi_comm_rank(comm, rank, ierr)
Definition mpi.f:254
type(joint_type), dimension(:), allocatable cyl_join
Definition joint_mod.F:61