Editing plugin scripts for Generic scheduler

1 回表示 (過去 30 日間)
Muh Alam
Muh Alam 2022 年 3 月 11 日
コメント済み: Muh Alam 2022 年 3 月 11 日
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 Center および File ExchangeCluster Configuration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by