Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Allocation #99

Open
Zzariry opened this issue May 2, 2023 · 2 comments
Open

Memory Allocation #99

Zzariry opened this issue May 2, 2023 · 2 comments

Comments

@Zzariry
Copy link

Zzariry commented May 2, 2023

Hello,

I tried to use your code to reconstruct 3D anatomical brain MRI data of 1mm iso resolution with the mdgrappa function, it works well even if it is time-consuming, however when going to 0.7mm data with a large matrix (252, 52, 350, 256), and 52 the number of coils. ACS built-in (252, 52, 33, 256), the program crashes as it tries to allocate 471 GB of Ram. Do you please have an optimized version of your code to manage better the compute server resources?

The configuration I have:

  • 128 CPU cores.
  • 512 GB RAM, with 35x GB on SWP
  • 32 GB GPU in VRAM.

Thank you,
Zakaria

@mckib2
Copy link
Owner

mckib2 commented May 10, 2023

I will take a look at this, I believe the issue is most likely due to a call to skimage.util.view_as_windows over a large portion of that window which blows up the size. There is likely a way to refactor this to do this iteratively

@Zzariry
Copy link
Author

Zzariry commented May 10, 2023

Thanks for your answer, it was at the memory allocation for the S array that it showed me that it could not allocate 471 GB,
When I changed the kernel size to (3, 3, 3) instead of (5, 5, 5), and the ACS to (252, 52, 33, 48), there is no longer this problem, even if I think that the size of the S-matrix has nothing that could be related to the kernel (if I'm not mistaken).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants