cctbx_project icon indicating copy to clipboard operation
cctbx_project copied to clipboard

Seg fault in model.as_map_model_manager

Open hrp1000 opened this issue 2 years ago • 12 comments

I'm getting a segmentation fault at line 348-ish in process_predicted_model.py:

Get a new model

new_model = model.as_map_model_manager().model_from_hierarchy( ph, return_as_model = True)

Running MacOS High Sierra (10.13.6) - highest available OS for my hardware, CCTBX installed yesterday (10th Jan 2022) with conda, running like this:

libtbx.python process_predicted_model.py AF-O15393-F1-model_v2.pdb junk.pdb

AF-O15393-F1-model_v2.pdb downloaded yesterday from UniProt website.

[MacPro:~/icl/test] harry% libtbx.python --version Python 3.7.7

?

hrp1000 avatar Jan 11 '22 12:01 hrp1000

Sorry, I had no luck reproducing this. When installing cctbx via conda on 10.15.7 with python=3.7.7, no segfault.

Seems like Apple has made it harder to find old OSX installers, so also no luck making a 10.13 installation in Parallels.

Can you do conda list --explicit and paste the results? Note that Numpy versions 1.21.0 through 1.21.4 are known to cause segfaults although I don't think you should have gotten one of those

For anyone interested, the pdb file in question is available here: https://alphafold.ebi.ac.uk/files/AF-O15393-F1-model_v2.pdb

dwpaley avatar Jan 11 '22 16:01 dwpaley

Hi Daniel

see attached…

I found (what looks like it links to) a HIgh Sierra installer at

https://support.apple.com/kb/DL1946?viewlocale=en_US&locale=en_US

Harry

On 11 Jan 2022, at 16:37, Daniel Paley @.***> wrote:

Sorry, I had no luck reproducing this. When installing cctbx via conda on 10.15.7 with python=3.7.7, no segfault.

Seems like Apple has made it harder to find old OSX installers, so also no luck making a 10.13 installation in Parallels.

Can you do conda list --explicit and paste the results? Note that Numpy versions 1.21.0 through 1.21.4 are known to cause segfaults although I don't think you should have gotten one of those

For anyone interested, the pdb file in question is available here: https://alphafold.ebi.ac.uk/files/AF-O15393-F1-model_v2.pdb

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

hrp1000 avatar Jan 11 '22 16:01 hrp1000

Just noticed that I do seem to have numpy 1.21.2...

On 11 Jan 2022, at 16:44, Harry Powell @.***> wrote:

Hi Daniel

see attached…

I found (what looks like it links to) a HIgh Sierra installer at

https://support.apple.com/kb/DL1946?viewlocale=en_US&locale=en_US

Harry<explicit.lis>

On 11 Jan 2022, at 16:37, Daniel Paley @.***> wrote:

Sorry, I had no luck reproducing this. When installing cctbx via conda on 10.15.7 with python=3.7.7, no segfault.

Seems like Apple has made it harder to find old OSX installers, so also no luck making a 10.13 installation in Parallels.

Can you do conda list --explicit and paste the results? Note that Numpy versions 1.21.0 through 1.21.4 are known to cause segfaults although I don't think you should have gotten one of those

For anyone interested, the pdb file in question is available here: https://alphafold.ebi.ac.uk/files/AF-O15393-F1-model_v2.pdb

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

hrp1000 avatar Jan 11 '22 16:01 hrp1000

Great! 1.20.x and 1.21.5 should both work.

dwpaley avatar Jan 11 '22 16:01 dwpaley

You’ll have to help me here - how do I downgrade/upgrade with conda? I tend to use it purely with defaults and let it do what it wants...

On 11 Jan 2022, at 16:55, Daniel Paley @.***> wrote:

Great! 1.20.x and 1.21.5 should both work.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

hrp1000 avatar Jan 11 '22 16:01 hrp1000

Sorry about that :) After activating the environment with cctbx in it, can you try: conda install numpy=1.21.5 -c conda-forge. If that doesn't work, then the same with numpy=1.20.

dwpaley avatar Jan 11 '22 16:01 dwpaley

just “solving environment” :-)

H

On 11 Jan 2022, at 16:59, Daniel Paley @.***> wrote:

Sorry about that :) After activating the environment with cctbx in it, can you try: conda install numpy=1.21.5 -c conda-forge. If that doesn't work, then the same with numpy=1.20.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

hrp1000 avatar Jan 11 '22 17:01 hrp1000

Hi Harry, did it ever finish solving?

Mamba is a sort of C++ port of Conda, it works 95% of the time, the other 5% I have seen it irreparably destroy an environment. So don't use it on something irreplaceable, but with that caveat, you can do:

$ conda install mamba -c conda-forge
$ mamba install numpy=1.21.5 -c conda-forge

The solving step should be much faster this way.

dwpaley avatar Jan 11 '22 17:01 dwpaley

Hi Daniel

It’s still going with 1.21.5 - it seems to have "failed with initial frozen solve” a couple of times. I’ll wait until it fails compeletely, then try mamba.

Harry

On 11 Jan 2022, at 17:31, Daniel Paley @.***> wrote:

Hi Harry, did it ever finish solving?

Mamba is a sort of C++ port of Conda, it works 95% of the time, the other 5% I have seen it irreparably destroy an environment. So don't use it on something irreplaceable, but with that caveat, you can do:

$ conda install mamba -c conda-forge $ mamba install numpy=1.21.5 -c conda-forge

The solving step should be much faster this way.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

hrp1000 avatar Jan 11 '22 17:01 hrp1000

Hi Daniel

Downgrading to 1.20 worked in a (relative) flash and my seg fault has disappeared.

Many thanks for your prompt & extremely helpful response.

Harry

On 11 Jan 2022, at 17:31, Daniel Paley @.***> wrote:

Hi Harry, did it ever finish solving?

Mamba is a sort of C++ port of Conda, it works 95% of the time, the other 5% I have seen it irreparably destroy an environment. So don't use it on something irreplaceable, but with that caveat, you can do:

$ conda install mamba -c conda-forge $ mamba install numpy=1.21.5 -c conda-forge

The solving step should be much faster this way.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

hrp1000 avatar Jan 11 '22 17:01 hrp1000

Excellent! Glad to help.

@bkpoon I'll leave this issue open in case you what to do in the conda-forge feedstock to prevent cctbx from getting installed into an environment containing a bad numpy version...

dwpaley avatar Jan 11 '22 18:01 dwpaley

We can update the issue on boost-feedstock and maybe make a PR to https://github.com/conda-forge/conda-forge-repodata-patches-feedstock so that boost does not use numpy >=1.21,numpy<1.21.5.

bkpoon avatar Jan 11 '22 19:01 bkpoon