|
||||||||||
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.migration.MigrationTopology
es.udc.gii.common.eaf.algorithm.parallel.topology.migration.GridMigrationTopology
public class GridMigrationTopology
A grid migration topology is a migration topology where the nodes are arranged in a (perhaps multidimensional) grid.
Each dimension of the grid might be periodic, i.e. the first element of the dimension is connected to the last. Thus this topology can be used to construct a ring, which is a periodic one-dimensional grid, a torus, hypercubes, etc. Configuration example:<Topology> <Class>...topology.GridMigrationTopology</Class> <Races>18</Races> <Dimension count="3" periodic="true"/> <Dimension count="2" periodic="false"/> <Dimension count="3"/> </Topology>
This example configures a GridMigrationTopology with 3 dimensions. Dimension 1 has 3 nodes and is periodic, dimension has 2 nodes and is not periodic and dimension 3 has 3 nodes and is not periodic. There are hence 3 x 2 x 3 = 18 nodes needed.
Field Summary | |
---|---|
private boolean[] |
dimIsPeriodic
|
private int[] |
nodesPerDimension
|
Fields inherited from class es.udc.gii.common.eaf.algorithm.parallel.topology.Topology |
---|
communicator, receivers, senders, topologyRank |
Constructor Summary | |
---|---|
GridMigrationTopology()
Creates a new instance of GridMigrationTopology. |
|
GridMigrationTopology(int races,
int[] nodesPerDimension,
boolean[] dimIsPeriodic)
Creates a new instance of GridMigrationTopology. |
Method Summary | |
---|---|
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()
A subclass might need additional initialization. |
boolean[] |
getDimIsPeriodic()
|
int[] |
getNodesPerDimension()
|
private int |
neededNodes()
Calculates how many nodes (races) are needed for the current configuration. |
void |
setDimIsPeriodic(boolean[] dimIsPeriodic)
Sets if a dimension of the grid is periodic (i.e. the last node an the first are connected) for each dimension. |
void |
setNodesPerDimension(int[] nodesPerDimension)
Sets how many nodes will each dimension have. |
Methods inherited from class es.udc.gii.common.eaf.algorithm.parallel.topology.migration.MigrationTopology |
---|
doReceive, doSend, finish, receive, send |
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 int[] nodesPerDimension
private boolean[] dimIsPeriodic
Constructor Detail |
---|
public GridMigrationTopology()
public GridMigrationTopology(int races, int[] nodesPerDimension, boolean[] dimIsPeriodic)
nodesPerDimension
and dimIsPeriodic
see
setNodesPerDimension(int[])
and
setDimIsPeriodic(boolean[])
.
Method Detail |
---|
private int neededNodes()
protected void doInitialize()
Topology
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
public int[] getNodesPerDimension()
public void setNodesPerDimension(int[] nodesPerDimension)
nodesPerDimension
.
This parameter should be set before the method Topology.initialize()
is called. After Topology#initialize is called, setting the nodes per dimension
will have no effect.
public boolean[] getDimIsPeriodic()
public void setDimIsPeriodic(boolean[] dimIsPeriodic)
dimIsPeriodic
must be equal to the number of dimensions of the grid.
This parameter should be set before the method Topology.initialize()
is called. After Topology#initialize is called, setting this parameter will have
no effect.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |