bilby-dev / bilby

A unified framework for stochastic sampling packages and gravitational-wave inference in Python.
https://bilby-dev.github.io/bilby/
MIT License
68 stars 75 forks source link

Error in the example of GW170817 #451

Closed bilby-bot closed 1 month ago

bilby-bot commented 5 years ago

In GitLab by @git.ligo:christos.karathanasis on Jul 6, 2019, 12:25

An error appears when running the example for GW170817 (https://git.ligo.org/lscsoft/bilby/blob/master/examples/open_data_examples/GW170817.py). When running this I get the following error: File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/waveform_generator.py", line 218, in parameters new_parameters.pop(key) KeyError: 'tilt_1'

I included the following priors to fix this and other similar errors: priors['a_1'] = bilby.core.prior.Uniform(name='a_1', minimum=0, maximum=0.05, boundary='reflective',latex_label='$a_1$') priors['a_2'] = bilby.core.prior.Uniform(name='a_2', minimum=0, maximum=0.05, boundary='reflective',latex_label='$a_2$') priors['tilt_1']=bilby.core.prior.Sine(name='tilt_1', boundary='reflective') priors['tilt_2']=bilby.core.prior.Sine(name='tilt_2', boundary='reflective') priors['phi_jl']=bilby.core.prior.Uniform(name='phi_jl', minimum=0, maximum=2 np.pi, boundary='periodic') priors['phi_12']=bilby.core.prior.Uniform(name='phi_12', minimum=0, maximum=2 np.pi, boundary='periodic')

But then I get an other error: Error in `python': free(): invalid pointer: 0x00007f0c958f8be8

The same error I also get when I change the prior file from binary_neutron_stars.prior to precessing_binary_neutron_stars.prior.

bilby-bot commented 5 years ago

In GitLab by @git.ligo:gregory.ashton on Jul 7, 2019, 07:56

It sounds like you where missing a prior-line, but when added the new error is something related to a memory problem. That isn't something we typically expect.

@git.ligo:virginia.demilio , do I recall that you wrote this example? Would you mind checking if it still works with changes to the spins?

@git.ligo:christos.karathanasis could you say which versions of python and bilby you are using (the bilby version gets printed out in the logging) and give some more context to the error you see? E.g, what is happening just before it occurs, is there any other output?

bilby-bot commented 5 years ago

In GitLab by @git.ligo:christos.karathanasis on Jul 7, 2019, 12:29

I am using bilby 0.5.1 and python 3.7.

Before this error there are outputs regarding the data(time,window,....), then there is this output multiple times : bilby INFO : Performing redundancy check using BBHPriorDict(self).test_redundancy , after this there are information about the priors like this one : bilby INFO : mass_1 = Uniform(minimum=1, maximum=2, name='mass_1', latex_label='$m1$', unit='$M{\odot}$', boundary=None) ,

then this appears : XLAL Error - XLALSimInspiralChooseFDWaveform: Non-zero transverse spins were given, but this is a non-precessing approximant. XLAL Error - XLALSimInspiralChooseFDWaveform (LALSimInspiral.c:1106): Invalid argument

and after this there are many lines of errors including the one above about the invalid pointer.

line 101, in conversion_function=None) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/core/sampler/init.py", line 145, in run_sampler kwargs) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/core/sampler/dynesty.py", line 99, in init kwargs) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/core/sampler/base_sampler.py", line 109, in init self._verify_parameters() File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/core/sampler/base_sampler.py", line 269, in _verify_parameters self.log_likelihood(theta) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/core/sampler/base_sampler.py", line 565, in log_likelihood return Sampler.log_likelihood(self, theta) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/core/sampler/base_sampler.py", line 373, in log_likelihood return self.likelihood.log_likelihood() File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/likelihood.py", line 496, in log_likelihood return self.log_likelihood_ratio() + self.noise_log_likelihood() File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/likelihood.py", line 219, in log_likelihood_ratio self.waveform_generator.frequency_domain_strain(self.parameters) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/waveform_generator.py", line 119, in frequency_domain_strain transformed_model_data_points=self.time_array) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/waveform_generator.py", line 158, in _calculate_strain model_strain = self._strain_from_model(model_data_points, model) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/waveform_generator.py", line 170, in _strain_from_model return model(model_data_points, self.parameters) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/source.py", line 128, in lal_binary_neutron_star phi_jl=phi_jl, lambda_1=lambda_1, lambda_2=lambda_2, waveform_kwargs) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/source.py", line 272, in _base_lal_cbc_fd_waveform waveform_dictionary, approximant) File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/utils.py", line 797, in lalsim_SimInspiralChooseFDWaveform waveform_dictionary, approximant) RuntimeError: Invalid argument Error in `python': double free or corruption (out): 0x000055bd2eab4cf0 ======= Backtrace: ========= /lib64/libc.so.6(+0x81609)[0x7fdd776d5609] /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/lal/../lalsuite.libs/liblal-436d9036.so.17.0.0(XLALDictEntryFree+0x1b)[0x7fdd4b0b46db] /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/lal/../lalsuite.libs/liblal-436d9036.so.17.0.0(XLALDestroyDict+0x2e)[0x7fdd4b0b48fe] /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/lal/_lal.cpython-37m-x86_64-linux-gnu.so(+0xb0aed)[0x7fdd4b83faed] /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/lal/_lal.cpython-37m-x86_64-linux-gnu.so(+0x1a9566)[0x7fdd4b938566] python(+0xfec08)[0x55bd2ad07c08] python(+0x1100f7)[0x55bd2ad190f7] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(+0x11010d)[0x55bd2ad1910d] python(PyDict_SetItem+0x4d2)[0x55bd2ad80792] python(PyDict_SetItemString+0x4f)[0x55bd2ad8123f] python(PyImport_Cleanup+0x9e)[0x55bd2adb827e] python(Py_FinalizeEx+0x67)[0x55bd2ae2b8a7] python(+0x23ac63)[0x55bd2ae43c63] python(_Py_UnixMain+0x3c)[0x55bd2ae43f7c] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7fdd77676495] python(+0x1e0122)[0x55bd2ade9122] ======= Memory map: ======== 55bd2ac09000-55bd2ac64000 r--p 00000000 00:2a 1660124862 /nfs/pic.es/user/c/ckaratha/miniconda3/bin/python3.7 55bd2ac64000-55bd2ae45000 r-xp 0005b000 00:2a 1660124862 /nfs/pic.es/user/c/ckaratha/miniconda3/bin/python3.7 55bd2ae45000-55bd2aeec000 r--p 0023c000 00:2a 1660124862 /nfs/pic.es/user/c/ckaratha/miniconda3/bin/python3.7 55bd2aeed000-55bd2aef0000 r--p 002e3000 00:2a 1660124862 /nfs/pic.es/user/c/ckaratha/miniconda3/bin/python3.7 55bd2aef0000-55bd2af59000 rw-p 002e6000 00:2a 1660124862 /nfs/pic.es/user/c/ckaratha/miniconda3/bin/python3.7 55bd2af59000-55bd2af7a000 rw-p 00000000 00:00 0 55bd2b31d000-55bd307c7000 rw-p 00000000 00:00 0 [heap] 7fdd38000000-7fdd38101000 rw-p 00000000 00:00 0 7fdd38101000-7fdd3c000000 ---p 00000000 00:00 0 7fdd3d2ca000-7fdd3d30b000 r-xp 00000000 00:2a 1660165133 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_optimal_leaf_ordering.cpython-37m-x86_64-linux-gnu.so 7fdd3d30b000-7fdd3d50a000 ---p 00041000 00:2a 1660165133 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_optimal_leaf_ordering.cpython-37m-x86_64-linux-gnu.so 7fdd3d50a000-7fdd3d50e000 rw-p 00040000 00:2a 1660165133 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_optimal_leaf_ordering.cpython-37m-x86_64-linux-gnu.so 7fdd3d50e000-7fdd3d50f000 rw-p 00000000 00:00 0 7fdd3d50f000-7fdd3d55d000 r-xp 00000000 00:2a 1660165135 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_hierarchy.cpython-37m-x86_64-linux-gnu.so 7fdd3d55d000-7fdd3d75c000 ---p 0004e000 00:2a 1660165135 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_hierarchy.cpython-37m-x86_64-linux-gnu.so 7fdd3d75c000-7fdd3d764000 rw-p 0004d000 00:2a 1660165135 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_hierarchy.cpython-37m-x86_64-linux-gnu.so 7fdd3d764000-7fdd3d765000 rw-p 00000000 00:00 0 7fdd3d765000-7fdd3d77a000 r-xp 00000000 00:2a 1660165131 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_vq.cpython-37m-x86_64-linux-gnu.so 7fdd3d77a000-7fdd3d97a000 ---p 00015000 00:2a 1660165131 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_vq.cpython-37m-x86_64-linux-gnu.so 7fdd3d97a000-7fdd3d97f000 rw-p 00015000 00:2a 1660165131 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/scipy/cluster/_vq.cpython-37m-x86_64-linux-gnu.so 7fdd3d97f000-7fdd3d9bf000 rw-p 00000000 00:00 0 7fdd3d9ff000-7fdd3da3f000 rw-p 00000000 00:00 0 7fdd3dbff000-7fdd3dc3f000 rw-p 00000000 00:00 0 7fdd3dcff000-7fdd3dd3f000 rw-p 00000000 00:00 0 7fdd3dd7f000-7fdd3ddbe000 r-xp 00000000 00:2a 1653223331 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/matplotlib/.libs/libpng16-cfdb1654.so.16.21.0 7fdd3ddbe000-7fdd3dfbd000 ---p 0003f000 00:2a 1653223331 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/matplotlib/.libs/libpng16-cfdb1654.so.16.21.0 7fdd3dfbd000-7fdd3dfbe000 rw-p 0003e000 00:2a 1653223331 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/matplotlib/.libs/libpng16-cfdb1654.so.16.21.0 7fdd3dfbe000-7fdd3dfc2000 rw-p 00040000 00:2a 1653223331 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/matplotlib/.libs/libpng16-cfdb1654.so.16.21.0 7fdd3dfc2000-7fdd3dfcb000 r-xp 00000000 00:2a 1656405567 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/matplotlib/_png.cpython-37m-x86_64-linux-gnu.so 7fdd3dfcb000-7fdd3e1ca000 ---p 00009000 00:2a 1656405567 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/matplotlib/_png.cpython-37m-x86_64-linux-gnu.so 7fdd3e1ca000-7fdd3e1cb000 rw-p 00008000 00:2a 1656405567 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/matplotlib/_png.cpython-37m-x86_64-linux-gnu.so 7fdd3e1cb000-7fdd3e1cd000 rw-p 0000a000 00:2a 1656405567 /nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/matplotlib/_png.cpython-37m-x86_64-linux-gnu.so 7fdd3e1cd000-7fdd3e1d2000 r-xp 00000000 fd:03 23368 /usr/lib64/libXfixes.so.3.1.0 7fdd3e1d2000-7fdd3e3d1000 ---p 00005000 fd:03 23368 /usr/lib64/libXfixes.so.3.1.0 7fdd3e3d1000-7fdd3e3d2000 r--p 00004000 fd:03 23368 /usr/lib64/libXfixes.so.3.1.0 7fdd3e3d2000-7fdd3e3d3000 rw-p 00005000 fd:03 23368 /usr/lib64/libXfixes.so.3.1.0 7fdd3e3d3000-7fdd3e3dc000 r-xp 00000000 fd:03 23366 /usr/lib64/libXrender.so.1.3.0Aborted

bilby-bot commented 5 years ago

In GitLab by @git.ligo:virginia.demilio on Jul 8, 2019, 17:25

Hi @git.ligo:christos.karathanasis, thank you for pointing out these errors. As @git.ligo:gregory.ashton said I had put together this script at the pe f2f in February (at the time bilby == 0.3.5), but bilby has been developed upon significantly since then so you'll have to take into account the changes to the spin (quickly looking at your error message you need to change to aligned spins prior as TaylorF2 is a non-precessing waveform). I'm happy to re-run the script and make the necessary changes after the Amaldi conference is over next week. Also, as a side note, I remember you were wondering about the settings used for duration, psd_offset and psd_duration: these values were tweaked in order to fetch the open data using gwpy, as gwosc was not able to find the event data unless the gps interval included the trigger time (I believe this issue was subsequently solved as you can see here). I hope this is helpful and feel free to contact me if you need further help :)

bilby-bot commented 5 years ago

In GitLab by @git.ligo:christos.karathanasis on Jul 10, 2019, 20:09

@git.ligo:gregory.ashton @git.ligo:virginia.demilio Yeah, indeed it was an error about spins and deformations in the waveform approximant. For the example to work you have to change the prior file to precescing_binary_neutron_star.prior and the waveform approximant to IMRPhenomPv2_NRTidal.

bilby-bot commented 5 years ago

In GitLab by @git.ligo:gregory.ashton on Jul 30, 2019, 02:11

@git.ligo:virginia.demilio would you be able to update the example when you get a moment?

bilby-bot commented 5 years ago

In GitLab by @git.ligo:virginia.demilio on Jul 30, 2019, 17:11

@git.ligo:gregory.ashton I've updated the example and made a GW170817.prior file for it. I'm currently running it to check the results are as expected. I'll send a WIP merge request in the mean time. Cheers!

bilby-bot commented 5 years ago

In GitLab by @git.ligo:gregory.ashton on Aug 20, 2019, 11:14

Closing as this was resolved by !570

bilby-bot commented 5 years ago

In GitLab by @git.ligo:gregory.ashton on Aug 20, 2019, 11:14

closed

bilby-bot commented 1 month ago

In GitLab by @git.ligo:michael.williams on Oct 3, 2024, 17:55

unassigned @git.ligo:virginia.demilio