I'm trying to process data with the -cyclic flag but whenever I run it, my machine's memory gets used up resulting in the process being killed. Even when using the -U flag I have the same issue. Is it a very memory intensive process? I only have 16GB of ram on my machine and ~1GB of swap memory.
Here is the command I'm running:
dspsr -cont -K -d 4 -minram 750 -U 10240 -a psrfits -cyclic 1024 -E ../../../B0950+08.par -V ../../*.fits
Here is the last 20 or so lines of the -V output:
dsp::SingleThread::run SampleDelay done
dsp::SingleThread::run calling CyclicFold
dsp::Operation[CyclicFold]::operate
dsp::Transformation[CyclicFold]::operation call vchecks
dsp::Transformation[CyclicFold]::vchecks input checks
dsp::Transformation[CyclicFold]::vchecks done
dsp::Transformation[CyclicFold]::operation transformation
dsp::Fold::transformation
dsp::Fold::transformation choose_nbin
dsp::Fold::choose_nbin
dsp::Fold::choose_nbin folding_period=0.253088
dsp::Fold::choose_nbin sampling_period=0.000131072
dsp::Fold::choose_nbin minimum_bin_width=1.2 bins or 0.000157286 seconds
dsp::Fold::choose_nbin sensible nbin=1609
dsp::Fold::choose_nbin largest power of 2 < nbin=1024
dsp::Fold::choose_nbin using sensible nbin=1024
dsp::Fold::transformation call Fold::prepare_output
dsp::CyclicFold::prepare_output start
dsp::CyclicFold::prepare_output reset
dsp::Observation::copy_dimensions other->ndat=436166
dsp::TimeSeries::set_nbit (32) ignored
dsp::CyclicFold::prepare_output npol=4
dsp::PhaseSeries::resize nbin=1024
dsp::TimeSeries::resize (1024) data=0 buffer=0 ndat=436166
dsp::TimeSeries::resize reserve_ndat=0 fake_ndat=0
dsp::DataSeries::get_ndat_allocated size=0 nval=4194304 bytes_per_dat=16777216 subsize=0 allocated_ndat=0
dsp::DataSeries::resize nsamp=1024 nbit=32 ndim=1 (current ndat=436166)
dsp::DataSeries::resize nbits=nsamp*nbit*ndim=32768
dsp::DataSeries::resize npol=4 nchan=1048576
dsp::DataSeries::resize nbytes=nbits/8*npol*nchan=17179869184 (current size=0)
dsp::DataSeries::resize set_ndat(1024)
dsp::DataSeries::resize require=17179869184
dsp::DataSeries::resize Memory::allocate (17179869184)
dsp::DataSeries::resize buffer=0x7fe561cb4010
dsp::DataSeries::resize memory_used=24327290880
dsp::DataSeries::resize reshape
dsp::DataSeries::reshape size=17179869184 bytes (subsize=4096 bytes)
dsp::DataSeries::resize return
dsp::PhaseSeries::resize_hits nchan=1048576 nbin=1024 hits_nchan=1
dsp::PhaseSeries::resize_hits Memory::do_allocate (4096)
PhaseSeries::zero this=0x558265594720
PhaseSeries::set_hits(0)
Killed
Hi Daniel, how many channels are in your input data? I'm guessing something around 1024, because the
-cyclic 1024
later results inYou can reduce the memory requirement by
* saving 2 polarizations instead of 4 (with
-d 2
) ... unless you have cyclic spectropolarimetry in mind* reducing the number of phase bins from 1024 to 256 (with
-b 256
) ... very few pulsars have significant power beyond 100 harmonics (depending on the gain of the telescope)* reducing the number of channels in the output periodic spectrum ... depends on the scintillation bandwidth that you're trying to resolve
Last edit: Willem van Straten 2025-09-03
Hello, thank you for your suggestions. I think they resolved the memory issue, however I get the following error now:
Am I using the wrong format for the input data? For reference, my files are PSRFITS search mode data.
And yes, my input data is in 1024 channels.
Thank you again.
Hi Daniel, PSRFITS search mode data are detected (e.g. Stokes parameters or Coherency products) and to compute the cyclic spectrum requires undetected (e.g. baseband) data.
Ah ok, sorry for the confusion. Thank you for the help!