Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-12 Thread Davide DelVento
For other poor souls coming to this conversation, here is the conclusion. $ sbatch --version slurm 21.08.5 $ # irrelevant parts omitted from copy-paste for brevity $ cat /opt/slurm/job_submit.lua log_prefix = 'slurm_job_submit' function slurm_job_submit(job_desc, part_list, submit_uid) sl

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-08 Thread Davide DelVento
Thanks Ole, for this clarification, this is very good to know. However, the problem is that the very example provided by slurm itself is the one that has the error. I removed the unpack part with the variable arguments and that fixed that part. Unfortunately, the job_desc table is always empty so

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-07 Thread Ole Holm Nielsen
Hi Davide, In your slurmctld log you see an entry "error: job_submit/lua: /opt/slurm/job_submit.lua". What I think happens is that when slurmctld encounters an error in job_submit.lua, it will revert to the last known good script cached by slurmctld and ignore the file on disk from now on, e

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-07 Thread Davide DelVento
No, I never moved that file from the Linux cluster (and I do the editing with VIM which warns me of that possible issue). On Wed, Sep 7, 2022 at 11:19 AM Brian Andrus wrote: > > Possibly way off base, but did you happen to do any of the editing in > Windows? Maybe running into the cr/lf issue for

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-07 Thread Brian Andrus
Possibly way off base, but did you happen to do any of the editing in Windows? Maybe running into the cr/lf issue for how windows saves text files? Brian Andrus On 9/7/2022 5:21 AM, Davide DelVento wrote: Thanks Ole, your wiki page sheds some light on this mystery. Very frustrating that even

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-07 Thread Davide DelVento
Thanks Ole, your wiki page sheds some light on this mystery. Very frustrating that even the simple example provided in the release fails, and it fails at the most basic logging functionality. Note that "my" job_submit.lua is now the unmodified, slurm-provided one and that the luac command retu

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-07 Thread Ole Holm Nielsen
Hi Davide, I suggest that you check your job_submit.lua script with the LUA compiler: luac -p /etc/slurm/job_submit.lua I have written some more details in my Wiki page https://wiki.fysik.dtu.dk/niflheim/Slurm_configuration#job-submit-plugins Best regards, Ole On 9/7/22 01:51, Davide DelVen

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-06 Thread Davide DelVento
Thanks again to both of you. I actually did not build Slurm myself, otherwise I'd keep extensive logs of what I did. Other people did, so I don't know. However, I get the same grep'ing results as yours. Looking at the logs reveals some info, but it's cryptic. [2022-09-06T17:33:56.513] debug3: jo

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-01 Thread Ole Holm Nielsen
Did you install all prerequiste packages (including lua) on the server where you built the Slurm packages? On my system I get: $ strings `which slurmctld ` | grep HAVE_LUA HAVE_LUA 1 /Ole https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#install-prerequisites On 9/2/22 05:15, Davide DelV

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-01 Thread Brian Andrus
Try setting logging to debug mode, then you can get some info from the logs. Brian Andrus On 9/1/2022 8:15 PM, Davide DelVento wrote: Thanks. I did try a lua script as soon as I got your first email, but that never worked (yes, I enabled it in slurm.conf and ran "scontrol reconfigure" after).

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-01 Thread Davide DelVento
Thanks. I did try a lua script as soon as I got your first email, but that never worked (yes, I enabled it in slurm.conf and ran "scontrol reconfigure" after). Slurm simply acted as if there was no job_submit script. After various tests, all unsuccessful, today I found that link which I mentioned

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-01 Thread Brian Andrus
lua is the language you can use with the job_submit plugin. I was showing a quick way to see that job_submit capability is indeed in there. You can see if lua support is there by looking for the job_submit_lua.so file is there. It would be part of the slurm rpm (not the slurm-slurmctl rpm)

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-01 Thread Davide DelVento
Thanks again, Brian, indeed that grep returns many hits, but none of them includes lua, i.e. strings `which slurmctld ` | grep -i job_submit | grep -i lua returns nothing. So I should use the C rather than the more convenient lua interface, unless I recompile or am I missing something? On Thu,

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-01 Thread Brian Andrus
I would be surprised if it were compiled without the support. However, you could check and run something like: strings /sbin/slurmctld | grep job_submit (or where ever your slurmctld binary is). There should be quite a few lines with that in it. Brian Andrus On 9/1/2022 10:54 AM, Davide Del

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-09-01 Thread Davide DelVento
Thanks Brian for the suggestion, which I am now exploring. The documentation is a bit cryptic for me, but exploring a few things and checking https://funinit.wordpress.com/2018/06/07/how-to-use-job_submit_lua-with-slurm/ I suspect my slurm install (provided by cluster vendor) was not compiled wit

Re: [slurm-users] License management and invoking scontrol in the prolog

2022-08-30 Thread Brian Andrus
Not sure if you can do all the things you intend, but the job_submit script is precisely where you want to check submission options. https://slurm.schedmd.com/job_submit_plugins.html Brian Andrus On 8/30/2022 12:58 PM, Davide DelVento wrote: Hi, I would like to soft-enforce license utilizati