3D flex reconstruction error

Hi, all
I got error when I run the 3D flex reconstruction.

Traceback (most recent call last):
File “cryosparc_master/cryosparc_compute/run.py”, line 96, in cryosparc_compute.run.main
File “/kumquat/boshu/cryosparc/cryosparc_worker/cryosparc_compute/jobs/flex_refine/run_highres.py”, line 150, in run
flexmod.do_hr_refinement_flex(numiter=params[‘flex_bfgs_num_iters’])
File “cryosparc_master/cryosparc_compute/jobs/flex_refine/flexmod.py”, line 1640, in cryosparc_compute.jobs.flex_refine.flexmod.do_hr_refinement_flex.lambda7
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_lbfgsb_py.py”, line 199, in fmin_l_bfgs_b
res = _minimize_lbfgsb(fun, x0, args=args, jac=jac, bounds=bounds,
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_lbfgsb_py.py”, line 308, in _minimize_lbfgsb
sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_optimize.py”, line 263, in _prepare_scalar_function
sf = ScalarFunction(fun, x0, args, grad, hess,
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py”, line 158, in init
self._update_fun()
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py”, line 251, in _update_fun
self._update_fun_impl()
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py”, line 155, in update_fun
self.f = fun_wrapped(self.x)
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py”, line 137, in fun_wrapped
fx = fun(np.copy(x), *args)
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_optimize.py”, line 76, in call
self._compute_if_needed(x, *args)
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/scipy/optimize/_optimize.py”, line 70, in _compute_if_needed
fg = self.fun(x, *args)
File “cryosparc_master/cryosparc_compute/jobs/flex_refine/flexmod.py”, line 1640, in cryosparc_compute.jobs.flex_refine.flexmod.do_hr_refinement_flex.lambda7
File “cryosparc_master/cryosparc_compute/jobs/flex_refine/flexmod.py”, line 1621, in cryosparc_compute.jobs.flex_refine.flexmod.errfunc_flex
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/torch/_tensor.py”, line 488, in backward
torch.autograd.backward(
File “/kumquat/boshu/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.8/site-packages/torch/autograd/init.py”, line 197, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.72 GiB (GPU 0; 9.78 GiB total capacity; 7.24 GiB already allocated; 604.56 MiB free; 8.12 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Do you have any ideas to solve this problem?
Thanks in advance!

boshu

You ran out of VRAM. What GPUs are you using? Short of upgrading to GPUs with more memory, you will need to crop/downsample your particles more.

Hi,

Thank you for your reply! my GPU is RTX3080*2. I will try to downsample the particles.

Best Regards,
Bo Shu

Good luck with your processing! :slight_smile: