Tuesday, December 1, 2009

Xvfb on MPI Cluster

I have finally finished setting up the MPI cluster. It is still not as I imaginged (only a single NIC is used for now).

I wanted to start playing with it using the ParallelBFS from VTK, but enter quickly into some troubles. I could not figure out how to redirect the DISPLAY to my main machine, so I ended up having :

$ mpirun --hostfile ~/mpicluster -np 3 /home/mpiuser/Kitware/VTK-gcc/bin/ParallelBFS
ERROR: In /home/mpiuser/Kitware/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 344
vtkXOpenGLRenderWindow (0x2ab3b910): bad X server connection. DISPLAY=ERROR: In /home/mpiuser/Kitware/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 344
vtkXOpenGLRenderWindow (0x2ab3b910): bad X server connection. DISPLAY=ERROR: In /home/mpiuser/Kitware/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 344
vtkXOpenGLRenderWindow (0x2ab3b910): bad X server connection. DISPLAY=[dhcp-67-180:21108] *** Process received signal ***
[dhcp-67-180:21108] Signal: Segmentation fault (11)
[dhcp-67-180:21108] Signal code: Address not mapped (1)
[dhcp-67-180:21108] Failing at address: 0xe0
[dhcp-67-180:21108] [ 0] /lib/libpthread.so.0 [0x7fd3f82f0a80]
[dhcp-67-180:21108] [ 1] /usr/lib/libXt.so.6(_XtAppCreateShell+0x48) [0x7fd3fbcd9198]
[dhcp-67-180:21108] [ 2] /usr/lib/libXt.so.6(XtVaAppCreateShell+0x156) [0x7fd3fbd07466]
[dhcp-67-180:21108] [ 3] /home/mpiuser/Kitware/VTK-gcc/bin/libvtkRendering.so.5.5(_ZN26vtkXRenderWindowInteractor10InitializeEv+0x597) [0x7fd3fdacb837]
[dhcp-67-180:21108] [ 4] /home/mpiuser/Kitware/VTK-gcc/bin/ParallelBFS(main+0x320) [0x409760]
[dhcp-67-180:21108] [ 5] /lib/libc.so.6(__libc_start_main+0xe6) [0x7fd3f785c1a6]
[dhcp-67-180:21108] [ 6] /home/mpiuser/Kitware/VTK-gcc/bin/ParallelBFS(__gxx_personality_v0+0x369) [0x409349]
[dhcp-67-180:21108] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 21108 on node mpi0 exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------


Oh well that is ok I can just install xvfb on the first node and try it again. But then again Xvfb failed:

$ Xvfb :9 -ac -screen 0 300x300x24
error opening security policy file /etc/X11/xserver/SecurityPolicy
(EE) XKB: Couldn't open rules file /usr/share/X11/xkb/rules/base
Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list!
Could not init font path element /usr/share/fonts/X11/Type1, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi, removing from list!
[config/hal] couldn't initialise context: (null) ((null))

^CFreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.


Ok, doing a google search reveal:

xvfb: Should depend on xfonts-base package
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=497926

No this is not it, I have the xfonts-base:

$ apt-cache policy xfonts-base
xfonts-base:
Installed: 1:1.0.0-5
Candidate: 1:1.0.0-5
Version table:
1:1.0.0-6 0
200 http://ftp.fr.debian.org testing/main Packages
100 http://ftp.fr.debian.org unstable/main Packages
*** 1:1.0.0-5 0
500 http://ftp.fr.debian.org lenny/main Packages
100 /var/lib/dpkg/status


Doing another google search reveal:

error opening security policy file /usr/lib/xserver/SecurityPolicy
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=362246

Ha ! I do not have the package, let's install it:

$ sudo apt-get install xserver-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
xserver-common
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 51.6kB of archives.
After this operation, 143kB of additional disk space will be used.
Get:1 http://ftp.fr.debian.org testing/main xserver-common 2:1.6.5-1 [51.6kB]
Fetched 51.6kB in 0s (1132kB/s)
Selecting previously deselected package xserver-common.
(Reading database ... 57388 files and directories currently installed.)
Unpacking xserver-common (from .../xserver-common_2%3a1.6.5-1_all.deb) ...
Processing triggers for man-db ...
Setting up xserver-common (2:1.6.5-1) ...


And let's try again:

$ Xvfb :9 -screen 0 300x300x24
error opening security policy file /etc/X11/xserver/SecurityPolicy
(EE) XKB: Couldn't open rules file /usr/share/X11/xkb/rules/base
Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list!
Could not init font path element /usr/share/fonts/X11/Type1, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi, removing from list!
[config/hal] couldn't initialise context: (null) ((null))


Ok I have no clue...time to hit the debian-users list.

2 comments:

Unknown said...

And the solution is simply:

$ sudo apt-get install xserver-xorg-core

It will pull in plenty of dependencies you do not care about. Then simply:

$ sudo aptitude remove xserver-xorg-core

The directory will still be there:

$ find /etc/X11/xserver/SecurityPolicy

Unknown said...

It seems to be working, all I had missing was a :

sudo apt-get install xkb-data

Now:

$ Xvfb :9 -screen 0 300x300x24


Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list!
Could not init font path element /usr/share/fonts/X11/Type1, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi, removing from list!
[config/hal] couldn't initialise context: (null) ((null))
FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.
Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list!
Could not init font path element /usr/share/fonts/X11/Type1, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi, removing from list!
[config/hal] couldn't initialise context: (null) ((null))