[slurm-users] Error in job_submit.lua conditional?

Prentice Bisbal pbisbal at pppl.gov
Wed Feb 6 20:36:03 UTC 2019


Thanks!

Prentice

On 2/6/19 11:00 AM, Marcus Wagner wrote:
> Hi Prentice,
>
> there, I might help.
>
> I've created a table, e.g.:
> local userflags = {
>
>    --  "<username>" = {
>    --     "bypass"      = 1, # optional, if you want to bypass the 
> submit_plugin
>    --     "debug"       = 1, # optional, if you want to get debug 
> messages
>    --     "param"       = 1, # optional, if you want the parameters be 
> printed
>    --     "submitall"   = 1, # optional, if you should be allowed to 
> submit to all projects
>    --     "nosubmit"    = 1, # optional, if you should be prohibited 
> to submit at all
>    --     "ignorequota" = 1, # optional, if the quota should be ignored
>    --                 }
>    mw445520 = { bypass      = 0, debug = 0, param = 1, submitall = 0, 
> nosubmit = 0, ignorequota = 0, },
>
> }
>
> and a debug function, which checks if for username the dub entry is 
> set to 1. It then prints the debug message.
>
> So you can use something like
>
> debug("This is a test message")
>
> and only the users, whose debug flag is set, see this message.
> As long as you use "debug" for debugging messages, the "normal" users 
> won't get disturbed.
>
>
>
> Best
> Marcus
>
> On 2/6/19 4:04 PM, Prentice Bisbal wrote:
>> "Dirty debugging" I like that. I'm going to use that from now on. I 
>> have tried that method in the past while debugging other issues. I 
>> try not to use it too much, since I don't want these "dirty 
>> debugging" messages being seen by users (I don't have a test 
>> environment, so I have to test debug in production), but it looks 
>> like I may have to do that.
>>
>> Prentice
>>
>> On 2/5/19 9:00 AM, mercan wrote:
>>> Hi;
>>>
>>> I think dirty debugging is required using printf (slurm.log_user), 
>>> because the lua of our slurm installation returns a lot of variables 
>>> as nil. You can limit the output to a specific user as below:
>>>
>>> if job_desc.user_name == "mercan" then
>>>
>>>     slurm.log_user("job_desc.user_id=")
>>>     slurm.log_user(job_desc.user_id)
>>>     slurm.log_user("job_desc.partition=")
>>>     slurm.log_user(job_desc.partition)
>>> end
>>>
>>> Ahmet M.
>>>
>>>
>>> On 5.02.2019 01:27, Prentice Bisbal wrote:
>>>> Can anyone see an error in this conditional in my job_submit.lua?
>>>>
>>>>     if ( job_desc.user_id == 28922 or job_desc.user_id == 41266 ) 
>>>> and ( job_desc.partition == 'general' or job_desc.partition == 
>>>> 'interruptible' ) then
>>>>         job_desc.qos = job_desc.partition
>>>>         return slurm.SUCCESS
>>>>     end
>>>>
>>>> I am one if those user id's but if I submit a job to partition 
>>>> 'interruptible', without specifying a QOS, it still gets assigned 
>>>> to the default QOS, which is 'general':
>>>>
>>>>  cat mpihello.sbatch
>>>> #!/bin/bash
>>>>
>>>> #SBATCH -n 32
>>>> #SBATCH -p interruptible
>>>> #SBATCH -t 00:01:00
>>>> #SBATCH -J mpihello
>>>> #SBATCH -o mpihello-%j.out
>>>> #SBATCH -e mpihello-%j.err
>>>> #SBATCH --mail-type=ALL
>>>>
>>>> module load gcc/7.3.0
>>>> module load openmpi/3.0.0
>>>> srun --mpi=pmi2 ./mpihello
>>>>
>>>> $ scontrol show job 433953 | grep QOS
>>>>    Priority=2512 Nice=0 Account=unix QOS=general
>>>>
>>>> The logic of that conditional seems pretty simple, and I'm using 
>>>> similar compound conditionals throughout my job_submit.lua script. 
>>>> Can't figure out where the mistake is in this one.
>>>>
>>
>



More information about the slurm-users mailing list