NiftyPET / NIPET

High-throughput PET image reconstruction with high quantitative accuracy and precision
Apache License 2.0
29 stars 7 forks source link

Problem during dynamic reconstruction #42

Open eric2302 opened 2 years ago

eric2302 commented 2 years ago

When running nipet.mmrchain() I get an error that seems to come from the cuda file prjf.cu. I am unexperienced with C, so I hope you can help me out.

My parameters are: {'corepath': './ads054-petmr01/', 'mumapDCM': 'ads054-petmr01', '#mumapDCM': 192, 'lm_dcm': 'ads054-petmr01/30000016062206483381200000003_anonym.dcm', 'lm_bf': 'ads054-petmr01/30000016062206483381200000003_anonym.bf', 'pCT': 'ads054-petmr01/sub-ads054_t1w_pct.nii.gz', 'nrm_dcm': 'ads054-petmr01/30000016062206483381200000002_anonym.dcm', 'nrm_bf': 'ads054-petmr01/30000016062206483381200000002_anonym.bf'}

The output is the following:

the given histogram does not contain a prompt sinogram--will generate a histogram.
i> the list-mode file: ads054-petmr01/30000016062206483381200000003_anonym.bf
i> number of elements in the list mode file: 383979868
i> the first time tag is:       3887688 at positon 7099.
i> the last time tag is:        4787714 at positon 383979739.
i> using time offset:           3887688
i> number of report itags is:   901
i> # chunks of data (initial):  41

i> # elechnk:  12582912

i> setting up data chunks:
i> break time tag [31] is:     900027ms at position 383979868. 
i> frame start time: 15
i> frame stop  time: 60
i> using CUDA device #0

i> setting up CUDA pseudorandom number generator... DONE.

i> creating 3 CUDA streams... DONE.

i> reading the first chunks of LM data from:
   ads054-petmr01/30000016062206483381200000003_anonym.bf  DONE.

+> histogramming the LM data:
wc> couldn't find time tag from this position onwards: 0, 
    assuming the last one.
   +> stream[2]:   3 chunks of data are DONE.  
ic> total prompt single slice rebinned sinogram:  P = 15250000

ic> total prompt and delayeds sinogram   events:  P = 15250000, D = 4444359

ic> total prompt and delayeds head-curve events:  P = 15250000, D = 4444359

ic> maximum prompt sino value:  13 
i> using CUDA device #0
i> and removing the gaps and reordering sino for GPU... DONE in 0.017165s
i> calculating normalisation sinogram using device #0... DONE in 0.089437s.

After which I get the error:

invalid argument in /tmp/pip-install-r1u6rc7y/nipet_f727f69030e8494d9faf2f743df5c3d7/niftypet/nipet/prj/src/prjf.cu at line 276

pjmark commented 2 years ago

which branch are you using? and how did you install it? pip install niftypet?

pjmark commented 2 years ago

to be really sure if all is good, i'd recommend running the recon on a test data as in our website niftypet.readthedocs.io

casperdcl commented 2 years ago

[...] +> stream[2]: 3 chunks of data are DONE.
[...] ic> maximum prompt sino value: 13

looks unusually small.

Also:

invalid argument in /tmp/pip-install-r1u6rc7y/nipet_f727f69030e8494d9faf2f743df5c3d7/niftypet/nipet/prj/src/prjf.cu at line 276

That might be https://github.com/NiftyPET/NIPET/blob/b1c3799c4a795e1db34dc36decd197ab74e95c6e/niftypet/nipet/prj/src/prjf.cu#L276 in which case potentially out of GPU memory error? What's the output of nvidia-smi?