projects
/
qcg-portal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b449b0e
)
cast memory attributes (originally float) to int
author
Maciej Tronowski
<mtro@man.poznan.pl>
Fri, 11 Sep 2015 14:00:07 +0000
(16:00 +0200)
committer
Dawid Jagieła
<lightnir@gmail.com>
Sat, 12 Sep 2015 10:26:20 +0000
(12:26 +0200)
qcg/utils.py
patch
|
blob
|
history
diff --git
a/qcg/utils.py
b/qcg/utils.py
index
da8f83c
..
57cf23a
100644
(file)
--- 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',
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:
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
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
return params