User Tools

Site Tools


code:run_swarm

This is an old revision of the document!


<graphviz dot> digraph swarm {

start [shape=ellipse, label="run_swarm()"];
split_comm[shape=box, label="Split MPI-communicator\ninto a master rank\nand multiple worker groups."];
if_master [shape=diamond, label="Master rank?"];
start -> split_comm -> if_master;
node [shape=box, width=3.5];  
if_master -> m1 [label="yes"];
if_master -> w1 [label="no"];

subgraph cluster_m {

color = blue;
label = <<u>Master</u>>;
m1[label="Receive report (blocking)"];
m2[label="CALL steer(report, command)"];
m3[label="Send new command as reply"];
m1 -> m2 -> m3;
m3:w -> m1:w [weight=0];

}

subgraph cluster_w {

label = <<u>Worker</u>>;
color = blue;
w1[label="Send report"];
w2[label="CALL execute(command, report)"];
w3[label="Receive command (blocking)"];
w1 -> w2 -> w3 [dir=back];
w3:e -> w1:e [dir=back, weight=0];

}

w1 → m1 [label=“MPI”, color=red, minlen=3.5, weight=0]; m3 → w3 [label=“MPI”, color=green, minlen=3.5, weight=0];

} </graphviz>

code/run_swarm.1422210428.txt.gz · Last modified: 2020/08/21 10:14 (external edit)