Editing plugin scripts for Generic scheduler

1 view (last 30 days)
Muh Alam
Muh Alam on 11 Mar 2022
Commented: Muh Alam on 11 Mar 2022
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?

Answers (1)

Raymond Norris
Raymond Norris on 11 Mar 2022
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 Comment
Muh Alam
Muh Alam on 11 Mar 2022
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');

Sign in to comment.

Categories

Find more on Third-Party Cluster Configuration 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!