You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are seeing unexpected results from the Lua function spank:get_item in
version 0.23 built as an RPM on SL6.3 (gcc 4.4.6-4).
Sample Lua program (note that the values are printed in hex):
function slurm_spank_task_init_privileged (spank)
SPANK.log_info("NCPUS = %x", spank:get_item('S_JOB_NCPUS'))
SPANK.log_info("UID = %x", spank:get_item('S_JOB_UID'))
end
Output (single-core job run as root):
Sep 5 19:35:43 localhost slurmd[linux0][30130]: NCPUS = 100000001
Sep 5 19:35:43 localhost slurmd[linux0][30130]: UID = 7274732000000000
It appears that the 8-byte long "val" in lua.c:l_spank_get_item_val() is only
partially set in the call to spank_get_item(). The lower 16 bits are set when
retrieving S_JOB_NCPUS and the lower 32 are set for S_JOB_UID.
Initializing val appeared to resolve the issue. (In replicating this problem,
we only saw invalid UID values when lua.so was compiled with -O1 and higher.
Invalid NCPUS values were present with no optimization.)
Regards,
John
Original issue reported on code.google.com by [email protected] on 6 Sep 2012 at 12:48
Original issue reported on code.google.com by
[email protected]
on 6 Sep 2012 at 12:48Attachments:
The text was updated successfully, but these errors were encountered: