Closed Francyrad closed 1 year ago
Hi Francesco,
I don't see anything obviously wrong with your code. I'm sure you've noticed the warning message about the version mismatch? What version of REBOUND was used to generate the archive file and what version are you using to read the fie in? If that's not the source of the problem, then you'd need to send me your binary file so I can run the code myself.
Hanno
I did 2 tries, both with rebound 3.24.2 that (should) be the last version available in python
Regarding the program, the code is been written in C. I did a simulation with the version of 3 April 2023 (i suppose it is the 3.24.2). Right now i downloaded the 3.24.3. I tried to run my code and i've the same problem.
If you can please try to read my archive.bin. I also share with you my code, in way that you can check if there is something wrong, the makefile and the python script
Thank for your availability and your help
Francesco
Thanks. The problem is that you have at least two particles which have exactly the same position and as a result the tree code ends up in an infinite loop until you reach a recursion limit or run out of memory. A better warning message would be nice, but the underlying problem has probably nothing to do with the Simulation Archive.
I can see in you code that you have implemented your own collision resolve function. I'm not quite sure what you're trying to do with it. I suspect there is some confusion about its use. Most importantly, the function has the wrong return type. It should return an integer that determines if one of the two particles should get removed from the simulation. You need to fix that to avoid unexpected results. Look at the implementation of the hard sphere routine that comes with REBOUND.
In the meantime, I'll try to add some error message and avoid the segmentation fault in this case...
Thank you! Solving the collision issue solved the problem! I close this! I wish you a good Job!
Francesco
Glad it got resolved!
Dear users
I tried to read the snapshots of my "archive.bin" with python, but i can only generate the picture of the first snapshot. When trying to reading the second. The code goes in segmentation fault. This problem is both in linux and MacOS. I have no idea if this is fault of my code. Can you please check?
I got this error and the following warnings:
Thank you in advance for your support