use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.
the class BasicTaskgraphJob method main.
public static void main(String[] args) {
// first load the configurations from command line and config files
Config config = ResourceAllocator.loadConfig(new HashMap<>());
// build JobConfig
JobConfig jobConfig = new JobConfig();
// build the job
BasicJob basicJob = BasicJob.newBuilder().setName("basic-taskgraphJob").setContainerClass(SimpleTaskgraph.class.getName()).setRequestResource(new ResourceContainer(2, 1024), 2).setConfig(jobConfig).build();
// now submit the job
Twister2Submitter.submitContainerJob(basicJob, config);
}
use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.
the class MemoryManagerGatherJob method main.
public static void main(String[] args) {
// first load the configurations from command line and config files
Config config = ResourceAllocator.loadConfig(new HashMap<>());
// build JobConfig
JobConfig jobConfig = new JobConfig();
// build the job
BasicJob basicJob = BasicJob.newBuilder().setName("basic-gather-batch-MM").setContainerClass(BasicMemoryManagerGatherCommunication.class.getName()).setRequestResource(new ResourceContainer(2, 1024), 4).setConfig(jobConfig).build();
// now submit the job
Twister2Submitter.submitContainerJob(basicJob, config);
}
use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.
the class MemoryManagerTestJob method main.
public static void main(String[] args) {
// first load the configurations from command line and config files
Config config = ResourceAllocator.loadConfig(new HashMap<>());
// build JobConfig
JobConfig jobConfig = new JobConfig();
// build the job
BasicJob basicJob = BasicJob.newBuilder().setName("basic-gather-MM").setContainerClass(BasicMemoryManagerContainer.class.getName()).setRequestResource(new ResourceContainer(2, 1024), 1).setConfig(jobConfig).build();
// now submit the job
Twister2Submitter.submitContainerJob(basicJob, config);
}
use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.
the class MPIDataFlowCommunication method partition.
@Override
public DataFlowOperation partition(Map<String, Object> properties, MessageType type, int edge1, Set<Integer> sourceTasks, Set<Integer> destTasks, MessageReceiver receiver) {
// merge with the user specified configuration, user specified will take precedence
Config mergedCfg = Config.newBuilder().putAll(config).putAll(properties).build();
MPIDataFlowPartition dataFlowOperation = new MPIDataFlowPartition(channel, sourceTasks, destTasks, receiver, MPIDataFlowPartition.PartitionStratergy.DIRECT);
dataFlowOperation.init(mergedCfg, type, instancePlan, edge1);
return dataFlowOperation;
}
use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.
the class MPIDataFlowCommunication method reduce.
public DataFlowOperation reduce(Map<String, Object> properties, MessageType type, int edge, Set<Integer> sourceTasks, int destTask, MessageReceiver reduceReceiver, MessageReceiver partialReceiver, CompletionListener compListener) {
// merge with the user specified configuration, user specified will take precedence
Config mergedCfg = Config.newBuilder().putAll(config).putAll(properties).build();
// create the dataflow operation
MPIDataFlowReduce dataFlowOperation = new MPIDataFlowReduce(channel, sourceTasks, destTask, reduceReceiver, partialReceiver, compListener);
// intialize the operation
dataFlowOperation.init(mergedCfg, type, instancePlan, edge);
return dataFlowOperation;
}
Aggregations