Using X11 Virtual Frame Buffer (Xvfb) in a submission script
Tue 08 October 2013 by Dr. Dirk ColbryBlog post edited by Nicholas Anthony Rahme
Some programs require access to a display in order to run properly. For example, MATLAB will provide an error if you try to create an AVI file from a image frame in -nodisplay mode. This can be an annoying problem on the HPCC because all of our batch compute nodes do not have displays attached. Fortunately, the X virtual Frame Buffer (Xvfb) is a program that simulates an attached display and can allow programs that require Graphical User Interfaces (X11) displays to run.
The following is a typical submission script for running a MATLAB program :
makeAVI.qsub
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Running this script will give me an error that says "Display not found." The following script is modified to start Xvfb at the beginning, run the same basic command and then terminate Xvfb at the end:
makeAVI.qsub
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
Please note that the -nodisplay option was removed from the MATLAB command line in the second script
An working example of this script can be downloaded on the HPCC using the getexample command. Type the following on any development node to run the example:
module load powertools
getexample
getexample MATLAB_movie
cd MATLAB_movie
qsub makeAVI.qsub
- Dirk
Blogpost migrated from ICER Wiki using custom python script. Comment on errors below.