NU refinement failing in higher symmetries

Hi everyone,

I’m trying to run a NU refinement job on 960 px particles with internal icosahedral symmetry, and it fails with out-of-memory error, and also in some of the high-order subgroups of the I group (I tried T and D20). The full traceback is:

[CPU: 29.44 GB]  Traceback (most recent call last):
  File "cryosparc_worker/cryosparc_compute/", line 84, in
  File "cryosparc_worker/cryosparc_compute/jobs/refine/", line 330, in
  File "/opt/cryosparc/cryosparc_worker/cryosparc_compute/", line 204, in align_symmetry
  File "/opt/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/pycuda/", line 1049, in to_gpu
    result = GPUArray(ary.shape, ary.dtype, allocator, strides=_compact_strides(ary))
  File "/opt/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/pycuda/", line 210, in __init__
    self.gpudata = self.allocator(self.size * self.dtype.itemsize)
pycuda._driver.MemoryError: cuMemAlloc failed: out of memory

I tried reducing the batch size to as little as 50 particles, but it seems to have no effect – the job fails at:

[CPU: 12.72 GB]  ====== Initial Model ======
[CPU: 12.72 GB]    Resampling initial model to specified volume representation size and pixel-size...
[CPU: 15.56 GB]    Aligning initial model to symmetry. 

which is the very beginning.
Also, the same job runs well in C1 symmetry, which is a bit unintuitive: I’d suggest that symmetry should reduce the memory consumption roughly “point-group-order” times. However, it seems to be not the case.

As for hardware, we have 4x2080 Ti GPUs and 256 Gb RAM + 256 Gb swap.

Any advices on what should we do, except for replacing the GPUs? :slight_smile:

Hi @marinegor

Apologies that you’re encountering this error, and thanks for including the traceback and logs. The symmetry alignment subroutine (where the fail is happening – during the Aligning initial model to symmetry) will be made more precise & GPU memory efficient in our upcoming release.

In the meantime, can you run the job with the Do symmetry alignment parameter off?

If the volume isn’t already aligned to the symmetry axes, you could workaround this by:

  • downsampling the particles to half the current box size,
  • running a regular refinement with symmetry alignment on using the downsampled particles,
  • connecting the full size particles + the output volume to a new non-uniform refinement with symmetry alignment off


Hi Michael, thanks a lot for your reply!

We managed to do the processing via reducing the particle size a little bit (to 850-ish), but I’ll be glad to try the updated version as soon as it comes live!