scottransom / presto

Open source pulsar search and analysis toolkit
http://www.cv.nrao.edu/~sransom/presto/
GNU General Public License v2.0
240 stars 177 forks source link

Change MAXNUMONOFF #166

Open matteobachetti opened 2 years ago

matteobachetti commented 2 years ago

Resolve #77

scottransom commented 1 year ago

@matteobachetti Sorry about the delay on this. I must have missed the notification when you did that.

I think it would be OK to increase MAXNUMONOFF fairly substantially, but I'm not willing to many millions, as you have it here. The reason is that in makeinf.h the INFODATA structure has a static size which includes a double precision array of:

double onoff[MAXNUMONOFF*2];

So that means each INFODATA structure would be over 6GB in size!

The proper way to do this would be to make INFODATA dynamically sized, but that greatly complicates things -- especially passing those structures to/from Python.