Search in sources :

Example 26 with Config

use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.

the class MPIDataFlowCommunication method allGather.

@Override
public DataFlowOperation allGather(Map<String, Object> properties, MessageType type, int edge1, int edge2, Set<Integer> sourceTasks, Set<Integer> destTasks, int middleTask, MessageReceiver finalRecvr) {
    // merge with the user specified configuration, user specified will take precedence
    Config mergedCfg = Config.newBuilder().putAll(config).putAll(properties).build();
    // create the dataflow operation
    MPIDataFlowAllGather dataFlowOperation = new MPIDataFlowAllGather(channel, sourceTasks, destTasks, middleTask, finalRecvr, edge1, edge2);
    // intialize the operation
    dataFlowOperation.init(mergedCfg, type, instancePlan, edge1);
    return dataFlowOperation;
}
Also used : Config(edu.iu.dsc.tws.common.config.Config)

Example 27 with Config

use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.

the class MPIDataFlowCommunication method keyedGather.

@Override
public DataFlowOperation keyedGather(Map<String, Object> properties, MessageType type, Set<Integer> edge, Set<Integer> sourceTasks, Set<Integer> destTasks, MultiMessageReceiver receiver) {
    // merge with the user specified configuration, user specified will take precedence
    Config mergedCfg = Config.newBuilder().putAll(config).putAll(properties).build();
    // create the dataflow operation
    MPIDataFlowMultiGather dataFlowOperation = new MPIDataFlowMultiGather(channel, sourceTasks, destTasks, receiver, edge);
    // intialize the operation
    dataFlowOperation.init(mergedCfg, type, instancePlan, 0);
    return dataFlowOperation;
}
Also used : Config(edu.iu.dsc.tws.common.config.Config)

Example 28 with Config

use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.

the class MPIDataFlowCommunication method allReduce.

public DataFlowOperation allReduce(Map<String, Object> properties, MessageType type, int edge1, int edge2, Set<Integer> sourceTasks, Set<Integer> destTasks, int middleTask, ReduceFunction reduceFunction, ReduceReceiver receiver, boolean stream) {
    // merge with the user specified configuration, user specified will take precedence
    Config mergedCfg = Config.newBuilder().putAll(config).putAll(properties).build();
    // create the dataflow operation
    MPIDataFlowAllReduce dataFlowOperation = new MPIDataFlowAllReduce(channel, sourceTasks, destTasks, middleTask, reduceFunction, receiver, edge1, edge2, stream);
    // intialize the operation
    dataFlowOperation.init(mergedCfg, type, instancePlan, 0);
    return dataFlowOperation;
}
Also used : Config(edu.iu.dsc.tws.common.config.Config)

Example 29 with Config

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) {
    // 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);
    // intialize the operation
    dataFlowOperation.init(mergedCfg, type, instancePlan, edge);
    return dataFlowOperation;
}
Also used : Config(edu.iu.dsc.tws.common.config.Config)

Example 30 with Config

use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.

the class MPIDataFlowCommunication method direct.

public DataFlowOperation direct(Map<String, Object> properties, MessageType type, int edge, Set<Integer> sourceTasks, int destTask, MessageReceiver receiver) {
    // merge with the user specified configuration, user specified will take precedence
    Config mergedCfg = Config.newBuilder().putAll(config).putAll(properties).build();
    // create the dataflow operation
    MPIDirectDataFlowCommunication dataFlowOperation = new MPIDirectDataFlowCommunication(channel, sourceTasks, destTask, receiver);
    // intialize the operation
    dataFlowOperation.init(mergedCfg, type, instancePlan, edge);
    return dataFlowOperation;
}
Also used : Config(edu.iu.dsc.tws.common.config.Config)

Aggregations

Config (edu.iu.dsc.tws.common.config.Config)59 JobConfig (edu.iu.dsc.tws.api.JobConfig)31 BasicJob (edu.iu.dsc.tws.api.basic.job.BasicJob)30 ResourceContainer (edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer)30 InputFormat (edu.iu.dsc.tws.data.api.InputFormat)3 Path (edu.iu.dsc.tws.data.fs.Path)3 InputSplit (edu.iu.dsc.tws.data.fs.io.InputSplit)3 InputSplitAssigner (edu.iu.dsc.tws.data.fs.io.InputSplitAssigner)3 TextInputFormatter (edu.iu.dsc.tws.data.api.formatters.TextInputFormatter)2 URI (java.net.URI)2 CommandLine (org.apache.commons.cli.CommandLine)2 CommandLineParser (org.apache.commons.cli.CommandLineParser)2 DefaultParser (org.apache.commons.cli.DefaultParser)2 HelpFormatter (org.apache.commons.cli.HelpFormatter)2 Options (org.apache.commons.cli.Options)2 ParseException (org.apache.commons.cli.ParseException)2 BinaryInputFormatter (edu.iu.dsc.tws.data.api.formatters.BinaryInputFormatter)1 FileInputSplit (edu.iu.dsc.tws.data.fs.FileInputSplit)1 JobAPI (edu.iu.dsc.tws.proto.system.job.JobAPI)1 IController (edu.iu.dsc.tws.rsched.spi.scheduler.IController)1