Open xiongh15 opened 1 week ago
And i am pretty sure there is no memory overflow considering i used quite few probes and slices
Hey @xiongh15, thanks for opening the issue.
And i am pretty sure there is no memory overflow considering i used quite few probes and slices
Emm, not sure how much VRAM your H100 has (96GBs?), but a 400x400x144x144 dataset is a lot to store in-memory!
We have a tutorial notebook on GPU-memory handling within ptychography here, but here are the more important aspects in your case:
storage='cpu'
during initialization to avoid storing the DPs (and other utility arrays) on the gpu. vectorized_com_calculation=False
during preprocessing, to compute the CoM with a for loop instead.reset=True
during reconstruction, you can also set store_initial_arrays=False
.max_batch_size
during both preprocessing and reconstruction to only use a subset of the probe-positions.Finally, to entertain the idea that this is not a memory overflow issue -- you seem to have a version incompatibility between your cuda driver (12.4) and your cupy version (13.3.0). cc'ing @sezelt who has more experience w/ cuda installations, in case this is indeed the issue.
Thanks for the quick reply! I just finished reading this very helpful notebook. I will try these parameters in the next few days.
CUDADriverError: CUDA_ERROR_ILLEGAL_ADDRESS: an illegal memory access was encountered Works pretty well on small datasets (256x256x144x144) 65536 diffraction patterns. However, quickly fail on large datasets (400x400x144x144) 160000 diffraction patterns.
The error appeared in py4DSTEM.process.phase.MixedstateMultislicePtychography.preprocess()
To Reproduce
py4DSTEM version 0.14.18
Python version 3.12.6
Operating system Linux (ubuntu)
GPU