3dem / model-angelo

Automatic atomic model building program for cryo-EM maps
MIT License
110 stars 18 forks source link

Issue using model-angelo on mac with Apple M2 chip #41

Open Jurtel opened 1 year ago

Jurtel commented 1 year ago

Hello, I encountered an issue when trying to test model-angelo with model_angelo build -h on my macbook. I got the following error:

error: command '/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_810lo85vyi/croot/python-split_1678271120546/_build_env/bin/llvm-ar' failed: No such file or directory [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyhmmer Running setup.py clean for pyhmmer Failed to build pyhmmer ERROR: Could not build wheels for pyhmmer, which is required to install pyproject.toml-based projects

Is there a way to work around this issue to get model-angelo running on this computer? Thank you!

althonos commented 1 year ago

Hi @Jurtel, HMMER is not officially supported on Arm processors (M1 and M2 chips), but you can use an experimental version of PyHMMER for arm with:

pip install -U git+https://github.com/althonos/pyhmmer@neon-support

Then you should be able to install model-angelo :+1:

jamaliki commented 1 year ago

Oh haha nice @althonos , thanks! I'll add this to the readme :)

andreymgtk commented 1 year ago

Hello, I am also trying to get model angelo to run on an M2 macbook. I was able to get to a point where "model_angelo build -h" is working correctly and doesn't list any missing dependencies. Thank you for the above reply with PyHMMER! Currently, when running a test job with and without "-d cpu", I get the following error message:

---------------------------- ModelAngelo ----------------------------- By Kiarash Jamali, Scheres Group, MRC Laboratory of Molecular Biology --------------------- Initial C-alpha prediction --------------------- 0%| | 0/343 [00:00<?, ?it/s] /Users/s/miniconda3/envs/model_angelo/lib/python3.10/site-packages/torch/amp/autocast_mode.py:204: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling') zsh: killed model_angelo build -v cryosparc_P35_J215_006_volume_map.mrc -f D02.fasta -o
(model_angelo) MacLocalTest % /Users/s/miniconda3/envs/model_angelo/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 9 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d ' "

Do you have any recommendations on addressing this error? Thank you!

jamaliki commented 1 year ago

I see the message zsh: killed. Usually, this means that you are running out of RAM. Could this be the case for your Macbook?

andreymgtk commented 1 year ago

Hello, Physical memory is 64GB. Is there a way to check to see how much is requested / allocated during the run?

jamaliki commented 1 year ago

You could check top while the program is running. The program is dying at the C-alpha segmentation stage, so it could also be that the map is too large. Are there other programs running at the same time?

andreymgtk commented 1 year ago

Under current usage, I have about 45 GB of unused memory. During the run, with Top I saw python consuming all of it, leaving only 16M free. Once it crashes, memory is recovered.