Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDAnalysis 2.0.0 issues #356

Closed
rowanwalker96 opened this issue Jan 22, 2022 · 12 comments
Closed

MDAnalysis 2.0.0 issues #356

rowanwalker96 opened this issue Jan 22, 2022 · 12 comments

Comments

@rowanwalker96
Copy link

Hi there,

I'm finding that when I upgrade my MDAnalysis package to the latest version 2.0.0 pytim stops working for me. It imports fine but pytim.ITIM hangs when called on a Universe.

Creating a conda environment with the previous MDAnalysis version 1.1.1 seemingly solves the issue: conda create -n new_env -c conda-forge mdanalysis=1.1 pytim

I would like to be able to use the latest version of MDAnalysis as Universes can now be pickled paving the way to easier parallel analyses. Do you know if this would be true of a Universe that has first been analysed with pytim.ITIM?

Cheers,
Rowan

@Marcello-Sega
Copy link
Owner

Marcello-Sega commented Jan 22, 2022 via email

@Marcello-Sega
Copy link
Owner

So, a quick test with MDAnalysis 2.0.0 does not show any problem for me:

In [1]: import MDAnalysis as mda
   ...: import pytim
   ...: from pytim.datafiles import LJ_GRO,LJ_SHORT_XTC
   ...: print('mda version:',mda.__version__)
   ...: u = mda.Universe(LJ_GRO,LJ_SHORT_XTC)
   ...: inter = pytim.ITIM(u)
   ...: for ts in u.trajectory[:2]:
   ...:     print(inter.layers[0,0].n_atoms)
   ...: 
   ...: 
mda version: 2.0.0
1227
1184

This is with the latest commit from the master branch.

Could you post a minimal example that triggers the issue? Then it would be easier for me to understand what's going wrong. Let me know also which version of pytim you are using.

@Marcello-Sega
Copy link
Owner

Marcello-Sega commented Jan 23, 2022

In the meantime, I fixed some issues with MDA 2.0.0. They went unnoticed because Travis dropped support. Now I switched to CircleCI and automated testing should be back on track.

Please check your issue also with v0.9.0 from the GitHub repo. I will soon provide packages for PyPI and Conda.

@Marcello-Sega
Copy link
Owner

PyPI and Anaconda packages for v0.9.0 are now available

@rowanwalker96
Copy link
Author

rowanwalker96 commented Jan 23, 2022

Thanks so much for getting back to me! The issue is resolved with the v0.9.0 PyPI package. Conda-forge channel still shows v0.8.4, will this update soon?

The issue I had can be recreated with: conda create -n test -c conda-forge mdanalysis pytim=0.8.4

then if I ctrl-C out of pytim.ITIM hanging:

`

import pytim
from pytim.datafiles import WATER_GRO
import MDAnalysis as mda
u = mda.Universe(WATER_GRO)
inter = pytim.ITIM(u,max_layers=4)
^CTraceback (most recent call last):
File "", line 1, in
File "/u/mk/ptch0465/softwaresrc/anaconda3/envs/test/lib/python3.9/site-packages/pytim/itim.py", line 226, in init
self._assign_layers()
File "/u/mk/ptch0465/softwaresrc/anaconda3/envs/test/lib/python3.9/site-packages/pytim/itim.py", line 390, in _assign_layers
for index, group in enumerate(queue[uplow].get()):
File "/u/mk/ptch0465/softwaresrc/anaconda3/envs/test/lib/python3.9/multiprocessing/queues.py", line 103, in get
res = self._recv_bytes()
File "/u/mk/ptch0465/softwaresrc/anaconda3/envs/test/lib/python3.9/multiprocessing/connection.py", line 221, in recv_bytes
buf = self._recv_bytes(maxlength)
File "/u/mk/ptch0465/softwaresrc/anaconda3/envs/test/lib/python3.9/multiprocessing/connection.py", line 419, in _recv_bytes
buf = self._recv(4)
File "/u/mk/ptch0465/softwaresrc/anaconda3/envs/test/lib/python3.9/multiprocessing/connection.py", line 384, in _recv
chunk = read(handle, remaining)
KeyboardInterrupt`

@Marcello-Sega
Copy link
Owner

Marcello-Sega commented Jan 23, 2022

OK, thanks for the details, that was clearly a problem with multiproc, which, apparently, was triggered only using conda. At the moment I have no idea why that happened, but I will make sure to test the conda packages in the future to avoid problems like this, thanks a lot for reporting the issue!

About the package, I see v0.9.0 already available on https://anaconda.org/conda-forge/pytim
But it might well be that from your location you are accessing another mirror, try to wait a bit and refresh the page.

If it's ok with you, I would then close the issue, let me know.

@Marcello-Sega
Copy link
Owner

BTW, it would be great if you could report on any successful/unsuccessful experience with parallel analysis.

@rowanwalker96
Copy link
Author

rowanwalker96 commented Jan 23, 2022

Ok so unfortunately the multiproc issue is still occuring with the v0.9.0 package downloaded with conda

If I create a conda environment and then instead install pytim v0.9.0 with the PyPI package there are no issues. Parallel analyses (such as those outlined here: https://yuxuanzhuang.github.io/UserGuide/examples/analysis/custom_parallel_analysis.html#Parallelization-in-a-split-apply-combine-fashion) on a Universe that has first been analysed with pytim.ITIM are also successful. I will play around further and get back to you.

@Marcello-Sega
Copy link
Owner

OK. I'd suggest first trying with multiproc disabled, e.g.

inter = pytim.ITIM(u,max_layers=4, multiproc=False)

to check that there are no other issues.

@Marcello-Sega
Copy link
Owner

Maybe related to this issue ?

@rowanwalker96
Copy link
Author

rowanwalker96 commented Jan 23, 2022

my mistake sorry, conda v0.9.0 package is working fine, my new conda environment was still using a previous PyPI 0.8.4 version

thanks again, happy to close the issue, if I find anything interesting re parallel analysis I will let you know :)

@Marcello-Sega
Copy link
Owner

great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants