Acellera / htmd

HTMD: Programming Environment for Molecular Discovery
https://software.acellera.com/docs/latest/htmd/index.html
Other
256 stars 58 forks source link

X11 error #767

Closed and-tos closed 6 years ago

and-tos commented 6 years ago

When running

model = Model(dataBoot)
model.plotTimescales()

I get the following error:

estimating MaximumLikelihoodMSM:  96% (25/26) [###########################################################################   ] eta 00:06 /02-09-18 21:33:32 pyemma.msm.estimators.maximum_likelihood_msm.MaximumLikelihoodMSM[2] WARNING  Ignored error during estimation: Active set is empty. Cannot estimate MSM.
2018-09-02 21:33:32,395 - pyemma.msm.estimators.maximum_likelihood_msm.MaximumLikelihoodMSM[2] - WARNING - Ignored error during estimation: Active set is empty. Cannot estimate MSM.
estimating MaximumLikelihoodMSM: 100% (26/26) [##############################################################################] eta 00:06 \02-09-18 21:33:32 pyemma.msm.estimators.implied_timescales.ImpliedTimescales[3] WARNING  Estimation has failed at lagtimes: [124999]. Run single-lag estimation at these lags to track down the error.
2018-09-02 21:33:32,397 - pyemma.msm.estimators.implied_timescales.ImpliedTimescales[3] - WARNING - Estimation has failed at lagtimes: [124999]. Run single-lag estimation at these lags to track down the error.
02-09-18 21:33:34 pyemma.msm.estimators.implied_timescales.ImpliedTimescales[3] WARNING  Some timescales could not be computed. Timescales array is smaller than expected or contains NaNs
2018-09-02 21:33:34,409 - pyemma.msm.estimators.implied_timescales.ImpliedTimescales[3] - WARNING - Some timescales could not be computed. Timescales array is smaller than expected or contains NaNs
The X11 connection broke: I/O error (code 1)
XIO:  fatal IO error 22 (Invalid argument) on X server ":4.0"
      after 437 requests (435 known processed) with 0 events remaining.
stefdoerr commented 6 years ago

Are you ssh-ing into a remote machine when calling this code?

and-tos commented 6 years ago

Yes, indeed I am. I am running HTMD on a Cluster.

stefdoerr commented 6 years ago

Unless you ssh -XY you will not be able to open plots remotely. You would need to pass plot=False to plotTimescales to disable the plotting but then you probably don't really that command anyway

and-tos commented 6 years ago

I tried plot=False and save='file' to save the image without displaying it, but this did not work either. I'll have a look into the ssh option. I am actually using ThinLinc to work on the front node.

j3mdamas commented 6 years ago

I believe this is unrelated with HTMD per se, i.e. it's not an HTMD bug.

@andt88 is the output the same when using plot=False and save=file?

and-tos commented 6 years ago

Yes, I get the same error.

j3mdamas commented 6 years ago

@stefdoerr does savefig function of matplotlib use X? That's the only way the error would be the same.

j3mdamas commented 6 years ago

https://matplotlib.org/faq/howto_faq.html#matplotlib-in-a-web-application-server I think we use Agg, right?

stefdoerr commented 6 years ago

No we don't. This is the solution if you want to save plots through ssh. Set the backend to agg

On September 3, 2018 1:48:56 PM GMT+03:00, "João M. Damas" notifications@github.com wrote:

https://matplotlib.org/faq/howto_faq.html#matplotlib-in-a-web-application-server I think we use Agg, right?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Acellera/htmd/issues/767#issuecomment-418077498

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

j3mdamas commented 6 years ago

OK.

@andt88 use this:

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

it should fix your issue

stefdoerr commented 6 years ago

Should be the first thing in your script. Before importing anything else.

On September 3, 2018 2:17:10 PM GMT+03:00, "João M. Damas" notifications@github.com wrote:

OK.

@andt88 use this:

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

it should fix your issue

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Acellera/htmd/issues/767#issuecomment-418084124

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.