thasso / pyjip

JIP Pipeline System
http://pyjip.readthedocs.org
Other
19 stars 8 forks source link

Wrong unit for memory when submitting to SGE #40

Closed emi80 closed 10 years ago

emi80 commented 10 years ago

Jip stores memory values in MB bytes while in SGE memory specifiers are counted in bytes if no multiplier letter follows the value.

thasso commented 10 years ago

JIP stores memory in MB in jip.db.Job. The "if no multiplier" part scares me a bit. If the default can be configured by the SGE sys admin, this has to be a configuration option in the JIP SGE implementation so that on can adopt, or, if all SGE versions support he multipler character, maybe we can just append the character?

emi80 commented 10 years ago

There was a typo in my previous comment.

About the multiplier I checked the SGE documentation and seems not be any configuration option for the memory unit.

I did man sge_types and I got:

memory_specifier _Memory specifiers are positive decimal, hexadecimal or octal integer constants which may be followed by a multiplier letter. Valid multiplier letters are k, K, m, M, g and G, where k means multi-ply the value by 1000, K multiply by 1024, m multiply by 1000_1000, M multiply by 1024_1024, g multiply by 1000_1000_1000 and G multiply by 1024_10241024. If no multiplier is present, the value is just counted in bytes.

See http://gridscheduler.sourceforge.net/htmlman/htmlman1/sge_types.html.

In this case I would just append an 'M' to the JIP stored value

thasso commented 10 years ago

Yeah, sounds good to me.