|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--laser.mpi.util.shuffle.test.UseCase
An instance of UseCase contains all the data necessary to perform a single test. Of course, one instance of UseCase will be created on each proc. Each of these should have the same map, but they will have different localData.
Field Summary | |
(package private) java.lang.String |
error
A message explaining the error if test fails. |
(package private) java.lang.Object[] |
localData
The localData for this use case. |
(package private) Mapping[] |
map
The map for this use case. |
(package private) int |
myRank
The rank (ID) of this process. |
(package private) java.lang.String |
name
The name of this use case. |
(package private) java.lang.Object[] |
newLocalData
What the localData should look like after shuffling. |
(package private) int |
nProcs
The number of processes. |
(package private) Shuffler |
shuffler
The Shuffler which will be created to shuffle the data. |
Constructor Summary | |
UseCase()
Constructs a new instance of UseCase with default values for the fields. |
Method Summary | |
boolean |
test(Shuffler archetype)
This executes the test specified by this use case. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.lang.String name
Mapping[] map
java.lang.Object[] localData
java.lang.Object[] newLocalData
java.lang.String error
int nProcs
int myRank
Shuffler shuffler
Constructor Detail |
public UseCase() throws mpi.MPIException
mpi.MPIException
- if something goes awry with the MPI callsMethod Detail |
public boolean test(Shuffler archetype) throws mpi.MPIException
Finally, each proc other than 0 sends a bit saying whether the test passed or failed on that proc to proc 0. Proc 0 takes the "and" over all those bits (including its own) and if the result is true, it prints a message saying that the test passed, else it says the test failed.
Finally, the return value. On proc 0, the value returned is the global correctness: i.e., it is true iff every proc passed the test. On all otherh procs, the value returned is the local correctness, i.e., whether or not that particular proc passed.
This method should be called by each proc in the communicator.
archetype
- any instance of the Shuffler class which will
be used to create a new instance to test
mpi.MPIException
- if something goes awry with MPI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |