You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2014/07/11 21:58:16 UTC

[1/2] git commit: adding amber support

Repository: airavata
Updated Branches:
  refs/heads/master 0714710f1 -> 95d35adef


adding amber support


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/add6eee8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/add6eee8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/add6eee8

Branch: refs/heads/master
Commit: add6eee8209653cb66f0e58d9cf47a4a8b19bd5a
Parents: d64741c
Author: lahiru <la...@apache.org>
Authored: Fri Jul 11 15:56:37 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Fri Jul 11 15:56:37 2014 -0400

----------------------------------------------------------------------
 .../client/samples/CreateLaunchExperiment.java  | 161 ++++++++++++++++++-
 .../client/tools/DocumentCreatorNew.java        |  85 ++++++++++
 2 files changed, 244 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/add6eee8/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index cc68aee..d812ff0 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -67,6 +67,10 @@ public class CreateLaunchExperiment {
     private static String br2EchoAppId = "bigred2_f435286c-545b-4b31-8366-3e1c6df66c9a,SimpleEchoBR_223a4aa8-fdb9-4d4f-b3cd-b9253c3c9af";
     private static String slurmWRFAppId = "stampede.tacc.xsede.org_2840c815-7e61-4579-8194-79fe15cea9a9,WRF_00817e82-7995-4986-8fe2-72da08b63ef0";
     private static String br2AmberAppId = "bigred2_5dc35993-31c4-499e-97c1-8d934007e135,AmberBR2_f63fd6f9-a93f-43a8-bd41-065740a32f1f";
+    private static String slurmAmberAppId = "bigred2_5dc35993-31c4-499e-97c1-8d934007e135,AmberBR2_f63fd6f9-a93f-43a8-bd41-065740a32f1f";
+    private static String trestlesAmberAppId = "trestles.sdsc.edu_8ca93e3d-135c-4e3a-bf58-bdcc2592625d,AmberTrestles_ea0e8e82-3b00-4ef7-9a78-867cfecebbf1";
+
+
 
     public static void main(String[] args) {
         try {
@@ -82,8 +86,10 @@ public class CreateLaunchExperiment {
 //            final String expId = createExperimentForLonestar(airavata);
 //            final String expId = createExperimentWRFTrestles(client);
 //            final String expId = createExperimentForBR2(client);
-            final String expId = createExperimentForBR2Amber(client);
+//            final String expId = createExperimentForBR2Amber(client);
 //            final String expId = createExperimentWRFStampede(client);
+//            final String expId = createExperimentForStampedeAmber(client);
+            final String expId = createExperimentForTrestlesAmber(client);
 
             System.out.println("Experiment ID : " + expId);
 //            updateExperiment(airavata, expId);
@@ -110,7 +116,9 @@ public class CreateLaunchExperiment {
 //            documentCreator.createEchoHostDocs();
 //            br2EchoAppId = documentCreator.createBigRedDocs();
 //            slurmWRFAppId = documentCreator.createSlumWRFDocs();
-            br2AmberAppId = documentCreator.createBigRedAmberDocs();
+//            br2AmberAppId = documentCreator.createBigRedAmberDocs();
+//            slurmAmberAppId = documentCreator.createStampedeAmberDocs();
+            trestlesAmberAppId = documentCreator.createTrestlesAmberDocs();
             System.out.printf(localHostAppId);
             System.out.println(sshHostAppId);
             System.out.println(pbsEchoAppId);
@@ -120,6 +128,7 @@ public class CreateLaunchExperiment {
             System.out.println(br2EchoAppId);
             System.out.println(slurmWRFAppId);
             System.out.println(br2AmberAppId);
+            System.out.println(trestlesAmberAppId);
         } catch (Exception e) {
             logger.error("Unable to create documents", e.getMessage());
             throw new ApplicationSettingsException(e.getMessage());
@@ -632,6 +641,154 @@ public class CreateLaunchExperiment {
         }
     }
 
+    public static String createExperimentForStampedeAmber(Airavata.Client client) throws TException {
+        try {
+            List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
+            DataObjectType input = new DataObjectType();
+            input.setKey("AMBER_HEAT_RST");
+            input.setType(DataType.URI);
+            input.setValue("/Users/lahirugunathilake/Downloads/02_Heat.rst");
+            exInputs.add(input);
+
+            DataObjectType input1 = new DataObjectType();
+            input1.setKey("AMBER_PROD_IN");
+            input1.setType(DataType.URI);
+            input1.setValue("/Users/lahirugunathilake/Downloads/03_Prod.in");
+            exInputs.add(input1);
+
+            DataObjectType input2 = new DataObjectType();
+            input2.setKey("AMBER_PRMTOP");
+            input2.setType(DataType.URI);
+            input2.setValue("/Users/lahirugunathilake/Downloads/prmtop");
+            exInputs.add(input2);
+
+            List<DataObjectType> exOut = new ArrayList<DataObjectType>();
+            DataObjectType output = new DataObjectType();
+            output.setKey("AMBER_Prod.info");
+            output.setType(DataType.URI);
+            output.setValue("");
+            exOut.add(output);
+
+            DataObjectType output1 = new DataObjectType();
+            output1.setKey("AMBER_Prod.mdcrd");
+            output1.setType(DataType.URI);
+            output1.setValue("");
+            exOut.add(output1);
+            DataObjectType output2 = new DataObjectType();
+            output2.setKey("AMBER_Prod.out");
+            output2.setType(DataType.URI);
+            output2.setValue("");
+            exOut.add(output2);
+            DataObjectType output3 = new DataObjectType();
+            output3.setKey("AMBER_Prod.rst");
+            output3.setType(DataType.URI);
+            output3.setValue("");
+            exOut.add(output3);
+
+            Project project = ProjectModelUtil.createProject("default", "admin", "test project");
+            String projectId = client.createProject(project);
+
+            Experiment simpleExperiment =
+                    ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "sshEchoExperiment", "SimpleEchoBR", slurmAmberAppId.split(",")[1], exInputs);
+            simpleExperiment.setExperimentOutputs(exOut);
+
+            ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(slurmAmberAppId.split(",")[0], 4, 1, 1, "development", 20, 0, 1, null);
+            scheduling.setResourceHostId("bigred2.uits.iu.edu");
+            UserConfigurationData userConfigurationData = new UserConfigurationData();
+            userConfigurationData.setAiravataAutoSchedule(false);
+            userConfigurationData.setOverrideManualScheduledParams(false);
+            userConfigurationData.setComputationalResourceScheduling(scheduling);
+            simpleExperiment.setUserConfigurationData(userConfigurationData);
+            return client.createExperiment(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);
+        }
+    }
+
+    public static String createExperimentForTrestlesAmber(Airavata.Client client) throws TException {
+           try {
+               List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
+               DataObjectType input = new DataObjectType();
+               input.setKey("AMBER_HEAT_RST");
+               input.setType(DataType.URI);
+               input.setValue("/Users/lahirugunathilake/Downloads/02_Heat.rst");
+               exInputs.add(input);
+
+               DataObjectType input1 = new DataObjectType();
+               input1.setKey("AMBER_PROD_IN");
+               input1.setType(DataType.URI);
+               input1.setValue("/Users/lahirugunathilake/Downloads/03_Prod.in");
+               exInputs.add(input1);
+
+               DataObjectType input2 = new DataObjectType();
+               input2.setKey("AMBER_PRMTOP");
+               input2.setType(DataType.URI);
+               input2.setValue("/Users/lahirugunathilake/Downloads/prmtop");
+               exInputs.add(input2);
+
+               List<DataObjectType> exOut = new ArrayList<DataObjectType>();
+               DataObjectType output = new DataObjectType();
+               output.setKey("AMBER_Prod.info");
+               output.setType(DataType.URI);
+               output.setValue("");
+               exOut.add(output);
+
+               DataObjectType output1 = new DataObjectType();
+               output1.setKey("AMBER_Prod.mdcrd");
+               output1.setType(DataType.URI);
+               output1.setValue("");
+               exOut.add(output1);
+               DataObjectType output2 = new DataObjectType();
+               output2.setKey("AMBER_Prod.out");
+               output2.setType(DataType.URI);
+               output2.setValue("");
+               exOut.add(output2);
+               DataObjectType output3 = new DataObjectType();
+               output3.setKey("AMBER_Prod.rst");
+               output3.setType(DataType.URI);
+               output3.setValue("");
+               exOut.add(output3);
+
+               Project project = ProjectModelUtil.createProject("default", "admin", "test project");
+               String projectId = client.createProject(project);
+
+               Experiment simpleExperiment =
+                       ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "sshEchoExperiment", "SimpleEchoBR", trestlesAmberAppId.split(",")[1], exInputs);
+               simpleExperiment.setExperimentOutputs(exOut);
+
+               ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(trestlesAmberAppId.split(",")[0], 4, 1, 1, "normal", 20, 0, 1, null);
+               scheduling.setResourceHostId("bigred2.uits.iu.edu");
+               UserConfigurationData userConfigurationData = new UserConfigurationData();
+               userConfigurationData.setAiravataAutoSchedule(false);
+               userConfigurationData.setOverrideManualScheduledParams(false);
+               userConfigurationData.setComputationalResourceScheduling(scheduling);
+               simpleExperiment.setUserConfigurationData(userConfigurationData);
+               return client.createExperiment(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);
+           }
+       }
+
     public static void launchExperiment(Airavata.Client client, String expId)
             throws TException {
         try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/add6eee8/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
index 98a5759..c13bceb 100644
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
+++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
@@ -753,7 +753,92 @@ public class DocumentCreatorNew {
         return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
     }
 
+    public String createStampedeAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
+        host.addToHostAliases(stampedeHostAddress);
+        host.addToIpAddresses(stampedeHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(2222);
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+        ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
+        amodule.setAppModuleId(client.registerApplicationModule(amodule));
+
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+        application.setApplicationName("AmberBR2");
+        application.addToApplicationModules(amodule.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/home1/01437/ogce/apps/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberStampede");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
+
+
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+
+    }
 
+    public String createTrestlesAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
+        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(trestleshpcHostAddress, null, null);
+        host.addToIpAddresses(trestleshpcHostAddress);
+        host.addToHostAliases(trestleshpcHostAddress);
+        host.setComputeResourceId(client.registerComputeResource(host));
+
+        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
+        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.PBS, "/opt/torque/bin/", null, null);
+        sshJobSubmission.setResourceJobManager(resourceJobManager);
+        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+        sshJobSubmission.setSshPort(22);
+        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);
+
+        SCPDataMovement scpDataMovement = new SCPDataMovement();
+        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
+        scpDataMovement.setSshPort(22);
+        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
+
+        ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
+        amodule.setAppModuleId(client.registerApplicationModule(amodule));
+
+
+        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
+        application.setApplicationName("AmberTrestles");
+        application.addToApplicationModules(amodule.getAppModuleId());
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
+        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
+        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
+        application.setApplicationInterfaceId(client.registerApplicationInterface(application));
+
+        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/home/ogce/apps/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberStampede");
+        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));
+
+        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));
+
+
+        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
+
+    }
 
 
 }


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata

Posted by la...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/95d35ade
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/95d35ade
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/95d35ade

Branch: refs/heads/master
Commit: 95d35adefddad7c1e1ff8cc25c5e71f15d82bf50
Parents: add6eee 0714710
Author: lahiru <la...@apache.org>
Authored: Fri Jul 11 15:57:07 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Fri Jul 11 15:57:07 2014 -0400

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/server/GfacServerHandler.java     | 6 +++---
 .../java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------