dtamayo / reboundx

A library for adding additional forces to the REBOUND N-body integration package
GNU General Public License v3.0
80 stars 60 forks source link

"Process finished with exit code 139" when running example code #123

Closed Song-XY closed 4 months ago

Song-XY commented 5 months ago

Hello there. I create a new conda environment for reboundx and run the example code on the Quick Start Guide

import rebound import reboundx sim = rebound.Simulation() sim.add(m=1.) sim.add(a=1.) rebx = reboundx.Extras(sim)

However, I get "Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)". I'm using Python 3.8, rebound 4.3.2, and reboundx 4.1.0. I tried "print(reboundx.__githash__); print(rebound.__githash__ )", and I got 20ae409abea8a47fbfc9c7e8d84c8d559388d95b, f81ba52996d6b8642ca25b1931e506bd2bb8faea What could be the cause of this problem? Is there a way to fix it? Thanks. )

Best, -Song

dtamayo commented 5 months ago

Thanks Song, that does sound like it could potentially be an issue. What operating system are you using?

Song-XY commented 5 months ago

I tried on Linux and macOS 13.6.6, and I got code 139 in both systems.

dtamayo commented 4 months ago

Hi Song,

I can't require reproduce the same error. If I make a new conda environment (which defaults to Python 3.12) and pip install reboundx, the quickstart example runs fine.

But I think you're right there's a problem, I think with the installation wheels we create for reboundx. If I make a conda environment with python 3.8, I get a different error when I try to import reboundx.

I need a bit of time to look into it, but as a workaround, I think it works to compile instead from source by doing

pip install reboundx --no-binary :all:

Will update soon. Thanks for opening an issue

Song-XY commented 4 months ago

Hi Dan, I re-install reboundx with pip install reboundx --no-binary :all: and it works! The error has been bugging me for days and now I can finally explore reboundx. ) Thank you soooo much!