From: Maciej Tronowski Date: Fri, 11 Sep 2015 14:00:07 +0000 (+0200) Subject: cast memory attributes (originally float) to int X-Git-Tag: v1.1~1 X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=f870a6fc9f69fb1e55f6bc8e468263c5b6dc4ec5;p=qcg-portal.git cast memory attributes (originally float) to int --- diff --git a/qcg/utils.py b/qcg/utils.py index da8f83c..57cf23a 100644 --- a/qcg/utils.py +++ b/qcg/utils.py @@ -155,7 +155,7 @@ def to_form_data(xml): desc.xml_description = xml direct_map = ('env_variables', 'executable', 'arguments', 'note', 'grant', 'hosts', 'properties', 'queue', 'procs', - 'wall_time', 'memory', 'memory_per_slot', 'modules', 'input', 'stage_in', 'native', 'persistent') + 'wall_time', 'modules', 'input', 'stage_in', 'native', 'persistent') params = {} for name in direct_map: @@ -193,6 +193,10 @@ def to_form_data(xml): else: params['postprocess_type'] = JobDescriptionForm.Process.CMD params['postprocess_cmd'] = desc.postprocess + if desc.memory: + params['memory'] = int(desc.memory) + if desc.memory_per_slot: + params['memory_per_slot'] = int(desc.memory_per_slot) return params