use of es.bsc.compss.types.fake.FakeAllocatableAction in project compss by bsc-wdc.
the class AllocatableActionTest method testEndResourceAndDataSuccessors.
private void testEndResourceAndDataSuccessors() {
LOGGER.info("testEndDataAndResourceSuccessors");
try {
prepare(4);
FakeAllocatableAction instance0 = new FakeAllocatableAction(fao, 0);
instance0.assignResource(rs);
FakeAllocatableAction instance1 = new FakeAllocatableAction(fao, 1);
instance1.assignResource(rs);
FakeAllocatableAction instance2 = new FakeAllocatableAction(fao, 2);
instance2.assignResource(rs);
FakeAllocatableAction instance3 = new FakeAllocatableAction(fao, 3);
instance3.assignResource(rs);
instance1.addDataPredecessor(instance0);
addResourceDependency(instance0, instance2);
instance0.tryToLaunch();
completed(instance0);
checkExecutions(new int[] { 1, 1, 1, 0 });
} catch (Throwable e) {
LOGGER.error(e);
fail(e.getMessage());
}
}
use of es.bsc.compss.types.fake.FakeAllocatableAction in project compss by bsc-wdc.
the class AllocatableActionTest method testEndResourceSuccessors.
private void testEndResourceSuccessors() {
LOGGER.info("testEndResourceSuccessors");
try {
prepare(4);
FakeAllocatableAction instance0 = new FakeAllocatableAction(fao, 0);
instance0.assignResource(rs);
FakeAllocatableAction instance1 = new FakeAllocatableAction(fao, 1);
instance1.assignResource(rs);
FakeAllocatableAction instance2 = new FakeAllocatableAction(fao, 2);
instance2.assignResource(rs);
FakeAllocatableAction instance3 = new FakeAllocatableAction(fao, 3);
instance3.assignResource(rs);
addResourceDependency(instance0, instance1);
instance0.tryToLaunch();
completed(instance0);
checkExecutions(new int[] { 1, 1, 0, 0 });
} catch (Throwable e) {
LOGGER.error(e);
fail(e.getMessage());
}
}
use of es.bsc.compss.types.fake.FakeAllocatableAction in project compss by bsc-wdc.
the class AllocatableActionTest method testEndTwoResourcesPredecessors.
private void testEndTwoResourcesPredecessors() {
LOGGER.info("testEndTwoResourcesPredecessors");
try {
prepare(4);
FakeAllocatableAction instance0 = new FakeAllocatableAction(fao, 0);
instance0.assignResource(rs);
FakeAllocatableAction instance1 = new FakeAllocatableAction(fao, 1);
instance1.assignResource(rs);
FakeAllocatableAction instance2 = new FakeAllocatableAction(fao, 2);
instance2.assignResource(rs);
FakeAllocatableAction instance3 = new FakeAllocatableAction(fao, 3);
instance3.assignResource(rs);
addResourceDependency(instance0, instance2);
addResourceDependency(instance1, instance2);
instance0.tryToLaunch();
completed(instance0);
checkExecutions(new int[] { 1, 0, 0, 0 });
instance1.tryToLaunch();
completed(instance1);
checkExecutions(new int[] { 1, 1, 1, 0 });
} catch (Throwable e) {
LOGGER.error(e);
fail(e.getMessage());
}
}
use of es.bsc.compss.types.fake.FakeAllocatableAction in project compss by bsc-wdc.
the class AllocatableActionTest method testEndTwoResourceSuccessors.
private void testEndTwoResourceSuccessors() {
LOGGER.info("testEndTwoDataSuccessors");
try {
prepare(4);
FakeAllocatableAction instance0 = new FakeAllocatableAction(fao, 0);
instance0.assignResource(rs);
FakeAllocatableAction instance1 = new FakeAllocatableAction(fao, 1);
instance1.assignResource(rs);
FakeAllocatableAction instance2 = new FakeAllocatableAction(fao, 2);
instance2.assignResource(rs);
FakeAllocatableAction instance3 = new FakeAllocatableAction(fao, 3);
instance3.assignResource(rs);
addResourceDependency(instance0, instance1);
addResourceDependency(instance0, instance2);
instance0.tryToLaunch();
completed(instance0);
checkExecutions(new int[] { 1, 1, 1, 0 });
} catch (Throwable e) {
LOGGER.error(e);
fail(e.getMessage());
}
}
use of es.bsc.compss.types.fake.FakeAllocatableAction in project compss by bsc-wdc.
the class AllocatableActionTest method testEndTwoDataSuccessors.
private void testEndTwoDataSuccessors() {
LOGGER.info("testEndTwoDataSuccessors");
try {
prepare(4);
FakeAllocatableAction instance0 = new FakeAllocatableAction(fao, 0);
instance0.assignResource(rs);
FakeAllocatableAction instance1 = new FakeAllocatableAction(fao, 1);
instance1.assignResource(rs);
FakeAllocatableAction instance2 = new FakeAllocatableAction(fao, 2);
instance2.assignResource(rs);
FakeAllocatableAction instance3 = new FakeAllocatableAction(fao, 3);
instance3.assignResource(rs);
instance1.addDataPredecessor(instance0);
instance2.addDataPredecessor(instance0);
instance0.tryToLaunch();
completed(instance0);
checkExecutions(new int[] { 1, 1, 1, 0 });
} catch (Throwable e) {
LOGGER.error(e);
fail(e.getMessage());
}
}
Aggregations