MemoryError: cuMemAlloc failed: out of memory

MemoryError: cuMemAlloc failed: out of memory

How can I solve this problem when I am running a test data set to refine the 3D structure?


I have been encountering with problems during 2D classification. Could you please help me?

Below is the error:

Traceback (most recent call last):
File “/home/student/cryosparc/cryosparc-compute/sparc/”, line 438, in run_with_except_hook
run_old(*args, **kw)
File “/home/student/cryosparc/cryosparc-compute/engine/”, line 86, in run*self.args,, thidx=self.thidx)
File “/home/student/cryosparc/cryosparc-compute/engine/”, line 803, in work
ET.compute_resid_pow() # do this even if not do_align because we have to compare the different structures
File “/home/student/cryosparc/cryosparc-compute/engine/”, line 261, in compute_resid_pow
self.ensure_allocated(‘resid_pow’, (self.N_D, self.N_K, self.N_RS_aligned, self.N_SS), n.float32)
File “/home/student/cryosparc/cryosparc-compute/engine/”, line 52, in ensure_allocated
new = cuda_core.allocate_gpu(shape, dtype, curr)
File “/home/student/cryosparc/cryosparc-compute/engine/”, line 109, in allocate_gpu
ret = gpuarray.empty(shape, dtype=dtype)
File “/home/student/cryosparc/anaconda2/lib/python2.7/site-packages/pycuda/”, line 209, in init
self.gpudata = self.allocator(self.size * self.dtype.itemsize)
MemoryError: cuMemAlloc failed: out of memory


You’ve run out of GPU memory. Maybe try using a smaller box size?


Thank you! I will try smaller box size.