On Thu, Nov 14, 2019 at 06:00:27AM +0000, Manuel Sopena Ballesteros wrote:
>    Dear SGE community,
> 
>     
> 
>    Is there a way to limit the number of cores used per job like h_vcpu type
>    of flag?
> 
>    If yes, then what would SGE do if let say a user runs something like qsub
>    –b myscript.sh –l h_vmem=1G h_vcpu=2 and the job tries to use 10 cores?
> 
>     
>

Generally the way smp is set up under grid engine is to create  a PE named
smp with an allocation rule of $pe_slots and use that wehn submitting
smp jobs.  Modern versions of grid engine (SoGE 8.1.9,Univa Grid Engine)
have support for cpusets on Linux which can hard limit the job to using
the allocated cores although you have to look out for interaction with
the -binding option to qsub.

With that said we don't use the SoGE builtin cpuset support at UCL in part
because some of our clusters still run SoGE 8.1.8 where cpuset support
is buggy and in part because we also use cgroups to control memory usage
and prefer a unified approach.  We use a prolog script that sets up the
cpuset (and memory cgroup) and chgrps it to the unix group assigned to
the job by SoGE This lets the unprivileged starter method drop itself
into the cgroup/cpuset which is inherited by the job.

If you're not running linux or are running an even more retro version of
SGE then you could try qsub -binding or setting up queues that have
the processors entry configured.  However the binding provided by these
options can be undone by the job AIUI (unlike cpusets/cgroups).


William

Attachment: signature.asc
Description: PGP signature

_______________________________________________
users mailing list
users@gridengine.org
https://gridengine.org/mailman/listinfo/users

Reply via email to