On 12/06/12 21:31, Dr. Trigon wrote:
Hello everybody!
I experience a behaviour with SGE that I cannot understand. Due to logging my scripts output I redirect stdout and stderr. When running the script from console (e.g. on willow) all write actions to stderr are passed as they are, but runned through qcronsub (SGE) results in all writes splitted up at newlines '\n' as if there was some kind of auto-flush in background? Changing the usage of param 'j' in SGE did not help. I am using python. Is there something in qcronsub that has in influence to this? Any idea?
Thanks a lot and greetings! DrTrigon
That looks like line buffering in stdio. You can try prepending the python command with: stderr -e0
(despite the fact that stderr should be unbuffered by default...)
I'm unsure if it's being buffered at python or if SGE is doing caching there, thoguh. It _should_ be simply passing the file descriptor but, who knows?