airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [12/14] airavata git commit: adding parallelism types
Date Thu, 03 Mar 2016 18:15:22 GMT
adding parallelism types


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

Branch: refs/heads/master
Commit: 833de75a3e27621bc151f6cc6bae39b47e101c7a
Parents: d66d169
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Fri Feb 26 17:00:25 2016 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Fri Feb 26 17:00:25 2016 -0500

----------------------------------------------------------------------
 .../client/samples/RegisterSampleData.java      |  2 +-
 .../tools/RegisterOGCEUS3Application.java       |  2 +-
 .../tools/RegisterSampleApplications.java       |  2 +-
 .../tools/RegisterSampleApplicationsUtils.java  |  2 +-
 .../client/tools/RegisterUS3Application.java    |  2 +-
 .../apache/airavata/gfac/core/GFacUtils.java    | 28 +++++---------------
 .../task/utils/bes/ApplicationProcessor.java    |  2 +-
 .../catalog/impl/ApplicationDeploymentImpl.java |  2 +-
 .../ApplicationRegister.java                    |  2 +-
 9 files changed, 14 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java
index 557b208..c737695 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/RegisterSampleData.java
@@ -24,7 +24,6 @@ package org.apache.airavata.client.samples;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
 import org.apache.airavata.client.tools.RegisterSampleApplicationsUtils;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
@@ -39,6 +38,7 @@ import org.apache.airavata.model.application.io.OutputDataObjectType;
 import org.apache.airavata.model.data.movement.DataMovementInterface;
 import org.apache.airavata.model.data.movement.DataMovementProtocol;
 import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.parallelism.ApplicationParallelismType;
 import org.apache.airavata.model.security.AuthzToken;
 import org.apache.airavata.model.workspace.Gateway;
 import org.apache.thrift.TException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
index 6ed6a78..b95cdd7 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterOGCEUS3Application.java
@@ -23,7 +23,6 @@ package org.apache.airavata.client.tools;
 
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
@@ -34,6 +33,7 @@ import org.apache.airavata.model.data.movement.DMType;
 import org.apache.airavata.model.data.movement.SCPDataMovement;
 import org.apache.airavata.model.data.movement.SecurityProtocol;
 import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.parallelism.ApplicationParallelismType;
 import org.apache.airavata.model.security.AuthzToken;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 836c88d..7c2a648 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -24,7 +24,6 @@ import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
 import org.apache.airavata.client.samples.CreateLaunchExperiment;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.appdeployment.CommandObject;
 import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
@@ -37,6 +36,7 @@ import org.apache.airavata.model.data.movement.DataMovementProtocol;
 import org.apache.airavata.model.data.movement.SCPDataMovement;
 import org.apache.airavata.model.data.movement.SecurityProtocol;
 import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.parallelism.ApplicationParallelismType;
 import org.apache.airavata.model.security.AuthzToken;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
index dfe6b80..202b9a0 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
@@ -23,7 +23,6 @@ package org.apache.airavata.client.tools;
 
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.appdeployment.CommandObject;
 import org.apache.airavata.model.appcatalog.appinterface.*;
 import org.apache.airavata.model.appcatalog.computeresource.*;
@@ -33,6 +32,7 @@ import org.apache.airavata.model.application.io.InputDataObjectType;
 import org.apache.airavata.model.application.io.OutputDataObjectType;
 import org.apache.airavata.model.data.movement.DataMovementInterface;
 import org.apache.airavata.model.data.movement.DataMovementProtocol;
+import org.apache.airavata.model.parallelism.ApplicationParallelismType;
 
 import java.util.List;
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
index 9523389..20c5474 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterUS3Application.java
@@ -23,7 +23,6 @@ package org.apache.airavata.client.tools;
 
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
@@ -34,6 +33,7 @@ import org.apache.airavata.model.data.movement.DMType;
 import org.apache.airavata.model.data.movement.SCPDataMovement;
 import org.apache.airavata.model.data.movement.SecurityProtocol;
 import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.parallelism.ApplicationParallelismType;
 import org.apache.airavata.model.security.AuthzToken;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 1325659..aa44fc6 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -596,33 +596,17 @@ public class GFacUtils {
         }
 
         ApplicationParallelismType parallelism = appDepDescription.getParallelism();
+        Map<ApplicationParallelismType, String> parallelismPrefix = processContext.getResourceJobManager().getParallelismPrefix();
         if (parallelism != null) {
             if (parallelism != ApplicationParallelismType.SERIAL) {
-                // FIXME this needs to be fixed once parallaliasation retrieved by app catalog
-                if (appDepDescription.getComputeHostId().contains("stampede")){
-                    jobDescriptor.setJobSubmitter("ibrun");
-                }else if (appDepDescription.getComputeHostId().contains("bigred2")){
-                    if (parallelism == ApplicationParallelismType.CRAY_MPI){
-                        if (processModel.getApplicationInterfaceId().contains("Lammps")){
-                            jobDescriptor.setJobSubmitter("aprun -N 1 -n");
-                        }else {
-                            jobDescriptor.setJobSubmitter("aprun -n");
-                        }
-                    }else if (parallelism == ApplicationParallelismType.CCM){
-                        jobDescriptor.setJobSubmitter("ccmrun");
+                if (parallelismPrefix != null){
+                    String parallelismCommand = parallelismPrefix.get(parallelism);
+                    if (parallelismCommand != null){
+                        jobDescriptor.setJobSubmitter(parallelismCommand);
                     }else {
-                        jobDescriptor.setJobSubmitter("aprun -n");
+                        throw new GFacException("Parallelism prefix is not defined for given
parallelism type " + parallelism + ".. Please define the parallelism prefix at App Catalog");
                     }
-                }else if (appDepDescription.getComputeHostId().contains("comet")){
-                    jobDescriptor.setJobSubmitter("mpiexec");
-                }else if (appDepDescription.getComputeHostId().contains("gordon")){
-                    jobDescriptor.setJobSubmitter(" mpirun_rsh -hostfile $PBS_NODEFILE -np");
-                }else if (appDepDescription.getComputeHostId().contains("alamo")){
-                    jobDescriptor.setJobSubmitter("mpirun -np");
-                }else {
-                    jobDescriptor.setJobSubmitter("ibrun");
                 }
-
             }
         }
         return jobDescriptor;

http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/ApplicationProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/ApplicationProcessor.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/ApplicationProcessor.java
index b17b92e..d9ef7e2 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/ApplicationProcessor.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/ApplicationProcessor.java
@@ -23,8 +23,8 @@ package org.apache.airavata.gfac.impl.task.utils.bes;
 
 import org.apache.airavata.gfac.core.context.ProcessContext;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.model.parallelism.ApplicationParallelismType;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType;
 import org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.FileNameType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationDeploymentImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationDeploymentImpl.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationDeploymentImpl.java
index 3cb219e..9d49f0a 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationDeploymentImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationDeploymentImpl.java
@@ -22,9 +22,9 @@
 package org.apache.airavata.registry.core.app.catalog.impl;
 
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.appdeployment.CommandObject;
 import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
+import org.apache.airavata.model.parallelism.ApplicationParallelismType;
 import org.apache.airavata.registry.core.app.catalog.resources.*;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogThriftConversion;
 import org.apache.airavata.registry.cpi.AppCatalogException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/833de75a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
index 76a9db0..5fa6ad3 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
@@ -24,12 +24,12 @@ package org.apache.airavata.testsuite.multitenantedairavata;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
-import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.appdeployment.CommandObject;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.application.io.DataType;
 import org.apache.airavata.model.application.io.InputDataObjectType;
 import org.apache.airavata.model.application.io.OutputDataObjectType;
+import org.apache.airavata.model.parallelism.ApplicationParallelismType;
 import org.apache.airavata.model.security.AuthzToken;
 import org.apache.airavata.model.workspace.Gateway;
 import org.apache.airavata.testsuite.multitenantedairavata.utils.FrameworkUtils;


Mime
View raw message