use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.
the class RegisterSampleApplications method registerTinkerMonteInterface.
private void registerTinkerMonteInterface() {
try {
System.out.println("#### Registering Tinker Monte Application Interface ####");
List<String> appModules = new ArrayList<String>();
appModules.add(monteXModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("xyzf", "O16.xyz", DataType.URI, null, 1, true, true, false, "Tinker monte input_1", null);
InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("keyf", "O16.key", DataType.URI, "-k", 2, true, true, false, "Tinker monte input_2", null);
InputDataObjectType input3 = RegisterSampleApplicationsUtils.createAppInput("stps", "20000", DataType.STRING, null, 3, true, true, false, "Tinker monte input_3", null);
InputDataObjectType input4 = RegisterSampleApplicationsUtils.createAppInput("Ctc", "C", DataType.STRING, null, 4, true, true, false, "Tinker monte input_4", null);
InputDataObjectType input5 = RegisterSampleApplicationsUtils.createAppInput("stpsZ", "3.0", DataType.STRING, null, 5, true, true, false, "Tinker monte input_5", null);
InputDataObjectType input6 = RegisterSampleApplicationsUtils.createAppInput("temp", "298", DataType.STRING, null, 6, true, true, false, "Tinker monte input_6", null);
InputDataObjectType input7 = RegisterSampleApplicationsUtils.createAppInput("Rconv", "0.01", DataType.STRING, null, 7, true, true, false, "Tinker monte input_7", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
applicationInputs.add(input2);
applicationInputs.add(input3);
applicationInputs.add(input4);
applicationInputs.add(input5);
applicationInputs.add(input6);
applicationInputs.add(input7);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("Diskoutputfile_with_dir", "", DataType.URI, false, false, null);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", null, DataType.STDOUT, true, true, null);
OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", null, DataType.STDERR, true, true, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
applicationOutputs.add(output3);
String addApplicationInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Tinker_Monte", "Monte application", appModules, applicationInputs, applicationOutputs));
System.out.println("Monte Application Interface Id " + addApplicationInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.
the class RegisterSampleApplications method registerAmberInterface.
public void registerAmberInterface() {
try {
System.out.println("#### Registering Amber Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(amberModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Heat_Restart_File", null, DataType.URI, "-c", 1, true, true, false, "Heating up the system equilibration stage - 02_Heat.rst", null);
InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("Production_Control_File", null, DataType.URI, "-i ", 2, true, true, false, "Constant pressure and temperature for production stage - 03_Prod.in", null);
InputDataObjectType input3 = RegisterSampleApplicationsUtils.createAppInput("Parameter_Topology_File", null, DataType.URI, "-p", 3, true, true, false, "Parameter and Topology coordinates - prmtop", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
applicationInputs.add(input2);
applicationInputs.add(input3);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Execution_Summary", "03_Prod.info", DataType.URI, true, true, "-inf");
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Execution_log", "03_Prod.out", DataType.URI, true, true, "-o");
OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Trajectory_file", "03_Prod.mdcrd", DataType.URI, true, true, "-x");
OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Restart_file", "03_Prod.rst", DataType.URI, true, true, " -r");
OutputDataObjectType output5 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", null, DataType.STDOUT, true, false, null);
OutputDataObjectType output6 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", null, DataType.STDERR, true, false, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
applicationOutputs.add(output3);
applicationOutputs.add(output4);
applicationOutputs.add(output5);
applicationOutputs.add(output6);
amberInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(amberName, amberDescription, appModules, applicationInputs, applicationOutputs));
System.out.println("Amber Application Interface Id " + amberInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.
the class RegisterSampleApplications method registerComputeHost.
public String registerComputeHost(String hostName, String hostDesc, ResourceJobManagerType resourceJobManagerType, String monitoringEndPoint, String jobMangerBinPath, SecurityProtocol securityProtocol, int portNumber, String jobManagerCommand, List<BatchQueue> batchQueues) throws TException {
ComputeResourceDescription computeResourceDescription = RegisterSampleApplicationsUtils.createComputeResourceDescription(hostName, hostDesc, null, null);
computeResourceDescription.setBatchQueues(batchQueues);
String computeResourceId = airavataClient.registerComputeResource(new AuthzToken(""), computeResourceDescription);
if (computeResourceId.isEmpty())
throw new AiravataClientException();
ResourceJobManager resourceJobManager = RegisterSampleApplicationsUtils.createResourceJobManager(resourceJobManagerType, monitoringEndPoint, jobMangerBinPath, null);
Map<JobManagerCommand, String> jobManagerCommandStringMap = new HashMap<JobManagerCommand, String>();
if (resourceJobManagerType == ResourceJobManagerType.SLURM) {
jobManagerCommandStringMap.put(JobManagerCommand.SUBMISSION, "sbatch");
jobManagerCommandStringMap.put(JobManagerCommand.JOB_MONITORING, "squeue");
jobManagerCommandStringMap.put(JobManagerCommand.DELETION, "scancel");
resourceJobManager.setJobManagerCommands(jobManagerCommandStringMap);
} else if (resourceJobManagerType == ResourceJobManagerType.PBS) {
jobManagerCommandStringMap.put(JobManagerCommand.SUBMISSION, "qsub");
jobManagerCommandStringMap.put(JobManagerCommand.JOB_MONITORING, "qstat");
jobManagerCommandStringMap.put(JobManagerCommand.DELETION, "qdel");
resourceJobManager.setJobManagerCommands(jobManagerCommandStringMap);
}
// TODO - set job manage commands for UGE and LSF type compute resources.
// TODO - set parallelism command
SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
sshJobSubmission.setResourceJobManager(resourceJobManager);
sshJobSubmission.setSecurityProtocol(securityProtocol);
sshJobSubmission.setSshPort(portNumber);
sshJobSubmission.setMonitorMode(MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR);
airavataClient.addSSHJobSubmissionDetails(new AuthzToken(""), computeResourceId, 1, sshJobSubmission);
SCPDataMovement scpDataMovement = new SCPDataMovement();
scpDataMovement.setSecurityProtocol(securityProtocol);
scpDataMovement.setSshPort(portNumber);
airavataClient.addSCPDataMovementDetails(new AuthzToken(""), computeResourceId, DMType.COMPUTE_RESOURCE, 1, scpDataMovement);
return computeResourceId;
}
use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.
the class RegisterSampleApplications method registerMPIInterface.
public void registerMPIInterface() {
try {
System.out.println("#### Registering MPI Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(mpiModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Sample_Input", "", DataType.STRING, null, 1, true, false, false, "An optional MPI source file", null);
InputDataObjectType input11 = RegisterSampleApplicationsUtils.createAppInput("US3INPUT", "", DataType.URI, null, 1, true, false, false, "Input US3 file", null);
InputDataObjectType input12 = RegisterSampleApplicationsUtils.createAppInput("US3INPUTARG", "", DataType.STRING, null, 1, true, false, false, "Input US3 Arg", null);
InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("NumberOfProcesses", "", DataType.INTEGER, null, 2, false, true, false, "Number Of Processes", null);
InputDataObjectType input3 = RegisterSampleApplicationsUtils.createAppInput("ProcessesPerHost", "", DataType.INTEGER, null, 3, false, true, false, "Processes per host", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
applicationInputs.add(input2);
applicationInputs.add(input3);
applicationInputs.add(input11);
applicationInputs.add(input12);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("STDOutput", "", DataType.STDOUT, true, true, null);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDErr", "", DataType.STDERR, true, true, null);
OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("US3OUT", "", DataType.STRING, true, false, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
applicationOutputs.add(output3);
mpiInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(mpiName, mpiDescription, appModules, applicationInputs, applicationOutputs));
System.out.println("MPI Application Interface Id " + mpiInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.
the class RegisterSampleApplications method registerLammpsInterface.
public void registerLammpsInterface() {
try {
System.out.println("#### Registering LAMMPS Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(lammpsModuleId);
appModules.add(lammpsModuleId1);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Friction_Simulation_Input", null, DataType.URI, "<", 1, true, true, false, "Friction Simulation Input - in.friction", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("LAMMPS_Simulation_Log", null, DataType.URI, true, true, null);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", null, DataType.STDOUT, true, true, null);
OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", null, DataType.STDERR, true, true, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
applicationOutputs.add(output3);
lammpsInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(lammpsName, lammpsDescription, appModules, applicationInputs, applicationOutputs));
System.out.println("LAMMPS Application Interface Id " + lammpsInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
Aggregations