Job submission in the slurm based cluster, need help in submitting multiple tasks as a single job in slurm.
Show older comments
c = parcluster;
c.AdditionalProperties.AccountName = '';
c.AdditionalProperties.MemUsage = '4gb';
c.AdditionalProperties.RequireExclusiveNode = false;
c.AdditionalProperties.WallTime = '05:00:00';
c.AdditionalProperties.ProcsPerNode = '';
c.AdditionalProperties.AdditionalSubmitArgs = '';
c.AdditionalProperties.QueueName = 'shared';
c.AdditionalProperties.QoS = '';
c.AdditionalProperties.AdditionalSubmitArgs = '--chdir=/scratch/'; c.AdditionalProperties.RemoteJobStorageLocation = '/scratch/';
k = createJob(c);
for i = 1:r_zones
for j = 1:c_zones
createTask(k,@com_sigma,3,{Tp,ds,T,dt,tsteps,i,j,rz,cz,forward});
end
end
submit(k);
disp("All jobs submitted")
wait(k);
The above method is creating the job submission script for every task and submitting it to each core. For instance, If I have 50 tasks in my code, it creates 50 slurm job submission scripts for 50 individual jobs in the cluster (similar to the below)
[21ae91p@login06 pqc]$ squeue
JOBID PARTITION NAME USER ST TIME NODES
1251791_50 shared Job17 21ae91p0 R 0:13 1 cn049
1251791_49 shared Job17 21ae91p0 R 0:14 1 cn010
1251791_48 shared Job17 21ae91p0 R 0:14 1 cn009
1251791_47 shared Job17 21ae91p0 R 0:14 1 cn009
1251791_46 shared Job17 21ae91p0 R 0:14 1 cn009
.........................
...........................
In this way, I am able to run my program. However, I have a limitation of a maximum of 100 jobs (and 'n' number of cores per job) to run in the cluster. So that I am able to use only 100 cores at a time to run my program, as each job is using one core.
I need an alternative, such that the program submits only one job in which multiple tasks are running (mutiple cores at a time).
Any help would be greatly appreciated.
Accepted Answer
More Answers (0)
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!