Supressing windows and other graphics while running on the HPC clusters

Method 1

While the X server is not really needed,  because it was available at job submission time, the job will try to use it. The first solution is to try unsetting the DISPLAY either before job submission or in the job script:

unset DISPLAY

 

Method 2

If that does not help then you can try prefixing the executable with the following:

xvfb-run -d myprogram param1 param2 ...

This will start an X server with virtual frame buffer before starting your program with the appropriate value of DISPLAY. Xvfb performs all graphical operations in virtual memory without showing any screen output.