@mateiz Do you know if the CPUS_PER_TASK config variable is ever used?  It seems to be buggy (some of the bugs are fixed by this PR) and I'm wondering if it makes sense to just remove it.