Editing plugin scripts for Generic scheduler

1 次查看(过去 30 天)
I have been trying to run simulations on a cluster using
batch()
function and/or using
parcluster
and I edited the plugin scripts that was provided by Mathworks at the time of downloading MPS with Slurm. I followed the instruction given here. However, none of the of the added sbtach options seem to work. My setup has a nonshared file cluster where I am trying to submit from Matlab client on Windows machine to a cluster running Linux nodes. I tried setting those options via 'EnvironmentVariables' in batch but that still does not work either.
So, how can I correctly add sbatch options to the jobs that I want to submit to the cluster?

回答(1 个)

Raymond Norris
Raymond Norris 2022-3-11
Can you post the MATLAB code you wrote to add the sbatch options? Setting EnvironmentVariables won't resolve this issue (sbatch won't pick them up).
  1 个评论
Muh Alam
Muh Alam 2022-3-11
Sure! the code has this form: I tried by either editing the properties of the generic cluster using ResourceTemplate property and Additionalproperties property, or using batch with EnviromentVariables options.
c= parcluster('slurm_cluster');
% %edit the CJS cluster interface to accept Slurm's sbatch options using ResourceTemplate property:
% c.ResourceTemplate = '--mincpus=^2^';
% c.ResourceTemplate = '- N=^10^';
% c.ResourceTemplate = '--mem-per-cpu=50G';
%then inside the script there is a parfor loop
%or using batch():
myjob = batch(c,'script_to_run', 'AutoAddClientPath',false,...
'EnvironmentVariables','SLURM_CPUS_ON_NODE = 4',...
'EnvironmentVariables','SLURM_MEM_PER_CPU=15g',...
'EnvironmentVariables','SLURM_NNODES=7');

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Third-Party Cluster Configuration 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by