fix cons_tres task layout with gpus-per-task
This fixes a potential task layout problem. Specifically if a cluster allocates by core and each core contains 2 CPUs and a job requests 3 tasks and one core on each of two nodes is available and the first node has one GPU available and the job requests --gpus-per-task=1 then without this patch cons_tres would try to put 2 tasks on the first node (one per CPU). This adds a check of the GPU count in order to prevent that. Observed sportatically when running regression tests39.[10-15] in immediate succession on a Cray system or a system configured with Epilog that takes a few seconds to complete.
Please register or sign in to comment