File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,12 @@ function slurm_spank_task_init_privileged(spank)
130130 cmode , device_ids )
131131 local cmd = nvs_path .. " -c " .. cmodes_index [cmode ] ..
132132 " -i " .. device_ids
133- local ret = tonumber (os.execute (cmd ))
133+ local ret = 0
134+ if _VERSION <= ' Lua 5.1' then
135+ ret = tonumber (os.execute (cmd ))
136+ else
137+ _ , _ , ret = os.execute (cmd )
138+ end
134139 SPANK .log_debug (myname .. " : DEBUG: cmd = %s\n " , cmd )
135140 SPANK .log_debug (myname .. " : DEBUG: ret = %s\n " , ret )
136141
@@ -174,7 +179,12 @@ function slurm_spank_task_exit(spank)
174179 " on GPU(s): %s\n " , default_cmode , device_ids )
175180 local cmd = nvs_path .. " -c " .. cmodes_index [default_cmode ] ..
176181 " -i " .. device_ids
177- local ret = tonumber (os.execute (cmd ))
182+ local ret = 0
183+ if _VERSION <= ' Lua 5.1' then
184+ ret = tonumber (os.execute (cmd ))
185+ else
186+ _ , _ , ret = os.execute (cmd )
187+ end
178188 SPANK .log_debug (myname .. " : DEBUG: cmd = %s\n " , cmd )
179189 SPANK .log_debug (myname .. " : DEBUG: ret = %s\n " , ret )
180190
You can’t perform that action at this time.
0 commit comments