Forum Navigation
You need to log in to create posts and topics.

Error "QXcbConnection: Could not connect to display :50.0" when run ovitos python script on a slurm HPC.

When I run a python script on a computing node in a slurm HPC, there exists the following error:

"QXcbConnection: Could not connect to display :50.0
/var/log/slurmd/job00475/slurm_script: line 101: 23351 Aborted ovitos"

The ovitos version is 2.9.0-stable.

In addition, it works well when I run it in a remote ssh session.


I'm not entirely sure about the old OVITO version 2.9.0, which may behave differently, but you should be able to avoid this error by clearing the DISPLAY environment variable prior to invoking ovitos. This is done by including the export statement in your job script:

export DISPLAY=

Your job queuing system may adopt the current values of all environment variables at the time you submit the job from the login node. Clearing the DISPLAY variable tells OVITO that there is no X server running. It then should no longer try to connect to the display at the time the job is executed.