Requesting --exclusive and then using $SLURM_CPUS_ON_NODE to determine the number of the tasks or threads to use inside the job script would be my recommendation.
--Troy -----Original Message----- From: slurm-users <slurm-users-boun...@lists.schedmd.com> On Behalf Of Tina Friedrich Sent: Tuesday, March 22, 2022 10:43 AM To: slurm-users@lists.schedmd.com Subject: Re: [slurm-users] Use all cores when submitting to heterogeneous nodes Hi Richard, ...what's wrong with using '--exclusive'? I mean if you're wanting all cores on the node anyway, wouldn't asking for it exclusively be pretty much the same thing? Tina On 22/03/2022 14:29, Richard Ems wrote: > Hi all, > > I am looking for an option to use all cores when submitting to > heterogeneous nodes. > In this case I have 2 partitions: > part1: #N1 nodes, each node has 40 cores > part2: #N2 nodes, each node has 48 cores > > I want to submit to both partitions, requesting a number of nodes and > then set > --ntasks=40*#nodes > or > --ntasks=48*#nodes > depending on which partition gets selected by Slurm. > Can this be done? > > An option similar to --ntasks=USE_ALL_CORES would be great. > > Many thanks, > Richard > > -- > Richard Ems / aiduit / r....@aiduit.com > <mailto:r....@aiduit.com> -- Tina Friedrich, Advanced Research Computing Snr HPC Systems Administrator Research Computing and Support Services IT Services, University of Oxford https://urldefense.com/v3/__http://www.arc.ox.ac.uk__;!!KGKeukY!gMufcIC3i58UdzqvJu5NJgHD5TdADngBaj6rq48GMTu5RjsPPTccwzudcC6u$ https://urldefense.com/v3/__http://www.it.ox.ac.uk__;!!KGKeukY!gMufcIC3i58UdzqvJu5NJgHD5TdADngBaj6rq48GMTu5RjsPPTccw4ucG3qS$