appl.parallel.spmd
Class AdvancedSPMDClientController

java.lang.Object
  extended by appl.parallel.spmd.SPMDClientController
      extended by appl.parallel.spmd.AdvancedSPMDClientController
All Implemented Interfaces:
AdvancedSPMDClientInterface, SPMDClientInterface

public class AdvancedSPMDClientController
extends SPMDClientController
implements AdvancedSPMDClientInterface

Performance optimizations on client side can be made with this class. Allows heavy multithreading.

Merging can be done in a separate thread (parallel to further computation)

Author:
Dominik Appl
See Also:
for details on the usage of a client controller

Nested Class Summary
 
Nested classes/interfaces inherited from class appl.parallel.spmd.SPMDClientController
SPMDClientController.STATE
 
Field Summary
 
Fields inherited from class appl.parallel.spmd.SPMDClientController
referenceResourceID
 
Constructor Summary
AdvancedSPMDClientController(Vector<ComputingResourceContainer> computingResources, double[] weights, ClientDataServer spmdClient, CommEventSink eventProxy)
          same parameters as superclass
 
Method Summary
 void mergeMultiData(MultiDataObject multidata, int idx, SyncPoint s)
          Merges like SPMDClientController.mergeMultiData(MultiDataObject, int).
 void mergeMultiData(MultiDataObject multidata, int idx, SyncPoint s, PrintStream stream, String message)
          Merges like SPMDClientController.mergeMultiData(MultiDataObject, int).
 void mergePartition(Object partition, SyncPoint s)
          Merges like SPMDClientController.mergePartition(int), but in a separate thread, so that communication does not block computation.
 void mergePartition(Object partition, SyncPoint s, PrintStream stream, String message)
          Same functionality as AdvancedSPMDClientInterface.mergePartition(Object, SyncPoint), gives a message to the given PrintStream
 void synchronizeToSyncPoint(SyncPoint s)
          Waits until the Thread with the specified SyncPoint finishes.
 
Methods inherited from class appl.parallel.spmd.SPMDClientController
addBaseParameter, addBaseParameters, addToMultiDataSplitControl, addToMultiDataSplitControl, addToSplitControl, checkSplittable, checkSplittableArray, close, getState, mergeAllPartitions, mergeMultiData, mergeMultiData, mergePartition, mergePartition, runSPMDModelTask, setBoxingMode, setNeighborhoodRange, setReferenceResource, updateNeighborhood, updateNeighborhood
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface appl.parallel.spmd.SPMDClientInterface
addBaseParameter, addBaseParameters, addToMultiDataSplitControl, addToMultiDataSplitControl, addToSplitControl, mergeAllPartitions, mergeMultiData, mergeMultiData, mergePartition, mergePartition, runSPMDModelTask, setBoxingMode, setNeighborhoodRange, setReferenceResource, updateNeighborhood, updateNeighborhood
 

Constructor Detail

AdvancedSPMDClientController

public AdvancedSPMDClientController(Vector<ComputingResourceContainer> computingResources,
                                    double[] weights,
                                    ClientDataServer spmdClient,
                                    CommEventSink eventProxy)
same parameters as superclass

See Also:
SPMDClientController.SPMDClientController(Vector, double[], ClientDataServer, CommEventSink)
Method Detail

mergePartition

public void mergePartition(Object partition,
                           SyncPoint s,
                           PrintStream stream,
                           String message)
Description copied from interface: AdvancedSPMDClientInterface
Same functionality as AdvancedSPMDClientInterface.mergePartition(Object, SyncPoint), gives a message to the given PrintStream

Specified by:
mergePartition in interface AdvancedSPMDClientInterface
Parameters:
partition - the partition to merge
s - a SyncPoint
stream - the message is given out to this stream (or null for no message)
message - the message to be displayed when finished (or null for no message)
See Also:
AdvancedSPMDClientInterface.mergeMultiData(MultiDataObject, int, SyncPoint)

mergePartition

public void mergePartition(Object partition,
                           SyncPoint s)
Description copied from interface: AdvancedSPMDClientInterface
Merges like SPMDClientController.mergePartition(int), but in a separate thread, so that communication does not block computation. See also synchronization points

Specified by:
mergePartition in interface AdvancedSPMDClientInterface
Parameters:
partition - the partition to be merged (must be splittable)
s - a syncpoint

mergeMultiData

public void mergeMultiData(MultiDataObject multidata,
                           int idx,
                           SyncPoint s,
                           PrintStream stream,
                           String message)
Description copied from interface: AdvancedSPMDClientInterface
Merges like SPMDClientController.mergeMultiData(MultiDataObject, int). But allows also synchronization points. At the end of the merge a message is given to the provided PrintStream.

Specified by:
mergeMultiData in interface AdvancedSPMDClientInterface
Parameters:
multidata - the multidataobject
idx - the partition of the MultiDataObject to be merged
s - a SyncPoint
stream - the message is given out to this stream (or null for no message)
message - the message to be diplayed when finished (or null for no message)

mergeMultiData

public void mergeMultiData(MultiDataObject multidata,
                           int idx,
                           SyncPoint s)
Description copied from interface: AdvancedSPMDClientInterface
Merges like SPMDClientController.mergeMultiData(MultiDataObject, int). But allows also synchronization points

Specified by:
mergeMultiData in interface AdvancedSPMDClientInterface
Parameters:
multidata - the multidataobject
idx - the partition of the MultiDataObject to be merged
s - a SyncPoint

synchronizeToSyncPoint

public void synchronizeToSyncPoint(SyncPoint s)
Description copied from interface: AdvancedSPMDClientInterface
Waits until the Thread with the specified SyncPoint finishes. After that the Thread is removed. A second thread which synchronizes to the same Point will directly continue.

Specified by:
synchronizeToSyncPoint in interface AdvancedSPMDClientInterface
Parameters:
s - the SyncPoint