use of edu.iu.dsc.tws.api.basic.job.BasicJob in project twister2 by DSC-SPIDAL.
the class MemoryManagerKeyedGatherJob 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(BasicMemoryManagerKeyedGatherCommunication.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.api.basic.job.BasicJob in project twister2 by DSC-SPIDAL.
the class MultiTaskGraphJob 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("multitaskgraph-example").setContainerClass(MultiTaskGraphExample.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.api.basic.job.BasicJob in project twister2 by DSC-SPIDAL.
the class BasicAuroraJob method main.
public static void main(String[] args) {
// first load the configurations from command line and config files
Config config = ResourceAllocator.loadConfig(new HashMap<>());
System.out.println("read config values: " + config.size());
System.out.println(config);
int cpus = Integer.parseInt(AuroraContext.cpusPerContainer(config));
int ramMegaBytes = AuroraContext.ramPerContainer(config) / (1024 * 1024);
int diskMegaBytes = AuroraContext.diskPerContainer(config) / (1024 * 1024);
int containers = Integer.parseInt(AuroraContext.numberOfContainers(config));
String jobName = SchedulerContext.jobName(config);
ResourceContainer resourceContainer = new ResourceContainer(cpus, ramMegaBytes, diskMegaBytes);
// build JobConfig
JobConfig jobConfig = new JobConfig();
String containerClass = SchedulerContext.containerClass(config);
// build the job
BasicJob basicJob = BasicJob.newBuilder().setName(jobName).setContainerClass(containerClass).setRequestResource(resourceContainer, containers).setConfig(jobConfig).build();
// now submit the job
Twister2Submitter.submitContainerJob(basicJob, config);
// now terminate the job
terminateJob(config);
// jobWriteTest(basicJob);
// jobReadTest();
}
use of edu.iu.dsc.tws.api.basic.job.BasicJob in project twister2 by DSC-SPIDAL.
the class BasicCxMultiTaskGraphJob 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();
// Task 0 provide input to Task 1 & Task 2 independent Parallel Tasks.
// build the job
BasicJob basicJob = BasicJob.newBuilder().setName("basic-cxmultitaskgraph").setContainerClass(// will be updated soon
SimpleCxMultiTaskGraph.class.getName()).setRequestResource(new ResourceContainer(2, 1024), 3).setConfig(jobConfig).build();
// now submit the job
Twister2Submitter.submitContainerJob(basicJob, config);
}
use of edu.iu.dsc.tws.api.basic.job.BasicJob in project twister2 by DSC-SPIDAL.
the class BasicKubernetesJob method submitJob.
/**
* submit the job
*/
public static void submitJob(Config config) {
int cpus = Integer.parseInt(AuroraContext.cpusPerContainer(config));
int ramMegaBytes = AuroraContext.ramPerContainer(config);
int diskMegaBytes = AuroraContext.diskPerContainer(config);
int containers = Integer.parseInt(AuroraContext.numberOfContainers(config));
String jobName = SchedulerContext.jobName(config);
ResourceContainer resourceContainer = new ResourceContainer(cpus, ramMegaBytes, diskMegaBytes);
// build JobConfig
JobConfig jobConfig = new JobConfig();
String containerClass = SchedulerContext.containerClass(config);
// build the job
BasicJob basicJob = BasicJob.newBuilder().setName(jobName).setContainerClass(containerClass).setRequestResource(resourceContainer, containers).setConfig(jobConfig).build();
// now submit the job
Twister2Submitter.submitContainerJob(basicJob, config);
}
Aggregations