jobEnvironment dropping content after = in value
I am running this script:
with drmaa.Session() as s:
jt = s.createJobTemplate()
jt.remoteCommand = "python"
jt.args = ['env.py']
jt.jobEnvironment = {'ALEX':'alex=2'}
jt.joinFiles=True
jobid = s.runJob(jt)
s.deleteJobTemplate(jt)
with this script env.py:
import os
print os.environ
When I look at my environment, I see:
'ALEX': 'alex',
For reference, this works fine: $ qsub -v ALEX=alex=2 -b y -j y python env.py.
That's very strange. From looking at where we handle setting DictAttribute values, I don't see anything that jumps out as wrong.
Could you try changing {'ALEX': 'alex=2'} to {'ALEX': '"alex=2"'} (with extra inner double-quotes around the value)? I'm wondering if the DRMAA C implementation you're using is doing something stupid on its end.
I believe I was able to get this bug reproduced using your travis setup: https://github.com/pygridtools/drmaa-python/commit/c8a9c5e42425760421dff1611ecd89718a435e7d results: https://travis-ci.org/cancan101/drmaa-python/jobs/72308774
Wrapping with " still leads to the same truncation after the =: '"alex
FYI, this bug is in the C implementation of DRMAA, see http://gridengine.org/pipermail/users/2016-April/009042.html
It's worth noting that users may be able to hack around this by using nativeSpecification. In any event, this is an issue with the particular DRMAA implementation itself and not drmaa-python. As such, this probably should be closed. Possibly could add a note in the docs about this issue and the (proposed) workaround.