[slurm-users] restrict application to a given partition

2018-01-12 Thread Juan A. Cordero Varelaq
Dear Community, I have a node (20 Cores) on my HPC with two different partitions: big (16 cores) and small (4 cores). I have installed software X on this node, but I want only one partition to have rights to run it. Is it then possible to restrict the execution of an specific application to a

Re: [slurm-users] restrict application to a given partition

2018-01-12 Thread Paul Edmon
You could do this using a job_submit.lua script that inspects for that application and routes them properly. -Paul Edmon- On 01/12/2018 11:31 AM, Juan A. Cordero Varelaq wrote: Dear Community, I have a node (20 Cores) on my HPC with two different partitions: big (16 cores) and small (4 core

Re: [slurm-users] restrict application to a given partition

2018-01-15 Thread Juan A. Cordero Varelaq
But what if the user knows the path to such application (let's say python command) and executes it on the partition he/she should not be allowed to? Is it possible through lua scripts to set constrains on software usage such as a limited shell, for instance? In fact, what I'd like to implemen

Re: [slurm-users] restrict application to a given partition

2018-01-15 Thread John Hearns
Juan, me kne-jerk reaction is to say 'containerisation' here. However I guess that means that Slurm would have to be able to inspect the contents of a container, and I do not think that is possible. I may be very wrong here. Anyone? However have a look at thre Xalt stuff from TACC https://www.tac

Re: [slurm-users] restrict application to a given partition

2018-01-15 Thread Paul Edmon
This sounds like a solution for singularity. http://singularity.lbl.gov/ You could use the Lua script to restrict what is permitted to run via barring anything that isn't a specific singularity script.  Else you could use either prolog scripts to act as emergency fall back in case the lua scr

Re: [slurm-users] restrict application to a given partition

2018-01-16 Thread Juan A. Cordero Varelaq
I ended up with a more simple solution: I tweaked the program executable (a bash script), so that it inspects which partition it is running on, and if its the wrong one, it exits. Just added the following lines: if [ $SLURM_JOB_PARTITION == 'big' ]; then exit_code=126