//! Specifies the memory limit per cpu (exclusive with resource_required.mem_mb)
unsigned long mem_per_cpu;
+ //! Workload Characterization Key - mandatory on some clusters
+ string wckey;
+
/*!
Specific parameters for each type of job - optional
*/
_mem_per_cpu = mem_per_cpu;
}
+void
+Launcher::Job::setWCKey(const std::string & wckey)
+{
+ _wckey = wckey;
+}
+
void
Launcher::Job::setReference(const std::string & reference)
{
return _mem_per_cpu;
}
+std::string
+Launcher::Job::getWCKey() const
+{
+ return _wckey;
+}
+
std::string
Launcher::Job::getReference() const
{
if (getExclusive())
params[Batch::EXCLUSIVE] = true;
+ // WC Key
+ if (_wckey != "")
+ params[Batch::WCKEY] = _wckey;
+
// Specific parameters
std::map<std::string, std::string>::iterator it = _specific_parameters.find("LoalLevelerJobType");
if (it != _specific_parameters.end())
void setExclusive(bool exclusive);
void setExclusiveStr(const std::string & exclusiveStr);
void setMemPerCpu(unsigned long mem_per_cpu);
+ void setWCKey(const std::string & wckey);
void setReference(const std::string & reference);
// For COORM
void setLauncherFile(const std::string & launcher_file);
bool getExclusive() const;
std::string getExclusiveStr() const;
unsigned long getMemPerCpu() const;
+ std::string getWCKey() const;
std::string getReference() const;
// For COORM
std::string _queue;
bool _exclusive;
unsigned long _mem_per_cpu;
+ std::string _wckey;
std::string _reference; //! Reference of the job for the batch manager
// Parameters for COORM
addNode(node, "exclusive", job.getExclusiveStr());
if (job.getMemPerCpu() > 0)
addNumericalNode(res_node, "mem_per_cpu", job.getMemPerCpu());
+ if (!job.getWCKey().empty())
+ addNode(node, "wckey", job.getWCKey());
// Specific parameters part
map<string, string> specific_parameters = job.getSpecificParameters();
new_job->setExclusiveStr(getNodeContent(current_node));
else if (node_name == "mem_per_cpu")
new_job->setMemPerCpu(getNumericalNodeContent<unsigned long>(current_node));
+ else if (node_name == "wckey")
+ new_job->setWCKey(getNodeContent(current_node));
else if (node_name == "specific_parameters")
{
// Get specific parameters
// Memory required per CPU
new_job->setMemPerCpu(job_parameters.mem_per_cpu);
+ // WC Key
+ std::string wckey = job_parameters.wckey.in();
+ new_job->setWCKey(wckey);
+
// Resources requirements
try
{
job_parameters->queue = CORBA::string_dup(job->getQueue().c_str());
job_parameters->exclusive = job->getExclusive();
job_parameters->mem_per_cpu = job->getMemPerCpu();
+ job_parameters->wckey = CORBA::string_dup(job->getWCKey().c_str());
resourceParams resource_params = job->getResourceRequiredParams();
job_parameters->resource_required.name = CORBA::string_dup(resource_params.name.c_str());