sigpy icon indicating copy to clipboard operation
sigpy copied to clipboard

Sigpy.mri.poission with core dumped

Open SZUHvern opened this issue 3 years ago • 3 comments

When using 'Sigpy.mri.poission' in pytorch's 'Dataloader' to generate random mask(iterative generation), it is easy to occur 'Aborted (core dumped)' in any step and shut down my process. I want to know is there any way to solve this problem. Thanks!

SZUHvern avatar Feb 10 '22 08:02 SZUHvern

Hi,

Thanks for the report. Could you please post code to reproduce the bug?

sidward avatar Feb 11 '22 22:02 sidward

Yes, I just do an simply reimplement, like this:

for i in range(1000000): sigpy.mri.poission((320,320),accel=8, seed=None, tol=0.3) it will running slower and slower and randomly stop at a certain step.

When this program is called into torch.dataloader, an Aborted warning will appear, like this: class test(Dataset): def init(self): super(test, self).init() def len(self): return len(self.examples) def getitem(self, item): mask_sub = sigpy.mri.poisson((320, 320), accel=8, dtype=np.float32, seed=None, tol=0.1) mask_sub = torch.from_numpy(mask_sub).float() return mask_sub

I'm thinking if there is some process that keeps getting called as it iterates until it fills the memory. Is there any way like sigpy.close() to fix this problem?

SZUHvern avatar Feb 12 '22 03:02 SZUHvern

Ok, thanks for the report. I will look at it when I have time. My gut feeling is that it is related to #102, so if you can try that change and let me know, that would be appreciated.

sidward avatar Feb 16 '22 20:02 sidward