RosettaCommons / RoseTTAFold

This package contains deep learning models and related scripts for RoseTTAFold
MIT License
2.02k stars 439 forks source link

Complex example: CUDA out of memory #73

Open chenyuwai opened 3 years ago

chenyuwai commented 3 years ago

Dear All,

I have set up RoseTTAFold on a desktop computer and am trying the complex example but I met with some issues. I have a 8GB GeForce RTX 2070 SUPER card. I noted someone posting early that a 32 GB card is required. Is that so? Please help.

The single protein examples (e2e and pyrosetta) both completed successfully.

But when I ran python network/predict_complex.py -i paired.a3m -o complex -Ls 218 310

I got this error:

Using backend: pytorch Traceback (most recent call last): File "../../network/predict_complex.py", line 317, in pred.predict(args.a3m_fn, args.out_prefix, args.Ls, templ_npz=args.templ_npz) File "../../network/predict_complex.py", line 221, in predict logits, , xyz, lddt = self.model(msa, seq, idx_pdb, t1d=t1d, t2d=t2d) File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, kwargs) File "/home/hd2/baker/RoseTTAFold/network/RoseTTAFoldModel.py", line 112, in forward msa, pair, xyz, lddt = self.feat_extractor(msa, pair, seq1hot, idx) File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/hd2/baker/RoseTTAFold/network/Attention_module_w_str.py", line 469, in forward msa, pair = self.iter_block_1[i_m](msa, pair) File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, kwargs) File "/home/hd2/baker/RoseTTAFold/network/Attention_module_w_str.py", line 311, in forward msa, att = self.msa2msa(msa) File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, kwargs) File "/home/hd2/baker/RoseTTAFold/network/Attention_module_w_str.py", line 174, in forward x = self.encoder_2(x) File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/hd2/baker/RoseTTAFold/network/Transformer.py", line 391, in forward output = layer(output, return_att=return_att) File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, kwargs) File "/home/hd2/baker/RoseTTAFold/network/Transformer.py", line 304, in forward src2 = self.norm2(src) # pre-normalization File "/root/anaconda3/envs/RoseTTAFold/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/hd2/baker/RoseTTAFold/network/Transformer.py", line 27, in forward x = self.a_2(x-mean) RuntimeError: CUDA out of memory. Tried to allocate 774.00 MiB (GPU 0; 7.77 GiB total capacity; 4.30 GiB already allocated; 630.69 MiB free; 5.98 GiB reserved in total by PyTorch)

PresleyWong commented 3 years ago

I manage to run the filtered.a3m in the given complex example with a 24GB RTX3090. It used about 22GB to run. Hope this helps.

275145 commented 2 years ago

I manage to run the filtered.a3m in the given complex example with a 24GB RTX3090. It used about 22GB to run. Hope this helps. @PresleyWong Hi, I am also using a RTX3090 with 24GB of video memory, however I am getting an error when running the pyrosetta script for the single example (in network.stderr) with the following error: RuntimeError: CUDA out of memory. Tried to allocate 7.86 GiB (GPU 0; 23.70 GiB total capacity; 12.40 GiB already allocated; 491.69 MiB free; 21.51 GiB reserved in total by PyTorch) Do you have any suggestions for me, thank you very much!