termination command `kill -9 {id}` no longer works (from 2022b to 2024b)
2 views (last 30 days)
Show older comments
My HPC (unix/slurm) used to have matlab 2022b, on which the kill -9 command works well to terminate a job upon completion.
self.call_args = re.sub(r'\s+', ' ', '''"
diary('{0}');
addpath('{1}');
try,
{3},
rc = 0,
catch me,
fprintf('%s: %s\\n', me.identifier, me.message),
rc = 1,
end,
diary off;
fileID = fopen('{2}', 'w');
if rc,
fprintf(fileID, '{2} failed; see log file'),
else,
fprintf(fileID, '{2} run successfully'),
end,
fclose(fileID);
id = feature('getpid');
if ispc,
cmd = sprintf('taskkill /pid %d /f',id),
elseif (ismac || isunix),
cmd = sprintf('kill -9 %d',id),
else,
error('unknown operating system'),
end,
system(cmd);
exit(0);
"'''.format(norm_log, norm_base, self.exec_file, source_exec), flags = re.MULTILINE)
However, since the upgrade to 2024b, the command no longer works and matlab would hang upcome completion of a job.
I'm trying to understand what changed across the two versions.
> Starting from R2024a, all MATLAB installations require MathWorks Service Host.
But matlab’s official release notes don’t mention whether the unix version turned on the feature from 2022b to 2024b. So I'm not sure, so coming here for ideas.
0 Comments
Answers (1)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!