We started using slurm licensing with just a local counter and it works well for us: $ scontrol show licenses LicenseName=auto Total=284 Used=257 Free=27 Remote=no That works well because our cluster is only place where those licenses are consumed, so there's no chance of a conflict between cluster users and non-cluster users. We wanted to use matlab that a variety of cluster and non-cluster users and fortunately found your example for remote license servers included matlab. I was somewhat surprised to find your documentation page doesn't include the word "port", and found other tickets claiming you had to set the name field to the port number which is strange. On our cluster the ENV variable for matlab to be able to communicate with the license server is: export LM_LICENSE_FILE=27005@license-1.hpc.nrel.gov So I setup a remote license: $ scontrol show lic LicenseName=matlab@27005@license-1.hpc.nrel.gov Total=1 Used=0 Free=1 Remote=yes $ sacctmgr show resource Name Server Type Count % Allocated ServerType ---------- ---------- -------- ------ ----------- ---------- matlab 27005@lic+ License 1 100 rlm Is the count optional? I basically just want the license to be checked out if there is a valid license to check out. Or do I need to manually keep the slurm side synced with the number of max licenses available on the license serveR? Is the count only needed if I want a fraction of the licenses to be available to the cluster? Did I get the port syntax right? I tried this: [wbroadle@el2 ~]$ srun -A csc000 -p debug -L matlab@27005@license-1.hpc.nrel.gov -N 1 -n 36 -t 10 --pty /bin/bash srun: job 6883606 queued and waiting for resources srun: job 6883606 has been allocated resources Which ran without error, but I didn't see a matlab license checked out from the license server? Is that expected? I'm unsure if slurm will check out the license, or if slurm just checks to see if there is an available license and then depends on matlab to actually check it out. I can imagine the later might be the way it works, but that would create a race conditions, which seems like that would be the entire point of slurm supporting remote license servers. Is there something I can check on the license server side to make sure the slurm licensing of matlab is working? Some clarification on how this is supposed to work would be appreciated.
Hi Bill, Based on the description you've provided it sounds like you may be trying to have Slurm communicate directly with your license server. Unfortunately we don't have a way to retrieve license information directly from or provide usage information to a third party server. The approach you have to take is to define a certain number of licenses as being available and then Slurm will keep track of those licenses to make sure the licenses it knows about aren't over-allocated by jobs. If you need to have these licenses available to users outside of the cluster then I would recommend defining these licenses in the slurmdbd using sacctmgr because you can easily update the license count without having to restart any services. You shouldn't need a port as part of the server specification because slurmctld already knows how to reach the slurmdbd. It sounds like you may have looked at the Licenses Guide [1] page in the documentation, but I'll point out that in the "Dynamic Licenses" section it states that you can use a script to detect the current license count from an external license server and update the count available to Slurm. If you want to make all the licenses available to the Slurm cluster and other non-cluster users this is the approach you are probably going to have to take. A simpler approach would be to allocate a certain number of licenses as being available to the cluster and others to non-cluster users, but that may not work with the needs for these licenses at your site. Feel free to let me know if you need any clarification of how the license management works with Slurm. Thanks, Ben [1] https://slurm.schedmd.com/licenses.html
Thanks, sound how I missed the mention of the script.