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
/bin/echo "PROGRAM failed with exit code $exit_code. PROGRAM was executed on a wrong SLURM Partition."
                exit $exit_code
        fi


On 15/01/18 16:03, Paul Edmon wrote:

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 script doesn't catch it.

-Paul Edmon-

On 1/15/2018 8:31 AM, John Hearns wrote:
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.tacc.utexas.edu/research-development/tacc-projects/xalt
https://github.com/Fahey-McLay/xalt


Xalt is intended to instrument your cluster and collect information on what software is being run and exactly what libraries are being used. I do not think it has any options for "Nope! You may not run this executable on this partition"
However it might be worth contacting the authors and discussing this.





On 15 January 2018 at 14:20, Juan A. Cordero Varelaq <bioinformatica-i...@us.es <mailto:bioinformatica-i...@us.es>> wrote:

    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 implement is something like a limited
    shell, on a particular node for a particular partition and a
    particular program.



    On 12/01/18 17:39, Paul Edmon wrote:

        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 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 given partition on a given node?

            Thanks








Reply via email to