airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject git commit: Adding parallelism type to deployment - AIRAVATA-1203
Date Sun, 06 Jul 2014 19:03:04 GMT
Repository: airavata
Updated Branches:
  refs/heads/master fe4ac34b8 -> 109158602


Adding parallelism type to deployment - AIRAVATA-1203


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

Branch: refs/heads/master
Commit: 10915860231515f91212510f48040e3b74757e9b
Parents: fe4ac34
Author: Suresh Marru <smarru@apache.org>
Authored: Sun Jul 6 15:02:55 2014 -0400
Committer: Suresh Marru <smarru@apache.org>
Committed: Sun Jul 6 15:02:55 2014 -0400

----------------------------------------------------------------------
 .../lib/applicationDeploymentModel_types.cpp    | 134 ++++++++++-------
 .../lib/applicationDeploymentModel_types.h      |  24 ++-
 .../Model/AppCatalog/AppDeployment/Types.php    |  59 ++++++--
 .../ApplicationDeploymentDescription.java       | 150 ++++++++++++++++---
 .../applicationDeploymentModel.thrift           |  33 +++-
 5 files changed, 307 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/10915860/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
index f11af28..323d352 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
@@ -10,6 +10,20 @@
 
 
 
+int _kApplicationParallelismTypeValues[] = {
+  ApplicationParallelismType::SERIAL,
+  ApplicationParallelismType::MPI,
+  ApplicationParallelismType::OPENMP,
+  ApplicationParallelismType::OPENMP_MPI
+};
+const char* _kApplicationParallelismTypeNames[] = {
+  "SERIAL",
+  "MPI",
+  "OPENMP",
+  "OPENMP_MPI"
+};
+const std::map<int, const char*> _ApplicationParallelismType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4,
_kApplicationParallelismTypeValues, _kApplicationParallelismTypeNames), ::apache::thrift::TEnumIterator(-1,
NULL, NULL));
+
 const char* SetEnvPaths::ascii_fingerprint = "07A9615F837F7D0A952B595DD3020972";
 const uint8_t SetEnvPaths::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
 
@@ -215,8 +229,8 @@ void swap(ApplicationModule &a, ApplicationModule &b) {
   swap(a.__isset, b.__isset);
 }
 
-const char* ApplicationDeploymentDescription::ascii_fingerprint = "3A2FD6631F126C4A6D132FA8EEFDAD7E";
-const uint8_t ApplicationDeploymentDescription::binary_fingerprint[16] = {0x3A,0x2F,0xD6,0x63,0x1F,0x12,0x6C,0x4A,0x6D,0x13,0x2F,0xA8,0xEE,0xFD,0xAD,0x7E};
+const char* ApplicationDeploymentDescription::ascii_fingerprint = "19A9841A9F4627A2C10F4A28E2CF0E17";
+const uint8_t ApplicationDeploymentDescription::binary_fingerprint[16] = {0x19,0xA9,0x84,0x1A,0x9F,0x46,0x27,0xA2,0xC1,0x0F,0x4A,0x28,0xE2,0xCF,0x0E,0x17};
 
 uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TProtocol* iprot)
{
 
@@ -234,6 +248,7 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
   bool isset_appModuleId = false;
   bool isset_computeHostId = false;
   bool isset_executablePath = false;
+  bool isset_parallelism = false;
 
   while (true)
   {
@@ -284,6 +299,16 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
         }
         break;
       case 6:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast0;
+          xfer += iprot->readI32(ecast0);
+          this->parallelism = (ApplicationParallelismType::type)ecast0;
+          isset_parallelism = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 7:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
           xfer += iprot->readString(this->appDeploymentDescription);
           this->__isset.appDeploymentDescription = true;
@@ -291,18 +316,18 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
           xfer += iprot->skip(ftype);
         }
         break;
-      case 7:
+      case 8:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->moduleLoadCmds.clear();
-            uint32_t _size0;
-            ::apache::thrift::protocol::TType _etype3;
-            xfer += iprot->readListBegin(_etype3, _size0);
-            this->moduleLoadCmds.resize(_size0);
-            uint32_t _i4;
-            for (_i4 = 0; _i4 < _size0; ++_i4)
+            uint32_t _size1;
+            ::apache::thrift::protocol::TType _etype4;
+            xfer += iprot->readListBegin(_etype4, _size1);
+            this->moduleLoadCmds.resize(_size1);
+            uint32_t _i5;
+            for (_i5 = 0; _i5 < _size1; ++_i5)
             {
-              xfer += iprot->readString(this->moduleLoadCmds[_i4]);
+              xfer += iprot->readString(this->moduleLoadCmds[_i5]);
             }
             xfer += iprot->readListEnd();
           }
@@ -311,18 +336,18 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
           xfer += iprot->skip(ftype);
         }
         break;
-      case 8:
+      case 9:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->libPrependPaths.clear();
-            uint32_t _size5;
-            ::apache::thrift::protocol::TType _etype8;
-            xfer += iprot->readListBegin(_etype8, _size5);
-            this->libPrependPaths.resize(_size5);
-            uint32_t _i9;
-            for (_i9 = 0; _i9 < _size5; ++_i9)
+            uint32_t _size6;
+            ::apache::thrift::protocol::TType _etype9;
+            xfer += iprot->readListBegin(_etype9, _size6);
+            this->libPrependPaths.resize(_size6);
+            uint32_t _i10;
+            for (_i10 = 0; _i10 < _size6; ++_i10)
             {
-              xfer += this->libPrependPaths[_i9].read(iprot);
+              xfer += this->libPrependPaths[_i10].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -331,18 +356,18 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
           xfer += iprot->skip(ftype);
         }
         break;
-      case 9:
+      case 10:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->libAppendPaths.clear();
-            uint32_t _size10;
-            ::apache::thrift::protocol::TType _etype13;
-            xfer += iprot->readListBegin(_etype13, _size10);
-            this->libAppendPaths.resize(_size10);
-            uint32_t _i14;
-            for (_i14 = 0; _i14 < _size10; ++_i14)
+            uint32_t _size11;
+            ::apache::thrift::protocol::TType _etype14;
+            xfer += iprot->readListBegin(_etype14, _size11);
+            this->libAppendPaths.resize(_size11);
+            uint32_t _i15;
+            for (_i15 = 0; _i15 < _size11; ++_i15)
             {
-              xfer += this->libAppendPaths[_i14].read(iprot);
+              xfer += this->libAppendPaths[_i15].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -351,18 +376,18 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
           xfer += iprot->skip(ftype);
         }
         break;
-      case 10:
+      case 11:
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->setEnvironment.clear();
-            uint32_t _size15;
-            ::apache::thrift::protocol::TType _etype18;
-            xfer += iprot->readListBegin(_etype18, _size15);
-            this->setEnvironment.resize(_size15);
-            uint32_t _i19;
-            for (_i19 = 0; _i19 < _size15; ++_i19)
+            uint32_t _size16;
+            ::apache::thrift::protocol::TType _etype19;
+            xfer += iprot->readListBegin(_etype19, _size16);
+            this->setEnvironment.resize(_size16);
+            uint32_t _i20;
+            for (_i20 = 0; _i20 < _size16; ++_i20)
             {
-              xfer += this->setEnvironment[_i19].read(iprot);
+              xfer += this->setEnvironment[_i20].read(iprot);
             }
             xfer += iprot->readListEnd();
           }
@@ -390,6 +415,8 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_executablePath)
     throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_parallelism)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
@@ -417,58 +444,62 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr
   xfer += oprot->writeString(this->executablePath);
   xfer += oprot->writeFieldEnd();
 
+  xfer += oprot->writeFieldBegin("parallelism", ::apache::thrift::protocol::T_I32, 6);
+  xfer += oprot->writeI32((int32_t)this->parallelism);
+  xfer += oprot->writeFieldEnd();
+
   if (this->__isset.appDeploymentDescription) {
-    xfer += oprot->writeFieldBegin("appDeploymentDescription", ::apache::thrift::protocol::T_STRING,
6);
+    xfer += oprot->writeFieldBegin("appDeploymentDescription", ::apache::thrift::protocol::T_STRING,
7);
     xfer += oprot->writeString(this->appDeploymentDescription);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.moduleLoadCmds) {
-    xfer += oprot->writeFieldBegin("moduleLoadCmds", ::apache::thrift::protocol::T_LIST,
7);
+    xfer += oprot->writeFieldBegin("moduleLoadCmds", ::apache::thrift::protocol::T_LIST,
8);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->moduleLoadCmds.size()));
-      std::vector<std::string> ::const_iterator _iter20;
-      for (_iter20 = this->moduleLoadCmds.begin(); _iter20 != this->moduleLoadCmds.end();
++_iter20)
+      std::vector<std::string> ::const_iterator _iter21;
+      for (_iter21 = this->moduleLoadCmds.begin(); _iter21 != this->moduleLoadCmds.end();
++_iter21)
       {
-        xfer += oprot->writeString((*_iter20));
+        xfer += oprot->writeString((*_iter21));
       }
       xfer += oprot->writeListEnd();
     }
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.libPrependPaths) {
-    xfer += oprot->writeFieldBegin("libPrependPaths", ::apache::thrift::protocol::T_LIST,
8);
+    xfer += oprot->writeFieldBegin("libPrependPaths", ::apache::thrift::protocol::T_LIST,
9);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->libPrependPaths.size()));
-      std::vector<SetEnvPaths> ::const_iterator _iter21;
-      for (_iter21 = this->libPrependPaths.begin(); _iter21 != this->libPrependPaths.end();
++_iter21)
+      std::vector<SetEnvPaths> ::const_iterator _iter22;
+      for (_iter22 = this->libPrependPaths.begin(); _iter22 != this->libPrependPaths.end();
++_iter22)
       {
-        xfer += (*_iter21).write(oprot);
+        xfer += (*_iter22).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.libAppendPaths) {
-    xfer += oprot->writeFieldBegin("libAppendPaths", ::apache::thrift::protocol::T_LIST,
9);
+    xfer += oprot->writeFieldBegin("libAppendPaths", ::apache::thrift::protocol::T_LIST,
10);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->libAppendPaths.size()));
-      std::vector<SetEnvPaths> ::const_iterator _iter22;
-      for (_iter22 = this->libAppendPaths.begin(); _iter22 != this->libAppendPaths.end();
++_iter22)
+      std::vector<SetEnvPaths> ::const_iterator _iter23;
+      for (_iter23 = this->libAppendPaths.begin(); _iter23 != this->libAppendPaths.end();
++_iter23)
       {
-        xfer += (*_iter22).write(oprot);
+        xfer += (*_iter23).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.setEnvironment) {
-    xfer += oprot->writeFieldBegin("setEnvironment", ::apache::thrift::protocol::T_LIST,
10);
+    xfer += oprot->writeFieldBegin("setEnvironment", ::apache::thrift::protocol::T_LIST,
11);
     {
       xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->setEnvironment.size()));
-      std::vector<SetEnvPaths> ::const_iterator _iter23;
-      for (_iter23 = this->setEnvironment.begin(); _iter23 != this->setEnvironment.end();
++_iter23)
+      std::vector<SetEnvPaths> ::const_iterator _iter24;
+      for (_iter24 = this->setEnvironment.begin(); _iter24 != this->setEnvironment.end();
++_iter24)
       {
-        xfer += (*_iter23).write(oprot);
+        xfer += (*_iter24).write(oprot);
       }
       xfer += oprot->writeListEnd();
     }
@@ -486,6 +517,7 @@ void swap(ApplicationDeploymentDescription &a, ApplicationDeploymentDescription
   swap(a.appModuleId, b.appModuleId);
   swap(a.computeHostId, b.computeHostId);
   swap(a.executablePath, b.executablePath);
+  swap(a.parallelism, b.parallelism);
   swap(a.appDeploymentDescription, b.appDeploymentDescription);
   swap(a.moduleLoadCmds, b.moduleLoadCmds);
   swap(a.libPrependPaths, b.libPrependPaths);

http://git-wip-us.apache.org/repos/asf/airavata/blob/10915860/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
index 9d6d729..4c850dc 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
@@ -17,6 +17,17 @@
 
 
 
+struct ApplicationParallelismType {
+  enum type {
+    SERIAL = 0,
+    MPI = 1,
+    OPENMP = 2,
+    OPENMP_MPI = 3
+  };
+};
+
+extern const std::map<int, const char*> _ApplicationParallelismType_VALUES_TO_NAMES;
+
 
 class SetEnvPaths {
  public:
@@ -151,10 +162,10 @@ typedef struct _ApplicationDeploymentDescription__isset {
 class ApplicationDeploymentDescription {
  public:
 
-  static const char* ascii_fingerprint; // = "3A2FD6631F126C4A6D132FA8EEFDAD7E";
-  static const uint8_t binary_fingerprint[16]; // = {0x3A,0x2F,0xD6,0x63,0x1F,0x12,0x6C,0x4A,0x6D,0x13,0x2F,0xA8,0xEE,0xFD,0xAD,0x7E};
+  static const char* ascii_fingerprint; // = "19A9841A9F4627A2C10F4A28E2CF0E17";
+  static const uint8_t binary_fingerprint[16]; // = {0x19,0xA9,0x84,0x1A,0x9F,0x46,0x27,0xA2,0xC1,0x0F,0x4A,0x28,0xE2,0xCF,0x0E,0x17};
 
-  ApplicationDeploymentDescription() : isEmpty(false), appDeploymentId("DO_NOT_SET_AT_CLIENTS"),
appModuleId(), computeHostId(), executablePath(), appDeploymentDescription() {
+  ApplicationDeploymentDescription() : isEmpty(false), appDeploymentId("DO_NOT_SET_AT_CLIENTS"),
appModuleId(), computeHostId(), executablePath(), parallelism((ApplicationParallelismType::type)0),
appDeploymentDescription() {
   }
 
   virtual ~ApplicationDeploymentDescription() throw() {}
@@ -164,6 +175,7 @@ class ApplicationDeploymentDescription {
   std::string appModuleId;
   std::string computeHostId;
   std::string executablePath;
+  ApplicationParallelismType::type parallelism;
   std::string appDeploymentDescription;
   std::vector<std::string>  moduleLoadCmds;
   std::vector<SetEnvPaths>  libPrependPaths;
@@ -192,6 +204,10 @@ class ApplicationDeploymentDescription {
     executablePath = val;
   }
 
+  void __set_parallelism(const ApplicationParallelismType::type val) {
+    parallelism = val;
+  }
+
   void __set_appDeploymentDescription(const std::string& val) {
     appDeploymentDescription = val;
     __isset.appDeploymentDescription = true;
@@ -229,6 +245,8 @@ class ApplicationDeploymentDescription {
       return false;
     if (!(executablePath == rhs.executablePath))
       return false;
+    if (!(parallelism == rhs.parallelism))
+      return false;
     if (__isset.appDeploymentDescription != rhs.__isset.appDeploymentDescription)
       return false;
     else if (__isset.appDeploymentDescription && !(appDeploymentDescription == rhs.appDeploymentDescription))

http://git-wip-us.apache.org/repos/asf/airavata/blob/10915860/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
index 0098016..eab55bb 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
@@ -17,6 +17,19 @@ use Thrift\Protocol\TBinaryProtocolAccelerated;
 use Thrift\Exception\TApplicationException;
 
 
+final class ApplicationParallelismType {
+  const SERIAL = 0;
+  const MPI = 1;
+  const OPENMP = 2;
+  const OPENMP_MPI = 3;
+  static public $__names = array(
+    0 => 'SERIAL',
+    1 => 'MPI',
+    2 => 'OPENMP',
+    3 => 'OPENMP_MPI',
+  );
+}
+
 class SetEnvPaths {
   static $_TSPEC;
 
@@ -269,6 +282,7 @@ class ApplicationDeploymentDescription {
   public $appModuleId = null;
   public $computeHostId = null;
   public $executablePath = null;
+  public $parallelism = null;
   public $appDeploymentDescription = null;
   public $moduleLoadCmds = null;
   public $libPrependPaths = null;
@@ -299,10 +313,14 @@ class ApplicationDeploymentDescription {
           'type' => TType::STRING,
           ),
         6 => array(
+          'var' => 'parallelism',
+          'type' => TType::I32,
+          ),
+        7 => array(
           'var' => 'appDeploymentDescription',
           'type' => TType::STRING,
           ),
-        7 => array(
+        8 => array(
           'var' => 'moduleLoadCmds',
           'type' => TType::LST,
           'etype' => TType::STRING,
@@ -310,7 +328,7 @@ class ApplicationDeploymentDescription {
             'type' => TType::STRING,
             ),
           ),
-        8 => array(
+        9 => array(
           'var' => 'libPrependPaths',
           'type' => TType::LST,
           'etype' => TType::STRUCT,
@@ -319,7 +337,7 @@ class ApplicationDeploymentDescription {
             'class' => '\Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths',
             ),
           ),
-        9 => array(
+        10 => array(
           'var' => 'libAppendPaths',
           'type' => TType::LST,
           'etype' => TType::STRUCT,
@@ -328,7 +346,7 @@ class ApplicationDeploymentDescription {
             'class' => '\Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths',
             ),
           ),
-        10 => array(
+        11 => array(
           'var' => 'setEnvironment',
           'type' => TType::LST,
           'etype' => TType::STRUCT,
@@ -355,6 +373,9 @@ class ApplicationDeploymentDescription {
       if (isset($vals['executablePath'])) {
         $this->executablePath = $vals['executablePath'];
       }
+      if (isset($vals['parallelism'])) {
+        $this->parallelism = $vals['parallelism'];
+      }
       if (isset($vals['appDeploymentDescription'])) {
         $this->appDeploymentDescription = $vals['appDeploymentDescription'];
       }
@@ -428,13 +449,20 @@ class ApplicationDeploymentDescription {
           }
           break;
         case 6:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->parallelism);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
           if ($ftype == TType::STRING) {
             $xfer += $input->readString($this->appDeploymentDescription);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 7:
+        case 8:
           if ($ftype == TType::LST) {
             $this->moduleLoadCmds = array();
             $_size0 = 0;
@@ -451,7 +479,7 @@ class ApplicationDeploymentDescription {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 8:
+        case 9:
           if ($ftype == TType::LST) {
             $this->libPrependPaths = array();
             $_size6 = 0;
@@ -469,7 +497,7 @@ class ApplicationDeploymentDescription {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 9:
+        case 10:
           if ($ftype == TType::LST) {
             $this->libAppendPaths = array();
             $_size12 = 0;
@@ -487,7 +515,7 @@ class ApplicationDeploymentDescription {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 10:
+        case 11:
           if ($ftype == TType::LST) {
             $this->setEnvironment = array();
             $_size18 = 0;
@@ -543,8 +571,13 @@ class ApplicationDeploymentDescription {
       $xfer += $output->writeString($this->executablePath);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->parallelism !== null) {
+      $xfer += $output->writeFieldBegin('parallelism', TType::I32, 6);
+      $xfer += $output->writeI32($this->parallelism);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->appDeploymentDescription !== null) {
-      $xfer += $output->writeFieldBegin('appDeploymentDescription', TType::STRING, 6);
+      $xfer += $output->writeFieldBegin('appDeploymentDescription', TType::STRING, 7);
       $xfer += $output->writeString($this->appDeploymentDescription);
       $xfer += $output->writeFieldEnd();
     }
@@ -552,7 +585,7 @@ class ApplicationDeploymentDescription {
       if (!is_array($this->moduleLoadCmds)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('moduleLoadCmds', TType::LST, 7);
+      $xfer += $output->writeFieldBegin('moduleLoadCmds', TType::LST, 8);
       {
         $output->writeListBegin(TType::STRING, count($this->moduleLoadCmds));
         {
@@ -569,7 +602,7 @@ class ApplicationDeploymentDescription {
       if (!is_array($this->libPrependPaths)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('libPrependPaths', TType::LST, 8);
+      $xfer += $output->writeFieldBegin('libPrependPaths', TType::LST, 9);
       {
         $output->writeListBegin(TType::STRUCT, count($this->libPrependPaths));
         {
@@ -586,7 +619,7 @@ class ApplicationDeploymentDescription {
       if (!is_array($this->libAppendPaths)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('libAppendPaths', TType::LST, 9);
+      $xfer += $output->writeFieldBegin('libAppendPaths', TType::LST, 10);
       {
         $output->writeListBegin(TType::STRUCT, count($this->libAppendPaths));
         {
@@ -603,7 +636,7 @@ class ApplicationDeploymentDescription {
       if (!is_array($this->setEnvironment)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('setEnvironment', TType::LST, 10);
+      $xfer += $output->writeFieldBegin('setEnvironment', TType::LST, 11);
       {
         $output->writeListBegin(TType::STRUCT, count($this->setEnvironment));
         {

http://git-wip-us.apache.org/repos/asf/airavata/blob/10915860/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
index f4e5b8b..b2f17bf 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
@@ -82,11 +82,12 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField APP_MODULE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("appModuleId",
org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField COMPUTE_HOST_ID_FIELD_DESC = new
org.apache.thrift.protocol.TField("computeHostId", org.apache.thrift.protocol.TType.STRING,
(short)4);
   private static final org.apache.thrift.protocol.TField EXECUTABLE_PATH_FIELD_DESC = new
org.apache.thrift.protocol.TField("executablePath", org.apache.thrift.protocol.TType.STRING,
(short)5);
-  private static final org.apache.thrift.protocol.TField APP_DEPLOYMENT_DESCRIPTION_FIELD_DESC
= new org.apache.thrift.protocol.TField("appDeploymentDescription", org.apache.thrift.protocol.TType.STRING,
(short)6);
-  private static final org.apache.thrift.protocol.TField MODULE_LOAD_CMDS_FIELD_DESC = new
org.apache.thrift.protocol.TField("moduleLoadCmds", org.apache.thrift.protocol.TType.LIST,
(short)7);
-  private static final org.apache.thrift.protocol.TField LIB_PREPEND_PATHS_FIELD_DESC = new
org.apache.thrift.protocol.TField("libPrependPaths", org.apache.thrift.protocol.TType.LIST,
(short)8);
-  private static final org.apache.thrift.protocol.TField LIB_APPEND_PATHS_FIELD_DESC = new
org.apache.thrift.protocol.TField("libAppendPaths", org.apache.thrift.protocol.TType.LIST,
(short)9);
-  private static final org.apache.thrift.protocol.TField SET_ENVIRONMENT_FIELD_DESC = new
org.apache.thrift.protocol.TField("setEnvironment", org.apache.thrift.protocol.TType.LIST,
(short)10);
+  private static final org.apache.thrift.protocol.TField PARALLELISM_FIELD_DESC = new org.apache.thrift.protocol.TField("parallelism",
org.apache.thrift.protocol.TType.I32, (short)6);
+  private static final org.apache.thrift.protocol.TField APP_DEPLOYMENT_DESCRIPTION_FIELD_DESC
= new org.apache.thrift.protocol.TField("appDeploymentDescription", org.apache.thrift.protocol.TType.STRING,
(short)7);
+  private static final org.apache.thrift.protocol.TField MODULE_LOAD_CMDS_FIELD_DESC = new
org.apache.thrift.protocol.TField("moduleLoadCmds", org.apache.thrift.protocol.TType.LIST,
(short)8);
+  private static final org.apache.thrift.protocol.TField LIB_PREPEND_PATHS_FIELD_DESC = new
org.apache.thrift.protocol.TField("libPrependPaths", org.apache.thrift.protocol.TType.LIST,
(short)9);
+  private static final org.apache.thrift.protocol.TField LIB_APPEND_PATHS_FIELD_DESC = new
org.apache.thrift.protocol.TField("libAppendPaths", org.apache.thrift.protocol.TType.LIST,
(short)10);
+  private static final org.apache.thrift.protocol.TField SET_ENVIRONMENT_FIELD_DESC = new
org.apache.thrift.protocol.TField("setEnvironment", org.apache.thrift.protocol.TType.LIST,
(short)11);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -99,6 +100,7 @@ import org.slf4j.LoggerFactory;
   private String appModuleId; // required
   private String computeHostId; // required
   private String executablePath; // required
+  private ApplicationParallelismType parallelism; // required
   private String appDeploymentDescription; // optional
   private List<String> moduleLoadCmds; // optional
   private List<SetEnvPaths> libPrependPaths; // optional
@@ -112,11 +114,16 @@ import org.slf4j.LoggerFactory;
     APP_MODULE_ID((short)3, "appModuleId"),
     COMPUTE_HOST_ID((short)4, "computeHostId"),
     EXECUTABLE_PATH((short)5, "executablePath"),
-    APP_DEPLOYMENT_DESCRIPTION((short)6, "appDeploymentDescription"),
-    MODULE_LOAD_CMDS((short)7, "moduleLoadCmds"),
-    LIB_PREPEND_PATHS((short)8, "libPrependPaths"),
-    LIB_APPEND_PATHS((short)9, "libAppendPaths"),
-    SET_ENVIRONMENT((short)10, "setEnvironment");
+    /**
+     * 
+     * @see ApplicationParallelismType
+     */
+    PARALLELISM((short)6, "parallelism"),
+    APP_DEPLOYMENT_DESCRIPTION((short)7, "appDeploymentDescription"),
+    MODULE_LOAD_CMDS((short)8, "moduleLoadCmds"),
+    LIB_PREPEND_PATHS((short)9, "libPrependPaths"),
+    LIB_APPEND_PATHS((short)10, "libAppendPaths"),
+    SET_ENVIRONMENT((short)11, "setEnvironment");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -141,15 +148,17 @@ import org.slf4j.LoggerFactory;
           return COMPUTE_HOST_ID;
         case 5: // EXECUTABLE_PATH
           return EXECUTABLE_PATH;
-        case 6: // APP_DEPLOYMENT_DESCRIPTION
+        case 6: // PARALLELISM
+          return PARALLELISM;
+        case 7: // APP_DEPLOYMENT_DESCRIPTION
           return APP_DEPLOYMENT_DESCRIPTION;
-        case 7: // MODULE_LOAD_CMDS
+        case 8: // MODULE_LOAD_CMDS
           return MODULE_LOAD_CMDS;
-        case 8: // LIB_PREPEND_PATHS
+        case 9: // LIB_PREPEND_PATHS
           return LIB_PREPEND_PATHS;
-        case 9: // LIB_APPEND_PATHS
+        case 10: // LIB_APPEND_PATHS
           return LIB_APPEND_PATHS;
-        case 10: // SET_ENVIRONMENT
+        case 11: // SET_ENVIRONMENT
           return SET_ENVIRONMENT;
         default:
           return null;
@@ -207,6 +216,8 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.EXECUTABLE_PATH, new org.apache.thrift.meta_data.FieldMetaData("executablePath",
org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARALLELISM, new org.apache.thrift.meta_data.FieldMetaData("parallelism",
org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM,
ApplicationParallelismType.class)));
     tmpMap.put(_Fields.APP_DEPLOYMENT_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("appDeploymentDescription",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.MODULE_LOAD_CMDS, new org.apache.thrift.meta_data.FieldMetaData("moduleLoadCmds",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -237,7 +248,8 @@ import org.slf4j.LoggerFactory;
     String appDeploymentId,
     String appModuleId,
     String computeHostId,
-    String executablePath)
+    String executablePath,
+    ApplicationParallelismType parallelism)
   {
     this();
     this.isEmpty = isEmpty;
@@ -246,6 +258,7 @@ import org.slf4j.LoggerFactory;
     this.appModuleId = appModuleId;
     this.computeHostId = computeHostId;
     this.executablePath = executablePath;
+    this.parallelism = parallelism;
   }
 
   /**
@@ -266,6 +279,9 @@ import org.slf4j.LoggerFactory;
     if (other.isSetExecutablePath()) {
       this.executablePath = other.executablePath;
     }
+    if (other.isSetParallelism()) {
+      this.parallelism = other.parallelism;
+    }
     if (other.isSetAppDeploymentDescription()) {
       this.appDeploymentDescription = other.appDeploymentDescription;
     }
@@ -309,6 +325,7 @@ import org.slf4j.LoggerFactory;
     this.appModuleId = null;
     this.computeHostId = null;
     this.executablePath = null;
+    this.parallelism = null;
     this.appDeploymentDescription = null;
     this.moduleLoadCmds = null;
     this.libPrependPaths = null;
@@ -430,6 +447,37 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  /**
+   * 
+   * @see ApplicationParallelismType
+   */
+  public ApplicationParallelismType getParallelism() {
+    return this.parallelism;
+  }
+
+  /**
+   * 
+   * @see ApplicationParallelismType
+   */
+  public void setParallelism(ApplicationParallelismType parallelism) {
+    this.parallelism = parallelism;
+  }
+
+  public void unsetParallelism() {
+    this.parallelism = null;
+  }
+
+  /** Returns true if field parallelism is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetParallelism() {
+    return this.parallelism != null;
+  }
+
+  public void setParallelismIsSet(boolean value) {
+    if (!value) {
+      this.parallelism = null;
+    }
+  }
+
   public String getAppDeploymentDescription() {
     return this.appDeploymentDescription;
   }
@@ -647,6 +695,14 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case PARALLELISM:
+      if (value == null) {
+        unsetParallelism();
+      } else {
+        setParallelism((ApplicationParallelismType)value);
+      }
+      break;
+
     case APP_DEPLOYMENT_DESCRIPTION:
       if (value == null) {
         unsetAppDeploymentDescription();
@@ -707,6 +763,9 @@ import org.slf4j.LoggerFactory;
     case EXECUTABLE_PATH:
       return getExecutablePath();
 
+    case PARALLELISM:
+      return getParallelism();
+
     case APP_DEPLOYMENT_DESCRIPTION:
       return getAppDeploymentDescription();
 
@@ -743,6 +802,8 @@ import org.slf4j.LoggerFactory;
       return isSetComputeHostId();
     case EXECUTABLE_PATH:
       return isSetExecutablePath();
+    case PARALLELISM:
+      return isSetParallelism();
     case APP_DEPLOYMENT_DESCRIPTION:
       return isSetAppDeploymentDescription();
     case MODULE_LOAD_CMDS:
@@ -815,6 +876,15 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_parallelism = true && this.isSetParallelism();
+    boolean that_present_parallelism = true && that.isSetParallelism();
+    if (this_present_parallelism || that_present_parallelism) {
+      if (!(this_present_parallelism && that_present_parallelism))
+        return false;
+      if (!this.parallelism.equals(that.parallelism))
+        return false;
+    }
+
     boolean this_present_appDeploymentDescription = true && this.isSetAppDeploymentDescription();
     boolean that_present_appDeploymentDescription = true && that.isSetAppDeploymentDescription();
     if (this_present_appDeploymentDescription || that_present_appDeploymentDescription) {
@@ -926,6 +996,16 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetParallelism()).compareTo(other.isSetParallelism());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetParallelism()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parallelism, other.parallelism);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     lastComparison = Boolean.valueOf(isSetAppDeploymentDescription()).compareTo(other.isSetAppDeploymentDescription());
     if (lastComparison != 0) {
       return lastComparison;
@@ -1031,6 +1111,14 @@ import org.slf4j.LoggerFactory;
       sb.append(this.executablePath);
     }
     first = false;
+    if (!first) sb.append(", ");
+    sb.append("parallelism:");
+    if (this.parallelism == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.parallelism);
+    }
+    first = false;
     if (isSetAppDeploymentDescription()) {
       if (!first) sb.append(", ");
       sb.append("appDeploymentDescription:");
@@ -1107,6 +1195,10 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'executablePath'
is unset! Struct:" + toString());
     }
 
+    if (!isSetParallelism()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'parallelism'
is unset! Struct:" + toString());
+    }
+
     // check for sub-struct validity
   }
 
@@ -1186,7 +1278,15 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // APP_DEPLOYMENT_DESCRIPTION
+          case 6: // PARALLELISM
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.parallelism = ApplicationParallelismType.findByValue(iprot.readI32());
+              struct.setParallelismIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // APP_DEPLOYMENT_DESCRIPTION
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.appDeploymentDescription = iprot.readString();
               struct.setAppDeploymentDescriptionIsSet(true);
@@ -1194,7 +1294,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 7: // MODULE_LOAD_CMDS
+          case 8: // MODULE_LOAD_CMDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
@@ -1212,7 +1312,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 8: // LIB_PREPEND_PATHS
+          case 9: // LIB_PREPEND_PATHS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
@@ -1231,7 +1331,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 9: // LIB_APPEND_PATHS
+          case 10: // LIB_APPEND_PATHS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
@@ -1250,7 +1350,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 10: // SET_ENVIRONMENT
+          case 11: // SET_ENVIRONMENT
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list9 = iprot.readListBegin();
@@ -1305,6 +1405,11 @@ import org.slf4j.LoggerFactory;
         oprot.writeString(struct.executablePath);
         oprot.writeFieldEnd();
       }
+      if (struct.parallelism != null) {
+        oprot.writeFieldBegin(PARALLELISM_FIELD_DESC);
+        oprot.writeI32(struct.parallelism.getValue());
+        oprot.writeFieldEnd();
+      }
       if (struct.appDeploymentDescription != null) {
         if (struct.isSetAppDeploymentDescription()) {
           oprot.writeFieldBegin(APP_DEPLOYMENT_DESCRIPTION_FIELD_DESC);
@@ -1390,6 +1495,7 @@ import org.slf4j.LoggerFactory;
       oprot.writeString(struct.appModuleId);
       oprot.writeString(struct.computeHostId);
       oprot.writeString(struct.executablePath);
+      oprot.writeI32(struct.parallelism.getValue());
       BitSet optionals = new BitSet();
       if (struct.isSetAppDeploymentDescription()) {
         optionals.set(0);
@@ -1461,6 +1567,8 @@ import org.slf4j.LoggerFactory;
       struct.setComputeHostIdIsSet(true);
       struct.executablePath = iprot.readString();
       struct.setExecutablePathIsSet(true);
+      struct.parallelism = ApplicationParallelismType.findByValue(iprot.readI32());
+      struct.setParallelismIsSet(true);
       BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
         struct.appDeploymentDescription = iprot.readString();

http://git-wip-us.apache.org/repos/asf/airavata/blob/10915860/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
b/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
index 1dc5344..ae4c20f 100644
--- a/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift
@@ -67,6 +67,28 @@ struct ApplicationModule {
 }
 
 /**
+ * Enumeration of application parallelism supported by Airavata
+ *
+ * SERIAL:
+ *  Single processor applications without any parallelization.
+ *
+ * MPI:
+ *  Messaging Passing Interface.
+ *
+ * OPENMP:
+ *  Shared Memory Implementtaion.
+ *
+ * OPENMP_MPI:
+ *  Hybrid Applications.
+ *
+*/
+enum ApplicationParallelismType {
+    SERIAL,
+    MPI,
+    OPENMP,
+    OPENMP_MPI
+}
+/**
  * Application Deployment Description
  *
  * appDeploymentId: Airavata Internal Unique Job ID. This is set by the registry.
@@ -98,9 +120,10 @@ struct ApplicationDeploymentDescription {
     3: required string appModuleId,
     4: required string computeHostId,
     5: required string executablePath,
-	6: optional string appDeploymentDescription,
-	7: optional list<string> moduleLoadCmds,
-	8: optional list<SetEnvPaths> libPrependPaths,
-	9: optional list<SetEnvPaths> libAppendPaths,
-	10: optional list<SetEnvPaths> setEnvironment,
+    6: required ApplicationParallelismType parallelism,
+	7: optional string appDeploymentDescription,
+	8: optional list<string> moduleLoadCmds,
+	9: optional list<SetEnvPaths> libPrependPaths,
+	10: optional list<SetEnvPaths> libAppendPaths,
+	11: optional list<SetEnvPaths> setEnvironment,
 }


Mime
View raw message