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

Issue in ROQ FFT usage #755

Open bilby-bot opened 1 year ago

bilby-bot commented 1 year ago

In GitLab by @git.ligo:cjhaster on Aug 12, 2023, 03:52

When I evaluate ROQ weights, I get the following message

Exception ignored in: 'pyfftw.pyfftw._fftw_plan_with_nthreads_null'
Traceback (most recent call last):
  File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-20230615/lib/python3.10/site-packages/bilby/gw/likelihood/roq.py", line 806, in _set_weights_linear
    ifft = pyfftw.FFTW(ifft_input, ifft_output, direction='FFTW_BACKWARD')
RuntimeError: Undefined plan with nthreads. This is a bug

This is using the igwn-py310-20230615, which I think is largely equivalent to the environment used for our O4a production runs. The weights are still calculated, and the output looks ok, so this might be less of a problem than it looks to be :slight_smile:

bilby-bot commented 1 year ago

In GitLab by @git.ligo:cjhaster on Aug 12, 2023, 04:13

This seems to be a "known" issue with pyFFTW and how it's packaged/built, that is specifically noticable when using a conda version https://github.com/pyFFTW/pyFFTW/issues/294

So there might not be too much for us to do about it, unless we want to make our own pyFFTW builds, or revert to an earlier pyFFTW version as also suggested in https://github.com/bbfrederick/rapidtide/issues/79 where this was noticed

bilby-bot commented 1 year ago

In GitLab by @git.ligo:colm.talbot on Aug 21, 2023, 14:44

This has been a known issue for a while, I don't know exactly what happens when this message is printed but it doesn't impact anything so I've been ignoring it. I think there's a related computing issue, I'll try to dig it out later.

bilby-bot commented 7 months ago

In GitLab by @git.ligo:soichiro on Apr 8, 2024, 14:26

mentioned in issue pe/O4/o4a-rota#94

bilby-bot commented 7 months ago

In GitLab by @git.ligo:soichiro on Apr 8, 2024, 14:38

Sorry for the extremely late response on this. I just would like to comment that I am fine with getting back to numpy ifft, if pyfftw introduces complications in packaging etc. Numpy ifft is still fast enough (See https://git.ligo.org/lscsoft/bilby/-/merge_requests/903#note_215070) and it only affects a small part of the whole analysis. We also use multibanded bases for a long signal, which does not use ifft for weight computations.

bilby-bot commented 1 month ago

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

unassigned @git.ligo:soichiro.morisaki