use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.
the class BaseReduceHLCommunication 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-hl-reduce").setContainerClass(BaseReduceHLCommunication.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 MPIProcess method main.
public static void main(String[] args) {
Options cmdOptions = null;
try {
MPI.Init(args);
int rank = MPI.COMM_WORLD.getRank();
int size = MPI.COMM_WORLD.getSize();
cmdOptions = setupOptions();
CommandLineParser parser = new DefaultParser();
// parse the help options first.
CommandLine cmd = parser.parse(cmdOptions, args);
// load the configuration
// we are loading the configuration for all the components
Config config = loadConfigurations(cmd, rank);
// normal worker
LOG.log(Level.FINE, "A worker process is starting...");
worker(config, rank);
} catch (MPIException e) {
LOG.log(Level.SEVERE, "Failed the MPI process", e);
throw new RuntimeException(e);
} catch (ParseException e) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("SubmitterMain", cmdOptions);
throw new RuntimeException("Error parsing command line options: ", e);
} finally {
try {
MPI.Finalize();
} catch (MPIException ignore) {
}
}
}
use of edu.iu.dsc.tws.common.config.Config in project twister2 by DSC-SPIDAL.
the class BasicTaskSchedulingJob 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-testing").setContainerClass(TaskScheduling.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 ScpTest method main.
public static void main(String[] args) {
Config config = Config.newBuilder().put(ScpContext.UPLOAD_DIRECTORY, "/vagrant").put(ScpContext.TWISTER2_UPLOADER_SCP_OPTIONS, "").put(ScpContext.TWISTER2_UPLOADER_SCP_CONNECTION, "root@149.165.150.81").put(ScpContext.TWISTER2_UPLOADER_SSH_OPTIONS, "-i /Users/user1/.ssh/id_rsa").put(ScpContext.TWISTER2_UPLOADER_SSH_CONNECTION, "root@149.165.150.81").build();
ScpUploader uploader = new ScpUploader();
uploader.initialize(config);
// upload
URI destURI = uploader.uploadPackage("/Users/user1/Desktop/tobecopied");
System.out.println("File path in remote machine is " + destURI);
// delete
// uploader.undo();
// System.out.println("File deleted in remote machine");
}
Aggregations