|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.udc.gii.common.eaf.algorithm.parallel.topology.Topology
es.udc.gii.common.eaf.algorithm.parallel.topology.operator.MSTopology
public class MSTopology
Field Summary | |
---|---|
protected boolean |
master
true if this process is the master in this topology. |
protected static int |
MASTER
Rank of the default master process. |
protected static int |
MSG_TAG
|
protected int |
myMaster
The rank of the master of this topology. |
static int |
NONE
Special return value when there is no master. |
private java.util.Map<mpi.Request,MSEnvelope[]> |
pendingSendRequest
|
Fields inherited from class es.udc.gii.common.eaf.algorithm.parallel.topology.Topology |
---|
communicator, receivers, senders, topologyRank |
Constructor Summary | |
---|---|
MSTopology()
Creates a new instance of EvaluationTopology. |
|
MSTopology(int races)
Creates a new instance of EvaluationTopology. |
Method Summary | |
---|---|
private void |
addSendRequest(mpi.Request request,
MSEnvelope[] evalObj)
|
protected void |
doConfigure()
A subclass might need additional configuration. |
protected void |
doConfigure(org.apache.commons.configuration.Configuration conf)
A subclass might need additional configuration. |
protected void |
doInitialize()
Performs the initialization. |
protected MSEnvelope |
doReceive()
Performs the receive operation. |
protected void |
doSend(MSEnvelope evalObj)
Performs the send operation. |
boolean |
evaluationObjectReceived()
Checks if some evaluation object has been received. |
void |
finish()
|
int |
getMaster()
Retuns the rank of the master of this topology. |
boolean |
isMaster()
Returns true if the calling process is the master process
of this topology. |
MSEnvelope |
receive()
Receives a MSEnvelope from a slave or from a master. |
void |
send(MSEnvelope evalObj)
Sends a MSEnvelope to a slave or to the master. |
private void |
testSendRequests()
|
Methods inherited from class es.udc.gii.common.eaf.algorithm.parallel.topology.Topology |
---|
configure, getCommunicator, getRaces, getReceivers, getSenders, getSize, getTopologyRank, initialize, isConnected, isInitialized, setInitialized, setRaces, synchronize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Map<mpi.Request,MSEnvelope[]> pendingSendRequest
protected static final int MSG_TAG
protected static final int MASTER
protected boolean master
true
if this process is the master in this topology.
public static final int NONE
protected int myMaster
Constructor Detail |
---|
public MSTopology()
public MSTopology(int races)
Method Detail |
---|
protected void doInitialize()
doInitialize
in class Topology
protected void doConfigure()
Topology
doConfigure
in class Topology
protected void doConfigure(org.apache.commons.configuration.Configuration conf)
Topology
doConfigure
in class Topology
private void testSendRequests()
private void addSendRequest(mpi.Request request, MSEnvelope[] evalObj)
protected void doSend(MSEnvelope evalObj)
public void send(MSEnvelope evalObj)
MSEnvelope
to a slave or to the master. The receiver
is known by the method MSEnvelope.getDest()
of evalObj
.
This method is implemented with the EvaluationTopology.doSend(es.udc.gii.common.eaf.algorithm.parallel.topology.evaluation.EvaluationObject)
method.
It is a nonblocking send.
protected MSEnvelope doReceive()
public MSEnvelope receive()
MSEnvelope
from a slave or from a master. For slaves
it returns null
when the evaluation process is finished.
For all processes it returns null
when an object is received
that's not an instance of MSEnvelope
.
This method is implemented with the MSEnvelope#doReceive
method.
It is a blocking receive, so the caller waits until a message is arrived.
public boolean evaluationObjectReceived()
true
if an evaluation object has been received,
false
otherwise.public int getMaster()
EvaluationTopology.NONE
.
public boolean isMaster()
true
if the calling process is the master process
of this topology. Returns false
otherwise.
public void finish()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |