This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/develop by this push:
     new f71eaeb3cf add parallel group count into computeresourcescheduling 
object
     new 66683319a3 Merge pull request #391 from isururanawaka/metaschedular
f71eaeb3cf is described below

commit f71eaeb3cf2719be514511e872710d972cea2508
Author: Isuru Ranawaka <[email protected]>
AuthorDate: Wed Mar 8 13:05:31 2023 -0500

    add parallel group count into computeresourcescheduling object
---
 .../lib/airavata/scheduling_model_types.cpp        |  22 +++++
 .../lib/airavata/scheduling_model_types.h          |  12 ++-
 .../lib/Airavata/Model/Scheduling/Types.php        |  23 +++++
 .../airavata/model/scheduling/ttypes.py            |  14 ++-
 .../ComputationalResourceSchedulingModel.java      | 106 ++++++++++++++++++++-
 .../selection/MultipleComputeResourcePolicy.java   |  16 ++++
 .../ComputationalResourceSchedulingEntity.java     |  10 +-
 .../src/main/resources/expcatalog-derby.sql        |   1 +
 .../src/main/resources/expcatalog-mysql.sql        |   1 +
 .../scheduling_model.thrift                        |   3 +-
 10 files changed, 199 insertions(+), 9 deletions(-)

diff --git 
a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/scheduling_model_types.cpp
 
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/scheduling_model_types.cpp
index 507dfcdf08..4f4e0239cc 100644
--- 
a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/scheduling_model_types.cpp
+++ 
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/scheduling_model_types.cpp
@@ -95,6 +95,11 @@ void 
ComputationalResourceSchedulingModel::__set_overrideAllocationProjectNumber
 __isset.overrideAllocationProjectNumber = true;
 }
 
+void ComputationalResourceSchedulingModel::__set_mGroupCount(const int32_t 
val) {
+  this->mGroupCount = val;
+__isset.mGroupCount = true;
+}
+
 uint32_t 
ComputationalResourceSchedulingModel::read(::apache::thrift::protocol::TProtocol*
 iprot) {
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -212,6 +217,14 @@ uint32_t 
ComputationalResourceSchedulingModel::read(::apache::thrift::protocol::
           xfer += iprot->skip(ftype);
         }
         break;
+      case 13:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->mGroupCount);
+          this->__isset.mGroupCount = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -289,6 +302,11 @@ uint32_t 
ComputationalResourceSchedulingModel::write(::apache::thrift::protocol:
     xfer += oprot->writeString(this->overrideAllocationProjectNumber);
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.mGroupCount) {
+    xfer += oprot->writeFieldBegin("mGroupCount", 
::apache::thrift::protocol::T_I32, 13);
+    xfer += oprot->writeI32(this->mGroupCount);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -308,6 +326,7 @@ void swap(ComputationalResourceSchedulingModel &a, 
ComputationalResourceScheduli
   swap(a.overrideLoginUserName, b.overrideLoginUserName);
   swap(a.overrideScratchLocation, b.overrideScratchLocation);
   swap(a.overrideAllocationProjectNumber, b.overrideAllocationProjectNumber);
+  swap(a.mGroupCount, b.mGroupCount);
   swap(a.__isset, b.__isset);
 }
 
@@ -324,6 +343,7 @@ 
ComputationalResourceSchedulingModel::ComputationalResourceSchedulingModel(const
   overrideLoginUserName = other0.overrideLoginUserName;
   overrideScratchLocation = other0.overrideScratchLocation;
   overrideAllocationProjectNumber = other0.overrideAllocationProjectNumber;
+  mGroupCount = other0.mGroupCount;
   __isset = other0.__isset;
 }
 ComputationalResourceSchedulingModel& 
ComputationalResourceSchedulingModel::operator=(const 
ComputationalResourceSchedulingModel& other1) {
@@ -339,6 +359,7 @@ ComputationalResourceSchedulingModel& 
ComputationalResourceSchedulingModel::oper
   overrideLoginUserName = other1.overrideLoginUserName;
   overrideScratchLocation = other1.overrideScratchLocation;
   overrideAllocationProjectNumber = other1.overrideAllocationProjectNumber;
+  mGroupCount = other1.mGroupCount;
   __isset = other1.__isset;
   return *this;
 }
@@ -357,6 +378,7 @@ void 
ComputationalResourceSchedulingModel::printTo(std::ostream& out) const {
   out << ", " << "overrideLoginUserName="; (__isset.overrideLoginUserName ? 
(out << to_string(overrideLoginUserName)) : (out << "<null>"));
   out << ", " << "overrideScratchLocation="; (__isset.overrideScratchLocation 
? (out << to_string(overrideScratchLocation)) : (out << "<null>"));
   out << ", " << "overrideAllocationProjectNumber="; 
(__isset.overrideAllocationProjectNumber ? (out << 
to_string(overrideAllocationProjectNumber)) : (out << "<null>"));
+  out << ", " << "mGroupCount="; (__isset.mGroupCount ? (out << 
to_string(mGroupCount)) : (out << "<null>"));
   out << ")";
 }
 
diff --git 
a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/scheduling_model_types.h
 
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/scheduling_model_types.h
index eaaf6c08c4..9586d7967a 100644
--- 
a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/scheduling_model_types.h
+++ 
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/scheduling_model_types.h
@@ -40,7 +40,7 @@ namespace apache { namespace airavata { namespace model { 
namespace scheduling {
 class ComputationalResourceSchedulingModel;
 
 typedef struct _ComputationalResourceSchedulingModel__isset {
-  _ComputationalResourceSchedulingModel__isset() : resourceHostId(false), 
totalCPUCount(false), nodeCount(false), numberOfThreads(false), 
queueName(false), wallTimeLimit(false), totalPhysicalMemory(false), 
chessisNumber(false), staticWorkingDir(false), overrideLoginUserName(false), 
overrideScratchLocation(false), overrideAllocationProjectNumber(false) {}
+  _ComputationalResourceSchedulingModel__isset() : resourceHostId(false), 
totalCPUCount(false), nodeCount(false), numberOfThreads(false), 
queueName(false), wallTimeLimit(false), totalPhysicalMemory(false), 
chessisNumber(false), staticWorkingDir(false), overrideLoginUserName(false), 
overrideScratchLocation(false), overrideAllocationProjectNumber(false), 
mGroupCount(false) {}
   bool resourceHostId :1;
   bool totalCPUCount :1;
   bool nodeCount :1;
@@ -53,6 +53,7 @@ typedef struct _ComputationalResourceSchedulingModel__isset {
   bool overrideLoginUserName :1;
   bool overrideScratchLocation :1;
   bool overrideAllocationProjectNumber :1;
+  bool mGroupCount :1;
 } _ComputationalResourceSchedulingModel__isset;
 
 class ComputationalResourceSchedulingModel : public virtual 
::apache::thrift::TBase {
@@ -60,7 +61,7 @@ class ComputationalResourceSchedulingModel : public virtual 
::apache::thrift::TB
 
   ComputationalResourceSchedulingModel(const 
ComputationalResourceSchedulingModel&);
   ComputationalResourceSchedulingModel& operator=(const 
ComputationalResourceSchedulingModel&);
-  ComputationalResourceSchedulingModel() : resourceHostId(), totalCPUCount(0), 
nodeCount(0), numberOfThreads(0), queueName(), wallTimeLimit(0), 
totalPhysicalMemory(0), chessisNumber(), staticWorkingDir(), 
overrideLoginUserName(), overrideScratchLocation(), 
overrideAllocationProjectNumber() {
+  ComputationalResourceSchedulingModel() : resourceHostId(), totalCPUCount(0), 
nodeCount(0), numberOfThreads(0), queueName(), wallTimeLimit(0), 
totalPhysicalMemory(0), chessisNumber(), staticWorkingDir(), 
overrideLoginUserName(), overrideScratchLocation(), 
overrideAllocationProjectNumber(), mGroupCount(0) {
   }
 
   virtual ~ComputationalResourceSchedulingModel() throw();
@@ -76,6 +77,7 @@ class ComputationalResourceSchedulingModel : public virtual 
::apache::thrift::TB
   std::string overrideLoginUserName;
   std::string overrideScratchLocation;
   std::string overrideAllocationProjectNumber;
+  int32_t mGroupCount;
 
   _ComputationalResourceSchedulingModel__isset __isset;
 
@@ -103,6 +105,8 @@ class ComputationalResourceSchedulingModel : public virtual 
::apache::thrift::TB
 
   void __set_overrideAllocationProjectNumber(const std::string& val);
 
+  void __set_mGroupCount(const int32_t val);
+
   bool operator == (const ComputationalResourceSchedulingModel & rhs) const
   {
     if (__isset.resourceHostId != rhs.__isset.resourceHostId)
@@ -153,6 +157,10 @@ class ComputationalResourceSchedulingModel : public 
virtual ::apache::thrift::TB
       return false;
     else if (__isset.overrideAllocationProjectNumber && 
!(overrideAllocationProjectNumber == rhs.overrideAllocationProjectNumber))
       return false;
+    if (__isset.mGroupCount != rhs.__isset.mGroupCount)
+      return false;
+    else if (__isset.mGroupCount && !(mGroupCount == rhs.mGroupCount))
+      return false;
     return true;
   }
   bool operator != (const ComputationalResourceSchedulingModel &rhs) const {
diff --git 
a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Scheduling/Types.php
 
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Scheduling/Types.php
index 2e556a4a14..660bffa42f 100644
--- 
a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Scheduling/Types.php
+++ 
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Scheduling/Types.php
@@ -73,6 +73,10 @@ class ComputationalResourceSchedulingModel {
    * @var string
    */
   public $overrideAllocationProjectNumber = null;
+  /**
+   * @var int
+   */
+  public $mGroupCount = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -125,6 +129,10 @@ class ComputationalResourceSchedulingModel {
           'var' => 'overrideAllocationProjectNumber',
           'type' => TType::STRING,
           ),
+        13 => array(
+          'var' => 'mGroupCount',
+          'type' => TType::I32,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -164,6 +172,9 @@ class ComputationalResourceSchedulingModel {
       if (isset($vals['overrideAllocationProjectNumber'])) {
         $this->overrideAllocationProjectNumber = 
$vals['overrideAllocationProjectNumber'];
       }
+      if (isset($vals['mGroupCount'])) {
+        $this->mGroupCount = $vals['mGroupCount'];
+      }
     }
   }
 
@@ -270,6 +281,13 @@ class ComputationalResourceSchedulingModel {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 13:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->mGroupCount);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -343,6 +361,11 @@ class ComputationalResourceSchedulingModel {
       $xfer += $output->writeString($this->overrideAllocationProjectNumber);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->mGroupCount !== null) {
+      $xfer += $output->writeFieldBegin('mGroupCount', TType::I32, 13);
+      $xfer += $output->writeI32($this->mGroupCount);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
diff --git 
a/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata/model/scheduling/ttypes.py
 
b/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata/model/scheduling/ttypes.py
index fcdae4c8ef..274139be9e 100644
--- 
a/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata/model/scheduling/ttypes.py
+++ 
b/airavata-api/airavata-client-sdks/airavata-python-sdk/airavata/model/scheduling/ttypes.py
@@ -32,6 +32,7 @@ class ComputationalResourceSchedulingModel(object):
      - overrideLoginUserName
      - overrideScratchLocation
      - overrideAllocationProjectNumber
+     - mGroupCount
     """
 
     thrift_spec = (
@@ -48,9 +49,10 @@ class ComputationalResourceSchedulingModel(object):
         (10, TType.STRING, 'overrideLoginUserName', 'UTF8', None, ),  # 10
         (11, TType.STRING, 'overrideScratchLocation', 'UTF8', None, ),  # 11
         (12, TType.STRING, 'overrideAllocationProjectNumber', 'UTF8', None, ), 
 # 12
+        (13, TType.I32, 'mGroupCount', None, None, ),  # 13
     )
 
-    def __init__(self, resourceHostId=None, totalCPUCount=None, 
nodeCount=None, numberOfThreads=None, queueName=None, wallTimeLimit=None, 
totalPhysicalMemory=None, chessisNumber=None, staticWorkingDir=None, 
overrideLoginUserName=None, overrideScratchLocation=None, 
overrideAllocationProjectNumber=None,):
+    def __init__(self, resourceHostId=None, totalCPUCount=None, 
nodeCount=None, numberOfThreads=None, queueName=None, wallTimeLimit=None, 
totalPhysicalMemory=None, chessisNumber=None, staticWorkingDir=None, 
overrideLoginUserName=None, overrideScratchLocation=None, 
overrideAllocationProjectNumber=None, mGroupCount=None,):
         self.resourceHostId = resourceHostId
         self.totalCPUCount = totalCPUCount
         self.nodeCount = nodeCount
@@ -63,6 +65,7 @@ class ComputationalResourceSchedulingModel(object):
         self.overrideLoginUserName = overrideLoginUserName
         self.overrideScratchLocation = overrideScratchLocation
         self.overrideAllocationProjectNumber = overrideAllocationProjectNumber
+        self.mGroupCount = mGroupCount
 
     def read(self, iprot):
         if iprot._fast_decode is not None and isinstance(iprot.trans, 
TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -133,6 +136,11 @@ class ComputationalResourceSchedulingModel(object):
                     self.overrideAllocationProjectNumber = 
iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 
iprot.readString()
                 else:
                     iprot.skip(ftype)
+            elif fid == 13:
+                if ftype == TType.I32:
+                    self.mGroupCount = iprot.readI32()
+                else:
+                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -191,6 +199,10 @@ class ComputationalResourceSchedulingModel(object):
             oprot.writeFieldBegin('overrideAllocationProjectNumber', 
TType.STRING, 12)
             
oprot.writeString(self.overrideAllocationProjectNumber.encode('utf-8') if 
sys.version_info[0] == 2 else self.overrideAllocationProjectNumber)
             oprot.writeFieldEnd()
+        if self.mGroupCount is not None:
+            oprot.writeFieldBegin('mGroupCount', TType.I32, 13)
+            oprot.writeI32(self.mGroupCount)
+            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
diff --git 
a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
 
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
index 3c629b41c4..fe8aa3411a 100644
--- 
a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
+++ 
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
@@ -45,6 +45,7 @@ public class ComputationalResourceSchedulingModel implements 
org.apache.thrift.T
   private static final org.apache.thrift.protocol.TField 
OVERRIDE_LOGIN_USER_NAME_FIELD_DESC = new 
org.apache.thrift.protocol.TField("overrideLoginUserName", 
org.apache.thrift.protocol.TType.STRING, (short)10);
   private static final org.apache.thrift.protocol.TField 
OVERRIDE_SCRATCH_LOCATION_FIELD_DESC = new 
org.apache.thrift.protocol.TField("overrideScratchLocation", 
org.apache.thrift.protocol.TType.STRING, (short)11);
   private static final org.apache.thrift.protocol.TField 
OVERRIDE_ALLOCATION_PROJECT_NUMBER_FIELD_DESC = new 
org.apache.thrift.protocol.TField("overrideAllocationProjectNumber", 
org.apache.thrift.protocol.TType.STRING, (short)12);
+  private static final org.apache.thrift.protocol.TField 
M_GROUP_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("mGroupCount", 
org.apache.thrift.protocol.TType.I32, (short)13);
 
   private static final org.apache.thrift.scheme.SchemeFactory 
STANDARD_SCHEME_FACTORY = new 
ComputationalResourceSchedulingModelStandardSchemeFactory();
   private static final org.apache.thrift.scheme.SchemeFactory 
TUPLE_SCHEME_FACTORY = new 
ComputationalResourceSchedulingModelTupleSchemeFactory();
@@ -61,6 +62,7 @@ public class ComputationalResourceSchedulingModel implements 
org.apache.thrift.T
   private java.lang.String overrideLoginUserName; // optional
   private java.lang.String overrideScratchLocation; // optional
   private java.lang.String overrideAllocationProjectNumber; // optional
+  private int mGroupCount; // optional
 
   /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -75,7 +77,8 @@ public class ComputationalResourceSchedulingModel implements 
org.apache.thrift.T
     STATIC_WORKING_DIR((short)9, "staticWorkingDir"),
     OVERRIDE_LOGIN_USER_NAME((short)10, "overrideLoginUserName"),
     OVERRIDE_SCRATCH_LOCATION((short)11, "overrideScratchLocation"),
-    OVERRIDE_ALLOCATION_PROJECT_NUMBER((short)12, 
"overrideAllocationProjectNumber");
+    OVERRIDE_ALLOCATION_PROJECT_NUMBER((short)12, 
"overrideAllocationProjectNumber"),
+    M_GROUP_COUNT((short)13, "mGroupCount");
 
     private static final java.util.Map<java.lang.String, _Fields> byName = new 
java.util.HashMap<java.lang.String, _Fields>();
 
@@ -114,6 +117,8 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
           return OVERRIDE_SCRATCH_LOCATION;
         case 12: // OVERRIDE_ALLOCATION_PROJECT_NUMBER
           return OVERRIDE_ALLOCATION_PROJECT_NUMBER;
+        case 13: // M_GROUP_COUNT
+          return M_GROUP_COUNT;
         default:
           return null;
       }
@@ -159,8 +164,9 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
   private static final int __NUMBEROFTHREADS_ISSET_ID = 2;
   private static final int __WALLTIMELIMIT_ISSET_ID = 3;
   private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 4;
+  private static final int __MGROUPCOUNT_ISSET_ID = 5;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = 
{_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.CHESSIS_NUMBER,_Fields.STATIC_WORKING_DIR,_Fields.OVERRIDE_LOGIN_USER_NAME,_Fields.OVERRIDE_SCRATCH_LOCATION,_Fields.OVERRIDE_ALLOCATION_PROJECT_NUMBER};
+  private static final _Fields optionals[] = 
{_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.CHESSIS_NUMBER,_Fields.STATIC_WORKING_DIR,_Fields.OVERRIDE_LOGIN_USER_NAME,_Fields.OVERRIDE_SCRATCH_LOCATION,_Fields.OVERRIDE_ALLOCATION_PROJECT_NUMBER,_Fields.M_GROUP_COUNT};
   public static final java.util.Map<_Fields, 
org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = 
new java.util.EnumMap<_Fields, 
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -188,6 +194,8 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
         new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.OVERRIDE_ALLOCATION_PROJECT_NUMBER, new 
org.apache.thrift.meta_data.FieldMetaData("overrideAllocationProjectNumber", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.M_GROUP_COUNT, new 
org.apache.thrift.meta_data.FieldMetaData("mGroupCount", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
     
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputationalResourceSchedulingModel.class,
 metaDataMap);
   }
@@ -226,6 +234,7 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
     if (other.isSetOverrideAllocationProjectNumber()) {
       this.overrideAllocationProjectNumber = 
other.overrideAllocationProjectNumber;
     }
+    this.mGroupCount = other.mGroupCount;
   }
 
   public ComputationalResourceSchedulingModel deepCopy() {
@@ -251,6 +260,8 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
     this.overrideLoginUserName = null;
     this.overrideScratchLocation = null;
     this.overrideAllocationProjectNumber = null;
+    setMGroupCountIsSet(false);
+    this.mGroupCount = 0;
   }
 
   public java.lang.String getResourceHostId() {
@@ -524,6 +535,28 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
     }
   }
 
+  public int getMGroupCount() {
+    return this.mGroupCount;
+  }
+
+  public void setMGroupCount(int mGroupCount) {
+    this.mGroupCount = mGroupCount;
+    setMGroupCountIsSet(true);
+  }
+
+  public void unsetMGroupCount() {
+    __isset_bitfield = 
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, 
__MGROUPCOUNT_ISSET_ID);
+  }
+
+  /** Returns true if field mGroupCount is set (has been assigned a value) and 
false otherwise */
+  public boolean isSetMGroupCount() {
+    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, 
__MGROUPCOUNT_ISSET_ID);
+  }
+
+  public void setMGroupCountIsSet(boolean value) {
+    __isset_bitfield = 
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, 
__MGROUPCOUNT_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, java.lang.Object value) {
     switch (field) {
     case RESOURCE_HOST_ID:
@@ -622,6 +655,14 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
       }
       break;
 
+    case M_GROUP_COUNT:
+      if (value == null) {
+        unsetMGroupCount();
+      } else {
+        setMGroupCount((java.lang.Integer)value);
+      }
+      break;
+
     }
   }
 
@@ -663,6 +704,9 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
     case OVERRIDE_ALLOCATION_PROJECT_NUMBER:
       return getOverrideAllocationProjectNumber();
 
+    case M_GROUP_COUNT:
+      return getMGroupCount();
+
     }
     throw new java.lang.IllegalStateException();
   }
@@ -698,6 +742,8 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
       return isSetOverrideScratchLocation();
     case OVERRIDE_ALLOCATION_PROJECT_NUMBER:
       return isSetOverrideAllocationProjectNumber();
+    case M_GROUP_COUNT:
+      return isSetMGroupCount();
     }
     throw new java.lang.IllegalStateException();
   }
@@ -825,6 +871,15 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
         return false;
     }
 
+    boolean this_present_mGroupCount = true && this.isSetMGroupCount();
+    boolean that_present_mGroupCount = true && that.isSetMGroupCount();
+    if (this_present_mGroupCount || that_present_mGroupCount) {
+      if (!(this_present_mGroupCount && that_present_mGroupCount))
+        return false;
+      if (this.mGroupCount != that.mGroupCount)
+        return false;
+    }
+
     return true;
   }
 
@@ -880,6 +935,10 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
     if (isSetOverrideAllocationProjectNumber())
       hashCode = hashCode * 8191 + overrideAllocationProjectNumber.hashCode();
 
+    hashCode = hashCode * 8191 + ((isSetMGroupCount()) ? 131071 : 524287);
+    if (isSetMGroupCount())
+      hashCode = hashCode * 8191 + mGroupCount;
+
     return hashCode;
   }
 
@@ -1011,6 +1070,16 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
         return lastComparison;
       }
     }
+    lastComparison = 
java.lang.Boolean.valueOf(isSetMGroupCount()).compareTo(other.isSetMGroupCount());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMGroupCount()) {
+      lastComparison = 
org.apache.thrift.TBaseHelper.compareTo(this.mGroupCount, other.mGroupCount);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1130,6 +1199,12 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
       }
       first = false;
     }
+    if (isSetMGroupCount()) {
+      if (!first) sb.append(", ");
+      sb.append("mGroupCount:");
+      sb.append(this.mGroupCount);
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -1271,6 +1346,14 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
             }
             break;
+          case 13: // M_GROUP_COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.mGroupCount = iprot.readI32();
+              struct.setMGroupCountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
         }
@@ -1358,6 +1441,11 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
           oprot.writeFieldEnd();
         }
       }
+      if (struct.isSetMGroupCount()) {
+        oprot.writeFieldBegin(M_GROUP_COUNT_FIELD_DESC);
+        oprot.writeI32(struct.mGroupCount);
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1412,7 +1500,10 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
       if (struct.isSetOverrideAllocationProjectNumber()) {
         optionals.set(11);
       }
-      oprot.writeBitSet(optionals, 12);
+      if (struct.isSetMGroupCount()) {
+        optionals.set(12);
+      }
+      oprot.writeBitSet(optionals, 13);
       if (struct.isSetResourceHostId()) {
         oprot.writeString(struct.resourceHostId);
       }
@@ -1449,12 +1540,15 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
       if (struct.isSetOverrideAllocationProjectNumber()) {
         oprot.writeString(struct.overrideAllocationProjectNumber);
       }
+      if (struct.isSetMGroupCount()) {
+        oprot.writeI32(struct.mGroupCount);
+      }
     }
 
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, 
ComputationalResourceSchedulingModel struct) throws 
org.apache.thrift.TException {
       org.apache.thrift.protocol.TTupleProtocol iprot = 
(org.apache.thrift.protocol.TTupleProtocol) prot;
-      java.util.BitSet incoming = iprot.readBitSet(12);
+      java.util.BitSet incoming = iprot.readBitSet(13);
       if (incoming.get(0)) {
         struct.resourceHostId = iprot.readString();
         struct.setResourceHostIdIsSet(true);
@@ -1503,6 +1597,10 @@ public class ComputationalResourceSchedulingModel 
implements org.apache.thrift.T
         struct.overrideAllocationProjectNumber = iprot.readString();
         struct.setOverrideAllocationProjectNumberIsSet(true);
       }
+      if (incoming.get(12)) {
+        struct.mGroupCount = iprot.readI32();
+        struct.setMGroupCountIsSet(true);
+      }
     }
   }
 
diff --git 
a/modules/airavata-metascheduler/process-scheduler/src/main/java/org/apache/airavata/metascheduler/process/scheduling/engine/cr/selection/MultipleComputeResourcePolicy.java
 
b/modules/airavata-metascheduler/process-scheduler/src/main/java/org/apache/airavata/metascheduler/process/scheduling/engine/cr/selection/MultipleComputeResourcePolicy.java
index a0244aea9d..8e6c4e8fb0 100644
--- 
a/modules/airavata-metascheduler/process-scheduler/src/main/java/org/apache/airavata/metascheduler/process/scheduling/engine/cr/selection/MultipleComputeResourcePolicy.java
+++ 
b/modules/airavata-metascheduler/process-scheduler/src/main/java/org/apache/airavata/metascheduler/process/scheduling/engine/cr/selection/MultipleComputeResourcePolicy.java
@@ -3,6 +3,7 @@ package 
org.apache.airavata.metascheduler.process.scheduling.engine.cr.selection
 import org.apache.airavata.common.utils.ServerSettings;
 import 
org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import 
org.apache.airavata.model.appcatalog.groupresourceprofile.ComputeResourcePolicy;
+import org.apache.airavata.model.application.io.InputDataObjectType;
 import org.apache.airavata.model.experiment.ExperimentModel;
 import org.apache.airavata.model.experiment.UserConfigurationDataModel;
 import org.apache.airavata.model.process.ProcessModel;
@@ -43,6 +44,8 @@ public class MultipleComputeResourcePolicy extends 
DefaultComputeResourceSelecti
                 ExperimentModel experiment = 
registryClient.getExperiment(processModel.getExperimentId());
 
 
+
+
                 UserConfigurationDataModel userConfigurationDataModel = 
experiment.getUserConfigurationData();
 
                 // Assume scheduling data is populated in 
USER_CONFIGURATION_DATA_MODEL
@@ -68,6 +71,19 @@ public class MultipleComputeResourcePolicy extends 
DefaultComputeResourceSelecti
                         QueueStatusModel queueStatusModel = 
registryClient.getQueueStatus(comResourceDes.getHostName(),
                                 resourceSchedulingModel.getQueueName());
                         if (queueStatusModel.isQueueUp()) {
+
+                           List<InputDataObjectType> inputDataObjectTypeList = 
 experiment.getExperimentInputs();
+                           inputDataObjectTypeList.forEach(obj->{
+                               if (obj.getName().equals("Wall_Time")){
+                                   
obj.setValue("-walltime="+resourceSchedulingModel.getWallTimeLimit());
+                               }
+                               if 
(obj.getName().equals("Parallel_Group_Count")){
+                                   
obj.setValue("-mgroupcount="+resourceSchedulingModel.getMGroupCount());
+                               }
+                           });
+
+
+
                             return Optional.of(resourceSchedulingModel);
                         }else{
                             retries.add(key);
diff --git 
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputationalResourceSchedulingEntity.java
 
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputationalResourceSchedulingEntity.java
index e31c8f7e33..4321397b69 100644
--- 
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputationalResourceSchedulingEntity.java
+++ 
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputationalResourceSchedulingEntity.java
@@ -36,6 +36,9 @@ public class ComputationalResourceSchedulingEntity implements 
Serializable {
     @Column(name = "WALL_TIME_LIMIT")
     private int wallTimeLimit;
 
+    @Column(name = "PARALLEL_GROUP_COUNT")
+    private int mGroupCount;
+
     @Column(name = "TOTAL_PHYSICAL_MEMORY")
     private int totalPhysicalMemory;
 
@@ -156,6 +159,11 @@ public class ComputationalResourceSchedulingEntity 
implements Serializable {
         this.overrideAllocationProjectNumber = overrideAllocationProjectNumber;
     }
 
+    public int getmGroupCount() {
+        return mGroupCount;
+    }
 
-
+    public void setmGroupCount(int mGroupCount) {
+        this.mGroupCount = mGroupCount;
+    }
 }
diff --git 
a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql 
b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
index 970d34d287..914a81b3a8 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
@@ -214,6 +214,7 @@ CREATE TABLE COMPUTE_RESOURCE_SCHEDULING (
        QUEUE_NAME varchar(255) NOT NULL,
        WALL_TIME_LIMIT INT,
        TOTAL_PHYSICAL_MEMORY INT,
+       PARALLEL_GROUP_COUNT INT,
        STATIC_WORKING_DIR varchar(255),
        OVERRIDE_LOGIN_USER_NAME varchar(255),
        OVERRIDE_SCRATCH_LOCATION varchar(255),
diff --git 
a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql 
b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
index 26569c4e63..4cf623c641 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
@@ -218,6 +218,7 @@ CREATE TABLE COMPUTE_RESOURCE_SCHEDULING (
        OVERRIDE_LOGIN_USER_NAME varchar(255),
        OVERRIDE_SCRATCH_LOCATION varchar(255),
        OVERRIDE_ALLOCATION_PROJECT_NUMBER varchar(255),
+       PARALLEL_GROUP_COUNT INT,
        PRIMARY KEY (EXPERIMENT_ID,RESOURCE_HOST_ID,QUEUE_NAME),
        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON 
DELETE CASCADE
 )ENGINE=InnoDB DEFAULT CHARSET=latin1;
diff --git 
a/thrift-interface-descriptions/data-models/experiment-catalog-models/scheduling_model.thrift
 
b/thrift-interface-descriptions/data-models/experiment-catalog-models/scheduling_model.thrift
index 66b54d99c2..8a653d0509 100644
--- 
a/thrift-interface-descriptions/data-models/experiment-catalog-models/scheduling_model.thrift
+++ 
b/thrift-interface-descriptions/data-models/experiment-catalog-models/scheduling_model.thrift
@@ -40,5 +40,6 @@ struct ComputationalResourceSchedulingModel {
     9: optional string staticWorkingDir,
     10: optional string overrideLoginUserName,
     11: optional string overrideScratchLocation,
-    12: optional string overrideAllocationProjectNumber
+    12: optional string overrideAllocationProjectNumber,
+    13: optional i32 mGroupCount
 }
\ No newline at end of file

Reply via email to