scottransom / presto

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

a memory issue about test_presto_python #186

Closed mylonelywolf closed 1 year ago

mylonelywolf commented 1 year ago

Hi! After I finished installing presto in Ubuntu following README.md, I encountered a memory error running test_presto_python.py, and then I followed the prompts in src/Makefile to make clean,make, and pip install ., I tried several times, but the problem persisted, and the results are as follows:

Warning:  '/home/mylonelywolf/PRESTO/presto/lib/fftw_wisdom.txt' is not up-to-date.
          You should run 'makewisdom'.  See $PRESTO/INSTALL.
Testing FFT stuff... success
Testing FFTW call... success
Warning:  '/home/mylonelywolf/PRESTO/presto/lib/fftw_wisdom.txt' is not up-to-date.
          You should run 'makewisdom'.  See $PRESTO/INSTALL.
Testing tablesixstepfft call... success
Testing reading infiles... success
Testing writing infiles... success
Note: If the following fails, edit $PRESTO/Makefile and follow
      the instructions about the CFLAGS USE_FFTW_MALLOC option
free(): invalid next size (fast)

After my attempts, the error occurred in the loop on line 57, and everything worked fine for the first five times of the loop, and the error was reported on the sixth execution of del I am using Anaconda python and my environment configuration is as follows:

export PATH=$PATH:/home/mylonelywolf/PRESTO/presto/bin
export TEMPO=/home/mylonelywolf/PRESTO/tempo
export PRESTO=/home/mylonelywolf/PRESTO/presto
export PGPLOT_DIR=/usr/lib/pgplot5
scottransom commented 1 year ago

Just a quick clarification question: after the error, did you edit the src/Makefile and comment out the line: CFLAGS += -DUSE_FFTW_MALLOC and then fully re-compile and re-install the python modules?

mylonelywolf commented 1 year ago

I didn't comment out this line, I just noticed re-compile and re-install! I tried to comment out this line, and now test_presto_python.py doesn't have this problem, but a new problem appears:

Warning:  '/home/mylonelywolf/PRESTO/presto/lib/fftw_wisdom.txt' is not up-to-date.
          You should run 'makewisdom'.  See $PRESTO/INSTALL.
Testing FFT stuff... success
Testing FFTW call... success
Warning:  '/home/mylonelywolf/PRESTO/presto/lib/fftw_wisdom.txt' is not up-to-date.
          You should run 'makewisdom'.  See $PRESTO/INSTALL.
Testing tablesixstepfft call... success
Testing reading infiles... success
Testing writing infiles... success
Note: If the following fails, edit $PRESTO/Makefile and follow
      the instructions about the CFLAGS USE_FFTW_MALLOC option
Testing allocation and freeing of memory... success
Testing psrparams and orbitparams stuff... success
Testing spectralpower and spectralphase... success
Testing vector shifting / rotation... success
Testing orbit integration stuff... success
Testing Fourier response generation... success
Testing angle functions... success
sh: 1: tempo: not found

Error in chkfopen(): No such file or directory
   path = 'resid2.tmp'

This seems to be a problem with my tempo setup?

mylonelywolf commented 1 year ago

I just tried re-install the tempo and all the steps of the program worked. Thank you very much for your help!

scottransom commented 1 year ago

Great! Glad it is working!