airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: removing extra scpace when adding email addresses and test framework changes to ultrascan application
Date Fri, 24 Apr 2015 16:44:28 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 73da33a37 -> bf0f8efc8


removing extra scpace when adding email addresses and test framework changes to ultrascan
application


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

Branch: refs/heads/master
Commit: bf0f8efc8ea9ae898e3c8b48c90b41fea3507f59
Parents: 73da33a
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Fri Apr 24 12:44:24 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Fri Apr 24 12:44:24 2015 -0400

----------------------------------------------------------------------
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |   2 +-
 .../ComputeResourceRegister.java                |   5 +-
 .../ExperimentExecution.java                    | 144 ++++++++++---------
 .../FrameworkBootstrapping.java                 |   4 +-
 .../TestFrameworkProps.java                     |  10 ++
 .../src/main/resources/test-framework.json      |   7 +-
 6 files changed, 93 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/bf0f8efc/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index e94a499..bb580fb 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -301,7 +301,7 @@ public class GFACSSHUtils {
             String userJobNotifEmailIds = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_EMAILIDS);
             if (userJobNotifEmailIds != null && !userJobNotifEmailIds.isEmpty())
{
                 if (emailIds != null && !emailIds.isEmpty()) {
-                    emailIds += (", " + userJobNotifEmailIds);
+                    emailIds += ("," + userJobNotifEmailIds);
                 } else {
                     emailIds = userJobNotifEmailIds;
                 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/bf0f8efc/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
index 3ca61ba..b28b8b0 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
@@ -96,7 +96,7 @@ public class ComputeResourceRegister {
                     bigredResourceId = registerComputeHost("bigred2.uits.iu.edu", "IU BigRed
II Cluster",
                             ResourceJobManagerType.PBS, "push", "/opt/torque/torque-5.0.1/bin/",
SecurityProtocol.SSH_KEYS, 22, "aprun -n");
                     System.out.println("BigredII Resource Id is " + bigredResourceId);
-                } else if (resourceName.contains("gorden")) {
+                } else if (resourceName.contains("gordon")) {
                     //Register BigRedII
                     gordenResourceId = registerComputeHost("gordon.sdsc.edu", "SDSC Gorden
Cluster",
                             ResourceJobManagerType.PBS, "push", "/opt/torque/bin/", SecurityProtocol.SSH_KEYS,
22, "mpirun_rsh -hostfile $PBS_NODEFILE -np");
@@ -142,6 +142,7 @@ public class ComputeResourceRegister {
         SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
         sshJobSubmission.setResourceJobManager(resourceJobManager);
         sshJobSubmission.setSecurityProtocol(securityProtocol);
+//        sshJobSubmission.setMonitorMode(MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR);
         sshJobSubmission.setSshPort(portNumber);
         airavata.addSSHJobSubmissionDetails(computeResourceId, 1, sshJobSubmission);
 
@@ -214,7 +215,7 @@ public class ComputeResourceRegister {
                         bigRedCgatewayResourcePreferences = createComputeResourcePreference(resourceId,
"TG-STA110014S", false, null, null, null,
                                 "/N/dc2/scratch/cgateway/gta-work-dirs", loginUserName);
                         airavata.addGatewayComputeResourcePreference(gatewayResourceProfile.getGatewayID(),
resourceId, bigRedCgatewayResourcePreferences);
-                    }else if (resourceId.contains("gorden") && loginUserName.equals("us3")){
+                    }else if (resourceId.contains("gordon") && loginUserName.equals("us3")){
                         gordenUS3ResourcePreference = createComputeResourcePreference(resourceId,
"uot111", false, null, JobSubmissionProtocol.SSH,
                                 DataMovementProtocol.SCP, "/home/us3/gordon/work/airavata",
loginUserName);
                         airavata.addGatewayComputeResourcePreference(gatewayResourceProfile.getGatewayID(),
resourceId, gordenUS3ResourcePreference);

http://git-wip-us.apache.org/repos/asf/airavata/blob/bf0f8efc/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
index 03da1e7..f13056a 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
@@ -246,9 +246,9 @@ public class ExperimentExecution {
                             resultWriter.println("End of Results for Experiment : " + expId
);
                             resultWriter.println("=====================================================================");
                         }
-                        System.out.println(" Experiment Id : '" + expId
-                                + "' with state : '" + event.getState().toString() +
-                                " for Gateway " + event.getGatewayId());
+//                        System.out.println(" Experiment Id : '" + expId
+//                                + "' with state : '" + event.getState().toString() +
+//                                " for Gateway " + event.getGatewayId());
                     } catch (TException e) {
                         logger.error(e.getMessage(), e);
                     }
@@ -501,6 +501,7 @@ public class ExperimentExecution {
     public void createUltrascanExperiment () throws Exception{
         try {
             TestFrameworkProps.Application[] applications = properties.getApplications();
+            int numberOfIterations = properties.getNumberOfIterations();
             Map<String, String> userGivenAmberInputs = new HashMap<>();
             for (TestFrameworkProps.Application application : applications){
                 if (application.getName().equals(TestFrameworkConstants.AppcatalogConstants.ULTRASCAN)){
@@ -508,82 +509,83 @@ public class ExperimentExecution {
                 }
             }
 
-            for (String gatewayId : csTokens.keySet()){
-                String token = csTokens.get(gatewayId);
-                Map<String, String> appsWithNames = appInterfaceMap.get(gatewayId);
-                for (String appId : appsWithNames.keySet()){
-                    String appName = appsWithNames.get(appId);
-                    if (appName.equals(TestFrameworkConstants.AppcatalogConstants.ULTRASCAN)){
-                        List<InputDataObjectType> applicationInputs = airavata.getApplicationInputs(appId);
-                        List<OutputDataObjectType> appOutputs = airavata.getApplicationOutputs(appId);
-                        for (String inputName : userGivenAmberInputs.keySet()){
-                            for (InputDataObjectType inputDataObjectType : applicationInputs)
{
-                                if (inputDataObjectType.getName().equalsIgnoreCase(inputName))
{
-                                    inputDataObjectType.setValue(userGivenAmberInputs.get(inputName));
+            for (int i=0; i < numberOfIterations; i++){
+                for (String gatewayId : csTokens.keySet()){
+                    String token = csTokens.get(gatewayId);
+                    Map<String, String> appsWithNames = appInterfaceMap.get(gatewayId);
+                    for (String appId : appsWithNames.keySet()){
+                        String appName = appsWithNames.get(appId);
+                        if (appName.equals(TestFrameworkConstants.AppcatalogConstants.ULTRASCAN)){
+                            List<InputDataObjectType> applicationInputs = airavata.getApplicationInputs(appId);
+                            List<OutputDataObjectType> appOutputs = airavata.getApplicationOutputs(appId);
+                            for (String inputName : userGivenAmberInputs.keySet()){
+                                for (InputDataObjectType inputDataObjectType : applicationInputs)
{
+                                    if (inputDataObjectType.getName().equalsIgnoreCase(inputName))
{
+                                        inputDataObjectType.setValue(userGivenAmberInputs.get(inputName));
+                                    }
                                 }
                             }
-                        }
-                        List<Project> projectsPerGateway = projectsMap.get(gatewayId);
-                        String projectID = null;
-                        if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
-                            projectID = projectsPerGateway.get(0).getProjectID();
-                        }
-                        Experiment simpleExperiment =
-                                ExperimentModelUtil.createSimpleExperiment(projectID, testUser,
"Ultrascan Experiment", "Ultrascan Experiment run", appId, applicationInputs);
-                        simpleExperiment.setExperimentOutputs(appOutputs);
-                        String experimentId;
-                        Map<String, String> computeResources = airavata.getAvailableAppInterfaceComputeResources(appId);
-                        if (computeResources != null && computeResources.size() !=
0) {
-                            for (String id : computeResources.keySet()) {
-                                String resourceName = computeResources.get(id);
-                                if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.TRESTLES_RESOURCE_NAME))
{
-                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id,
4, 1, 1, "normal", 30, 0, 1, null);
-                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                    userConfigurationData.setAiravataAutoSchedule(false);
-                                    userConfigurationData.setOverrideManualScheduledParams(false);
-                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                    experimentsWithTokens.put(experimentId, token);
-                                    experimentsWithGateway.put(experimentId, gatewayId);
-                                }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.STAMPEDE_RESOURCE_NAME))
{
-                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id,
4, 1, 1, "normal", 30, 0, 1, null);
-                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                    userConfigurationData.setAiravataAutoSchedule(false);
-                                    userConfigurationData.setOverrideManualScheduledParams(false);
-                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                    experimentsWithTokens.put(experimentId, token);
-                                    experimentsWithGateway.put(experimentId, gatewayId);
-                                    createAmberWithErrorInputs(gatewayId, token, projectID,
id, appId);
-                                    createAmberWithErrorUserConfig(gatewayId, token, projectID,
id, appId);
-                                } else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.ALAMO_RESOURCE_NAME))
{
-                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id,
4, 1, 1, "normal", 30, 0, 1, null);
-                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                    userConfigurationData.setAiravataAutoSchedule(false);
-                                    userConfigurationData.setOverrideManualScheduledParams(false);
-                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                    experimentsWithTokens.put(experimentId, token);
-                                    experimentsWithGateway.put(experimentId, gatewayId);
-                                }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.GORDEN_RESOURCE_NAME))
{
-                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id,
4, 1, 1, "normal", 30, 0, 1, null);
-                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                    userConfigurationData.setAiravataAutoSchedule(false);
-                                    userConfigurationData.setOverrideManualScheduledParams(false);
-                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                    experimentsWithTokens.put(experimentId, token);
-                                    experimentsWithGateway.put(experimentId, gatewayId);
+                            List<Project> projectsPerGateway = projectsMap.get(gatewayId);
+                            String projectID = null;
+                            if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
+                                projectID = projectsPerGateway.get(0).getProjectID();
+                            }
+                            Experiment simpleExperiment =
+                                    ExperimentModelUtil.createSimpleExperiment(projectID,
testUser, "TestFR_Ultrascan_Experiment", "Ultrascan Experiment run", appId, applicationInputs);
+                            simpleExperiment.setExperimentOutputs(appOutputs);
+                            String experimentId;
+                            Map<String, String> computeResources = airavata.getAvailableAppInterfaceComputeResources(appId);
+                            if (computeResources != null && computeResources.size()
!= 0) {
+                                for (String id : computeResources.keySet()) {
+                                    String resourceName = computeResources.get(id);
+                                    if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.STAMPEDE_RESOURCE_NAME))
{
+                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id,
4, 1, 1, "normal", 30, 0, 1, null);
+                                        UserConfigurationData userConfigurationData = new
UserConfigurationData();
+                                        userConfigurationData.setAiravataAutoSchedule(false);
+                                        userConfigurationData.setOverrideManualScheduledParams(false);
+                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                        experimentId = airavata.createExperiment(gatewayId,
simpleExperiment);
+                                        experimentsWithTokens.put(experimentId, token);
+                                        experimentsWithGateway.put(experimentId, gatewayId);
+                                    } else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.TRESTLES_RESOURCE_NAME))
{
+                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id,
4, 1, 1, "normal", 30, 0, 1, null);
+                                        UserConfigurationData userConfigurationData = new
UserConfigurationData();
+                                        userConfigurationData.setAiravataAutoSchedule(false);
+                                        userConfigurationData.setOverrideManualScheduledParams(false);
+                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                        experimentId = airavata.createExperiment(gatewayId,
simpleExperiment);
+                                        experimentsWithTokens.put(experimentId, token);
+                                        experimentsWithGateway.put(experimentId, gatewayId);
+                                    }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.ALAMO_RESOURCE_NAME))
{
+                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id,
4, 1, 1, "batch", 30, 0, 1, null);
+                                        UserConfigurationData userConfigurationData = new
UserConfigurationData();
+                                        userConfigurationData.setAiravataAutoSchedule(false);
+                                        userConfigurationData.setOverrideManualScheduledParams(false);
+                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                        experimentId = airavata.createExperiment(gatewayId,
simpleExperiment);
+                                        experimentsWithTokens.put(experimentId, token);
+                                        experimentsWithGateway.put(experimentId, gatewayId);
+                                    }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.GORDEN_RESOURCE_NAME))
{
+                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id,
4, 1, 1, "normal", 30, 0, 1, null);
+                                        UserConfigurationData userConfigurationData = new
UserConfigurationData();
+                                        userConfigurationData.setAiravataAutoSchedule(false);
+                                        userConfigurationData.setOverrideManualScheduledParams(false);
+                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                        experimentId = airavata.createExperiment(gatewayId,
simpleExperiment);
+                                        experimentsWithTokens.put(experimentId, token);
+                                        experimentsWithGateway.put(experimentId, gatewayId);
+                                    }
                                 }
                             }
                         }
                     }
                 }
             }
+
         }catch (Exception e){
             logger.error("Error while creating Ultrascan experiment", e);
             throw new Exception("Error while creating Ultrascan experiment", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/bf0f8efc/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
index 0d3f68d..d4878fd 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
@@ -85,8 +85,8 @@ public class FrameworkBootstrapping {
                 experimentExecution.createUltrascanExperiment();
 //                experimentExecution.createEchoExperiment();
 //                experimentExecution.createAmberExperiment();
-//                experimentExecution.launchExperiments();
-//                experimentExecution.monitorExperiments();
+                experimentExecution.launchExperiments();
+                experimentExecution.monitorExperiments();
             }
         } catch (Exception e) {
             logger.error("Error occured while set up", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/bf0f8efc/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
index 158a2ec..ea9956a 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
@@ -40,10 +40,20 @@ public class TestFrameworkProps {
     private Resource[] resources;
     private Application[] applications;
     private Error[] errors;
+    private int numberOfIterations;
+
 
     public TestFrameworkProps() {
     }
 
+    public int getNumberOfIterations() {
+        return numberOfIterations;
+    }
+
+    public void setNumberOfIterations(int numberOfIterations) {
+        this.numberOfIterations = numberOfIterations;
+    }
+
     public int getGcount() {
         return gcount;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/bf0f8efc/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
b/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
index e5526fa..f25b091 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
@@ -12,15 +12,16 @@
     "resultFileLoc": "/tmp/test_framework_results/",
     "skippedGateways": "default,php_reference_gateway,ultrascan,umass",
     "injectErrors" : true,
+    "numberOfIterations" : 10,
     "resources": [
         {
             "name": "trestles.sdsc.xsede.org",
-            "loginUser": "ogce"
+            "loginUser": "us3"
 
         },
         {
             "name": "stampede.tacc.xsede.org",
-            "loginUser": "ogce"
+            "loginUser": "us3"
 
         },
         {
@@ -49,7 +50,7 @@
             }
         },
         {
-            "name": "ultrascan",
+            "name": "Ultrascan",
             "inputs": {
                 "input": "/Users/chathuri/dev/airavata/source/php/inputs/hpcinput.tar",
                 "mgroupcount": "-mgroupcount=1",


Mime
View raw message