rahil-makadia / grss

Gauss-Radau Small-body Simulator. Maintainer: @rahil-makadia
https://rahil-makadia.github.io/grss/
MIT License
4 stars 0 forks source link

Segmentation fault #60

Closed Pachacoti closed 5 months ago

Pachacoti commented 5 months ago

After updating grss I encountered the following issue when handling asteroids such as (3200) Phaethon:

>>> fit_sim.filter_lsq()
Iteration       Unweighted RMS      Weighted RMS        Chi-squared     Reduced Chi-squared
Segmentation fault (core dumped)

Python would exit directly. Seems like this has something do with handling the number of parameters to be fitted more than 6?

rahil-makadia commented 5 months ago

Hi @Pachacoti, what version of GRSS are you using? If I install from source on the main branch or use the latest version on PyPI, I am not able to replicate the segfault...

P.S. apologies on the delayed response, I just got back from a vacation

Pachacoti commented 5 months ago

Just the latest version on GitHub. I did a git pull, got rid of the old version via pip uninstall, and reinstalled it via pip install. Then the issue started to emerge.

rahil-makadia commented 5 months ago

Hmm let me try another machine. I suspect there might be some file path definition that works on my laptop but is not universal

rahil-makadia commented 5 months ago

I am not able to replicate this on my mac or linux machines with either numeric or analytic partials... Maybe try just removing the GRSS directory in your python environment's site-packages directory and then just re-clone GRSS and check if the issue still persists? I would also just recommend switching to using PyPI instead of github for installing as well if you are able to

Pachacoti commented 5 months ago

Thanks for looking into this. Switching to installing via PyPI solved the issue, whereas the efforts of removing the GRSS directory and reinstalling GRSS from the source code on GitHub didn't fix the problem. While the problem appears to have been fixed, I'm still curious how come there would be such a difference. I thought the two ways would be basically equivalent to each other.

rahil-makadia commented 5 months ago

Glad to hear it got fixed! And yep that is even more surprising since the upload to PyPI is a github CI action so there is meant to be no difference. For now I'll mark this as closed.

I'm working on some big upgrades to the OD on the dev branch so if this issue persists after those as well, feel free to reopen it...