duartegroup / autodE

automated reaction profile generation
https://duartegroup.github.io/autodE/
MIT License
168 stars 51 forks source link

AutodE only runs as an interactive job #341

Open ATsybizova opened 4 months ago

ATsybizova commented 4 months ago

Dear AutodE community, I have been testing AutodE on our university cluster for quite a bit, and I have only managed to run it as an interactive job. My understanding that this should not be the case, however whenever I am submitting it as a batch job, I get the following error:

qt.qpa.xcb: could not connect to display localhost:16.0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

/var/spool/slurm/slurmd/state/job60065625/slurm_script: line 15: 86830 Aborted                 python input.py

It seems as if autodE tries to open a graphical window and fails when the job is submitted to the queue. Do you have any idea where the Qt dependency comes from? I could not find any mentioning of qt in the autodE documentation.

To Reproduce I am using a simple Diels-Alder reaction as a test, and here are my input file and submission script:

import autode as ade

ade.Config.hcode = 'orca'
ade.Config.n_cores = 8
ade.Config.max_core = 500

rxn = ade.Reaction("C=CC=C.C=C>>C1=CCCCC1", name="DA")
rxn.calculate_reaction_profile()

Submission script:

#!/bin/bash

#SBATCH -n 8
#SBATCH --time=30:00
#SBATCH --mem-per-cpu=200
#SBATCH --tmp=4000                        # per node!!
#SBATCH --job-name=analysis1
#SBATCH --output=analysis1.out
#SBATCH --error=analysis1.err

module load  gcc/8.2.0 python/3.9.9
module load libxkbcommon/0.8.0 xcb-util-wm/0.4.1 xcb-util-image/0.4.0 xcb-util-keysyms/0.4.0 xcb-util-renderutil/0.3.9
source $HOME/autode_env/bin/activate
module load orca/5.0.3
python input.py

Expected behavior Calculated reaction profile

Environment Operating System: Linux CentOS 7 Python version: 3.9 autodE version: 1.3.5

t-young31 commented 4 months ago

autodE uses matplotlib to render pdf profiles, which needs a backend. if there isn't one I think you should just be able to do

conda install -c conda-forge matplotlib
ATsybizova commented 4 months ago

Unfortunately, I cannot use conda on our cluster. I loaded tk/8.6.10separately, however, the calculation resulted in the same error message.

t-young31 commented 4 months ago

annoying!

what's this line for? can it be removed?

module load libxkbcommon/0.8.0 xcb-util-wm/0.4.1 xcb-util-image/0.4.0 xcb-util-keysyms/0.4.0 xcb-util-renderutil/0.3.9

looking at the error (qt.qpa.xcb: could not connect to display localhost:16.0) it seems like it's complaining about xcb?

ATsybizova commented 4 months ago

Huh, it seems that line does not affect anything. I removed it and got the same error. Originally I thought I need to load these additional modules exactly because autodE complained about xcb

t-young31 commented 4 months ago

I've got no experience with installing autodE without using conda for the dependencies so I'm not sure what to suggest. maybe pip install matplotlib will bring in qt?