Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault when generating particles from prior #16

Open
vatsalpanwar opened this issue Sep 22, 2016 · 6 comments
Open

Segmentation fault when generating particles from prior #16

vatsalpanwar opened this issue Sep 22, 2016 · 6 comments

Comments

@vatsalpanwar
Copy link

Hi Brendon,
After having successfully built an RJObject model for modelling the radial velocities (using the model from gp_quasiperiodic_branch of eggplantbren/Exoplanet as a template adapted to run with DNest4), I keep getting a segmentation fault error when I execute main.cpp .

[vatsal@radaura MyRJObject]$ ./main
# Loaded 143 data points from file RV.txt.
# Using 1 thread.
# Target compression factor between levels = 2.7182818284590451
# Seeding random number generators. First seed = 1474535773.
# Generating 3 particles from the prior...Segmentation fault (core dumped)
[vatsal@radaura MyRJObject]$ ./main
# Loaded 143 data points from file RV.txt.
# Using 1 thread.
# Target compression factor between levels = 2.7182818284590451
# Seeding random number generators. First seed = 1474535790.
# Generating 3 particles from the prior...Segmentation fault (core dumped)
[vatsal@radaura MyRJObject]$ ./main
# Loaded 143 data points from file RV.txt.
# Using 1 thread.
# Target compression factor between levels = 2.7182818284590451
# Seeding random number generators. First seed = 1474535795.
# Generating 3 particles from the prior...Segmentation fault (core dumped)
[vatsal@radaura MyRJObject]$ 

The problem persists even when I am using the suggested values for the OPTIONS file (as given in Brewer and Mackey 2016). I suspect it might be due to the unusually high value of seed being used for the random number generator. Can you please help me figure out how I might solve this?

Vatsal

@eggplantbren
Copy link
Owner

Hi Vatsal,

It won't have anything to do with the seed - high numbers work fine. Is your code in a repository somewhere so I can run it myself?

  • Brendon

@vatsalpanwar
Copy link
Author

Hi Brendon,

Sure, I uploaded the code here : https://github.com/vatsalpanwar/OnlyRV

Vatsal

@eggplantbren
Copy link
Owner

Ta.

One problem is that the model needs the lookup tables (orbit shapes) to be
loaded before it can calculate any likelihoods. See main.cpp in the
Exoplanet repo, which contains this line before running the sampler:

Lookup::get_instance().load();

However there is still a segfault after fixing that. Not sure why.

On Thu, Sep 22, 2016 at 9:55 PM, Vatsal Panwar [email protected]
wrote:

Hi Brendon,

Sure, I uploaded the code here : https://github.com/vatsalpanwar/OnlyRV

Vatsal


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#16 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABgVOrTHAmN5kdTUrYz3QLtyaPtlkKQzks5qslCKgaJpZM4KDsbv
.

Dr Brendon J. Brewer
Department of Statistics, The University of Auckland, New Zealand
Ph: +64 27 500 1336
Web: http://www.stat.auckland.ac.nz/~brewer/

@vatsalpanwar
Copy link
Author

vatsalpanwar commented Sep 22, 2016

Thanks for running the code yourself. I made a modification in my repository to the MyModel.cpp (uncommented the part to check if the log likelihood is nan or inf), took the number of particles as 1, and tried to run it again. It still gives me segmentation fault for a few retries even for this case, before starting to run in the latest attempt.

@eggplantbren
Copy link
Owner

There is something wrong with the orbit files. Try running orbits.py to
regenerate them. It now works on my computer.

On Thu, Sep 22, 2016 at 10:54 PM, Vatsal Panwar [email protected]
wrote:

Thanks for trying to run the code yourself. I made a modification in my
repository to the MyModel.cpp (uncommented the part to check if the log
likelihood is nan or inf), took the number of particles as 1, and tried to
run it again. It still gives me segmentation fault for a few retries even
for this case, before starting to run.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#16 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABgVOuJnlsnaQ5zDynAKCuCYdwvjDtU0ks5qsl5bgaJpZM4KDsbv
.

Dr Brendon J. Brewer
Department of Statistics, The University of Auckland, New Zealand
Ph: +64 27 500 1336
Web: http://www.stat.auckland.ac.nz/~brewer/

@vatsalpanwar
Copy link
Author

It started working for me for one particle. Will regenerate the orbits and run it again once I am done with this run. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants