24 getCaster().remove(name,
this);
26 if (elect ==
nullptr) {
37 if (elect !=
nullptr) {
41 comm =
new MpiComm(name+
"->bcast");
47 getCaster().add(name,
this);
48 electionMember =
true;
58 yCDebug(
MPI_CARRIER,
"[MpiBcastCarrier @ %s] Disconnect : %s", name.c_str(), other.c_str());
60 MPI_Bcast(&cmd, 1, MPI_INT, 0,comm->comm);
61 int length = other.length() + name.length() + 3;
62 char* remote_c =
new char[length];
63 strcpy(remote_c, (other+
"<-"+name).c_str());
64 MPI_Bcast(&length, 1, MPI_INT, 0,comm->comm);
65 MPI_Bcast(remote_c, length, MPI_CHAR, 0,comm->comm);
67 comm->disconnect(
false);
83 if (caster==
nullptr) {
86 if (caster==
nullptr) {
97 return elect==
this || elect==
nullptr;