From: Renaud Barate Date: Fri, 4 Apr 2014 08:45:30 +0000 (+0200) Subject: Fix load job with parameter mem_per_cpu (close EDF issue #7925) X-Git-Tag: V7_4_0b1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=92241b29a0c302c3bd5a1e2bdcad20be82c22be3;p=modules%2Fkernel.git Fix load job with parameter mem_per_cpu (close EDF issue #7925) --- diff --git a/src/Launcher/Launcher_XML_Persistence.cxx b/src/Launcher/Launcher_XML_Persistence.cxx index 8d1ae64b3..5e7aaaac1 100644 --- a/src/Launcher/Launcher_XML_Persistence.cxx +++ b/src/Launcher/Launcher_XML_Persistence.cxx @@ -323,7 +323,7 @@ XML_Persistence::parseUserNode(Job * new_job, xmlNodePtr user_node) } } else if (node_name == "resource_params") - new_job->setResourceRequiredParams(parseResourceNode(current_node)); + parseResourceNode(new_job, current_node); else if (node_name == "maximum_duration") new_job->setMaximumDuration(getNodeContent(current_node)); else if (node_name == "queue") @@ -371,8 +371,8 @@ XML_Persistence::parseUserNode(Job * new_job, xmlNodePtr user_node) if (!job_file_ok) throw LauncherException("missing job file"); } -resourceParams -XML_Persistence::parseResourceNode(xmlNodePtr res_node) +void +XML_Persistence::parseResourceNode(Job * new_job, xmlNodePtr res_node) { resourceParams p; xmlNodePtr current_node = xmlFirstElementChild(res_node); @@ -395,11 +395,13 @@ XML_Persistence::parseResourceNode(xmlNodePtr res_node) p.cpu_clock = getNumericalNodeContent(current_node); else if (node_name == "mem_mb") p.mem_mb = getNumericalNodeContent(current_node); + else if (node_name == "mem_per_cpu") + new_job->setMemPerCpu(getNumericalNodeContent(current_node)); else throw LauncherException(string("invalid node \"") + node_name + "\""); current_node = xmlNextElementSibling(current_node); } - return p; + new_job->setResourceRequiredParams(p); } void diff --git a/src/Launcher/Launcher_XML_Persistence.hxx b/src/Launcher/Launcher_XML_Persistence.hxx index 133a21bb4..ab6df5dbe 100644 --- a/src/Launcher/Launcher_XML_Persistence.hxx +++ b/src/Launcher/Launcher_XML_Persistence.hxx @@ -56,7 +56,7 @@ namespace Launcher static Job * createJobFromXmlNode(xmlNodePtr job_node); static void parseUserNode(Job * new_job, xmlNodePtr user_node); static void parseRunNode(Job * new_job, xmlNodePtr run_node); - static resourceParams parseResourceNode(xmlNodePtr res_node); + static void parseResourceNode(Job * new_job, xmlNodePtr res_node); // Useful wrappers around libxml2 functions