| Summary: | x11 functionality in slurm | ||
|---|---|---|---|
| Product: | Slurm | Reporter: | Simran <simran> |
| Component: | Scheduling | Assignee: | Alejandro Sanchez <alex> |
| Status: | RESOLVED INFOGIVEN | QA Contact: | |
| Severity: | 3 - Medium Impact | ||
| Priority: | --- | CC: | alex |
| Version: | 15.08.4 | ||
| Hardware: | Linux | ||
| OS: | Linux | ||
| Site: | Genentech (Roche) | Slinky Site: | --- |
| Alineos Sites: | --- | Atos/Eviden Sites: | --- |
| Confidential Site: | --- | Coreweave sites: | --- |
| Cray Sites: | --- | DS9 clusters: | --- |
| Google sites: | --- | HPCnow Sites: | --- |
| HPE Sites: | --- | IBM Sites: | --- |
| NOAA SIte: | --- | NoveTech Sites: | --- |
| Nvidia HWinf-CS Sites: | --- | OCF Sites: | --- |
| Recursion Pharma Sites: | --- | SFW Sites: | --- |
| SNIC sites: | --- | Tzag Elita Sites: | --- |
| Linux Distro: | --- | Machine Name: | |
| CLE Version: | Version Fixed: | ||
| Target Release: | --- | DevPrio: | --- |
| Emory-Cloud Sites: | --- | ||
|
Description
Simran
2016-03-24 03:33:06 MDT
Hi Simran. Slurm doesn't natively have x11 capabilities, so a third party plugin is needed. Matthieu's plugin is one of the options, and from our experience it works although the last commit is 2 years old. There are sites which develop their own solution but this one is public and probably the most popular one. I myself tried it like a year ago and it worked well. Anyhow, none of these solutions are legitimately supported by SchedMD, but if you encounter any issue with it you can directly talk with Matthieu or let us know so we can report it to him. I personally don't know any alternative to X11UseLocalhost concern. Please, let us know if you have any other questions related to this. Simran, another customer had a similar issue and they managed to make it work with X11UseLocalhost set to yes (default) and this bug came to my mind.
In both slurm-spank-x11-plug.c:line43 and slurm-spank-x11.c:line40 there's a:
#ifndef X11_LIBEXEC_PROG
#define X11_LIBEXEC_PROG "/usr/libexec/slurm-spank-x11"
#endif
In the spec file slurm-spank-x11.spec we see:
%build
%{__cc} -g -o slurm-spank-x11 slurm-spank-x11.c
%{__cc} -g -shared -fPIC -o x11.so \
-D"X11_LIBEXEC_PROG=\"%{_libexecdir}/%{name}\"" \
slurm-spank-x11-plug.c
so the value for the defined symbol X11_LIBEXEC_PROG can be configured through libexecdir[1].
Please, let us know if you managed to make it work or not. Thank you.
[1] http://www.rpm.org/wiki/PackagerDocs/Macros#MacroAnaloguesofAutoconfVariables
Hi Simran, any updates on this? Did you manage to make it work? Thanks. Hi Alejandro, Unfortunately looks like the only supported way to achieve x11 functionality via slurm is if we set "X11UseLocalhost no" in our sshd config. Unless you know of another slurm supported method of achieving this we can close this bug. Regards, -Simran Simran, yesterday I myself built again the slurm-spank-x11 plugin on a test cluster to check its functionality and I made it work using the default value for X11UseLocalhost (which defaults to yes). So setting "X11UseLocalhost no" is not a requirement for the plugin to work. As more and more people are using this plugin, we're working on documenting a standardized how-to procedure on how to build and configure it, but this documentation is not ready yet. Anyhow, see below the steps I followed to build and configure it, maybe this will be useful for you as well: # Maybe obvious, but don't forget the -X on ssh $ ssh -X alex@testserver.com # Get the plugin alex@testserver:~$ mkdir git alex@testserver:~$ cd git alex@testserver:~/git$ git clone https://github.com/hautreux/slurm-spank-x11.git alex@testserver:~/git$ cd slurm-spank-x11 # Manually edit the X11_LIBEXEC_PROG macro definition alex@testserver:~/git/slurm-spank-x11$ vi slurm-spank-x11.c alex@testserver:~/git/slurm-spank-x11$ vi slurm-spank-x11-plug.c alex@testserver:~/git/slurm-spank-x11$ grep "define X11_" slurm-spank-x11.c #define X11_LIBEXEC_PROG "/home/alex/slurm/15.08/testserver/libexec/slurm-spank-x11" alex@testserver:~/git/slurm-spank-x11$ grep "define X11_LIBEXEC_PROG" slurm-spank-x11-plug.c #define X11_LIBEXEC_PROG "/home/alex/slurm/15.08/testserver/libexec/slurm-spank-x11" alex@testserver:~/git/slurm-spank-x11$ # Compile alex@smd-server:~/git/slurm-spank-x11$ gcc -g -o slurm-spank-x11 slurm-spank-x11.c alex@smd-server:~/git/slurm-spank-x11$ gcc -g -I/home/alex/slurm/15.08/testserver/include -shared -fPIC -o x11.so slurm-spank-x11-plug.c # Install alex@testserver:~/git/slurm-spank-x11$ mkdir -p /home/alex/slurm/15.08/testserver/libexec alex@testserver:~/git/slurm-spank-x11$ install -m 755 slurm-spank-x11 /home/alex/slurm/15.08/testserver/libexec alex@testserver:~/git/slurm-spank-x11$ install -m 755 x11.so /home/alex/slurm/15.08/testserver/lib/slurm # Configure alex@testserver:~/git/slurm-spank-x11$ echo -e "optional\tx11.so" >> /home/alex/slurm/15.08/testserver/etc/plugstack.conf alex@testserver:~/git/slurm-spank-x11$ cd ~/tests # Run alex@testserver:~/tests$ srun -n1 --pty --x11 xclock alex@node1's password: alex@testserver:~/tests$ I've not yet had time to test a more elegant way to make the plugin work. But probably with ~/.rpmmacros specifying %{_libexecdir} and %{_libdir} the build process can be automated with rpm or rpmbuild. We're working on this. Another concern is that the spec file gcc command to compile slurm-spank-x11-plug.c doesn't use the parameter to specify the include path: -I/home/alex/slurm/15.08/testserver/include Please, try to rebuild/configure the plugin in someway similar to this procedure and let me know whether it works. Again, for me it works with X11UseLocalhost not defined, so with the default 'yes' value. Hi Alejandro, Sorry, I should have been a bit more clear. I have already tried slurm-spank-x11 and it works fine. However, the slurm-spank-x11 plugin has not been worked on for a few years now and even though it works we have a concern with using a 3rd party plugin that doesn't seem to be updated anymore, and might break with future slurm upgrades. From your previous response: -- Anyhow, none of these solutions are legitimately supported by SchedMD -- This makes us not want to use this plugin if it won't be supported by schedmd. If this plugin was part of slurm or schedmd would support it then we would feel comfortable deploying it in production. Thanks, -Simran Well, yesterday we were discussing adding this to contribs for version 16.05 with an internal tunnelling mechanism for the next major release. But for now it is a 3rd party plugin and effectively currently this isn't legitimately supported by SchedMD. Note also that it not being updated doesn't mean it lacks functionality. If it works there's no necessary need for updates :) Anyhow I understand not seeing recent updates can cause this "abandoned project sensation". Thanks Alejandro. We would definitely be interested in getting this added into slurm and would use this functionality if supported by schedmd :) Great. Is it fine to close this bug? Thanks. Yes, please feel free to close this bug. Thanks, -Simran All right. Marking as resolved. |