use of org.apache.airavata.model.application.io.OutputDataObjectType in project airavata by apache.
the class CreateLaunchExperiment method createExperimentWRFStampede.
public static String createExperimentWRFStampede(Airavata.Client client) throws TException {
try {
List<InputDataObjectType> exInputs = client.getApplicationInputs(new AuthzToken(""), wrfAppId);
setWRFInputs(exInputs);
List<OutputDataObjectType> exOut = client.getApplicationOutputs(new AuthzToken(""), wrfAppId);
ExperimentModel simpleExperiment = ExperimentModelUtil.createSimpleExperiment(DEFAULT_GATEWAY, "default", "admin", "WRFExperiment", "Testing", wrfAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
Map<String, String> computeResources = airavataClient.getAvailableAppInterfaceComputeResources(new AuthzToken(""), wrfAppId);
if (computeResources != null && computeResources.size() != 0) {
for (String id : computeResources.keySet()) {
String resourceName = computeResources.get(id);
if (resourceName.equals(stampedeHostName)) {
ComputationalResourceSchedulingModel scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 2, 32, 1, "development", 90, 1);
UserConfigurationDataModel userConfigurationData = new UserConfigurationDataModel();
userConfigurationData.setAiravataAutoSchedule(false);
userConfigurationData.setOverrideManualScheduledParams(false);
userConfigurationData.setComputationalResourceScheduling(scheduling);
simpleExperiment.setUserConfigurationData(userConfigurationData);
return client.createExperiment(new AuthzToken(""), DEFAULT_GATEWAY, simpleExperiment);
}
}
}
} catch (AiravataSystemException e) {
logger.error("Error occured while creating the experiment...", e.getMessage());
throw new AiravataSystemException(e);
} catch (InvalidRequestException e) {
logger.error("Error occured while creating the experiment...", e.getMessage());
throw new InvalidRequestException(e);
} catch (AiravataClientException e) {
logger.error("Error occured while creating the experiment...", e.getMessage());
throw new AiravataClientException(e);
} catch (TException e) {
logger.error("Error occured while creating the experiment...", e.getMessage());
throw new TException(e);
}
return null;
}
use of org.apache.airavata.model.application.io.OutputDataObjectType in project airavata by apache.
the class CreateLaunchExperiment method createExperimentWRFTrestles.
public static String createExperimentWRFTrestles(Airavata.Client client) throws TException {
try {
List<InputDataObjectType> exInputs = client.getApplicationInputs(new AuthzToken(""), wrfAppId);
setWRFInputs(exInputs);
List<OutputDataObjectType> exOut = client.getApplicationOutputs(new AuthzToken(""), wrfAppId);
ExperimentModel simpleExperiment = ExperimentModelUtil.createSimpleExperiment(DEFAULT_GATEWAY, "default", "admin", "WRFExperiment", "Testing", wrfAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
Map<String, String> computeResources = airavataClient.getAvailableAppInterfaceComputeResources(new AuthzToken(""), wrfAppId);
if (computeResources != null && computeResources.size() != 0) {
for (String id : computeResources.keySet()) {
String resourceName = computeResources.get(id);
if (resourceName.equals(trestlesHostName)) {
ComputationalResourceSchedulingModel scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 1, 1, 1, "normal", 30, 1);
UserConfigurationDataModel userConfigurationData = new UserConfigurationDataModel();
userConfigurationData.setAiravataAutoSchedule(false);
userConfigurationData.setOverrideManualScheduledParams(false);
userConfigurationData.setComputationalResourceScheduling(scheduling);
simpleExperiment.setUserConfigurationData(userConfigurationData);
return client.createExperiment(new AuthzToken(""), DEFAULT_GATEWAY, simpleExperiment);
}
}
}
} catch (AiravataSystemException e) {
logger.error("Error occured while creating the experiment...", e.getMessage());
throw new AiravataSystemException(e);
} catch (InvalidRequestException e) {
logger.error("Error occured while creating the experiment...", e.getMessage());
throw new InvalidRequestException(e);
} catch (AiravataClientException e) {
logger.error("Error occured while creating the experiment...", e.getMessage());
throw new AiravataClientException(e);
} catch (TException e) {
logger.error("Error occured while creating the experiment...", e.getMessage());
throw new TException(e);
}
return null;
}
use of org.apache.airavata.model.application.io.OutputDataObjectType in project airavata by apache.
the class RegisterSampleApplications method registerEspressoInterface.
public void registerEspressoInterface() {
try {
System.out.println("#### Registering Espresso Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(espressoModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("AI_Primitive_Cell", null, DataType.URI, null, 1, true, true, false, "AI_Metal_Input_File - Al.sample.in", null);
InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("AI_Pseudopotential_File", null, DataType.URI, null, 2, true, true, false, "Constant pressure and temperature for production stage - Al.pz-vbc.UPF", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
applicationInputs.add(input2);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("ESPRESSO_Execution_Log", null, DataType.URI, true, true, null);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("ESPRESSO_WFC_Binary_file", null, DataType.URI, true, true, null);
OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", null, DataType.STDOUT, true, true, null);
OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", null, DataType.STDERR, true, true, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
applicationOutputs.add(output3);
applicationOutputs.add(output4);
espressoInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(espressoName, espressoDescription, appModules, applicationInputs, applicationOutputs));
System.out.println("Espresso Application Interface Id " + espressoInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.application.io.OutputDataObjectType in project airavata by apache.
the class RegisterSampleApplications method registerPhastaInterface.
public void registerPhastaInterface() {
try {
System.out.println("#### Registering PHASTA Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(phastaModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Parasolid_Geometric_Model", null, DataType.URI, null, 1, true, true, false, "Parasolid geometric model - geom.xmt_txt", null);
InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("Problem_Definition", null, DataType.URI, null, 2, true, true, false, "problem definition - geom.smd", null);
InputDataObjectType input3 = RegisterSampleApplicationsUtils.createAppInput("Mesh_Description_File", null, DataType.URI, null, 3, true, true, false, "Mesh Description - geom.sms", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
applicationInputs.add(input2);
applicationInputs.add(input3);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("PHASTA_Execution_Log", null, DataType.URI, true, true, null);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("PHASTA_Output_tar", null, DataType.URI, true, true, null);
OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", null, DataType.STDOUT, true, true, null);
OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", null, DataType.STDERR, true, true, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
applicationOutputs.add(output3);
applicationOutputs.add(output4);
phastaInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(phastaName, phastaDescription, appModules, applicationInputs, applicationOutputs));
System.out.println("phasta Application Interface Id " + phastaInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.application.io.OutputDataObjectType in project airavata by apache.
the class RegisterSampleApplications method registerNWChemInterface.
public void registerNWChemInterface() {
try {
System.out.println("#### Registering NWChem Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(nwChemModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Water_Molecule_Input", null, DataType.URI, null, 1, true, true, false, "Water Molecule Input File - water.nw", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("NWChem_Execution_Log", null, DataType.URI, true, 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);
nwChemInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(nwChemName, nwChemDescription, appModules, applicationInputs, applicationOutputs));
System.out.println("NWChem Application Interface Id " + nwChemInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
Aggregations