ArrayMemoryError in (NU refinement)

Greeting there,

I have done the hetero and homo refinement using box size of 1024. When I perform the NU refinement, it give me ArrayMemoryError as below:
Can anyone point me out the reason or solution? Is it because of large box size?

Thanks and best,
Yanhe

[CPU: 122.47 GB] Traceback (most recent call last):
File “cryosparc_worker/cryosparc_compute/run.py”, line 85, in cryosparc_compute.run.main
File “cryosparc_worker/cryosparc_compute/jobs/refine/newrun.py”, line 703, in cryosparc_compute.jobs.refine.newrun.run_homo_refine
File “cryosparc_worker/cryosparc_compute/jobs/nonuniform_refine/nu_regularize.py”, line 49, in cryosparc_compute.jobs.nonuniform_refine.nu_regularize.new_non_uniform_regularize
File “cryosparc_worker/cryosparc_compute/jobs/nonuniform_refine/nu_regularize.py”, line 38, in cryosparc_compute.jobs.nonuniform_refine.nu_regularize.new_non_uniform_regularize.do_regularization
File “cryosparc_worker/cryosparc_compute/jobs/nonuniform_refine/run_new.py”, line 271, in cryosparc_compute.jobs.nonuniform_refine.run_new.do_matched_cv_filter_estimation_gpu
File “cryosparc_worker/cryosparc_compute/jobs/nonuniform_refine/run_new.py”, line 303, in cryosparc_compute.jobs.nonuniform_refine.run_new.do_matched_cv_filter_estimation_gpu
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 4.01 GiB for an array with shape (1024, 1024, 513) and data type complex64

Hi @yanhezhao,

Yes, this error is due to an insufficient amount of host (CPU) RAM to allocate space for the large box size. We have not closely profiled the memory usage of non-uniform refinement, so we can’t give a precise upper limit on the box size that is usable with a given amount of RAM. If you see this error it is still best to proceed by downsampling your particles to a smaller box size and repeating the refinement job. If the FSC resolution is not hitting the nyquist resolution, there is no degradation in result quality incurred by downsampling.

Best,
Michael

1 Like