gwastro / pycbc

Core package to analyze gravitational-wave data, find signals, and study their parameters. This package was used in the first direct detection of gravitational waves (GW150914), and is used in the ongoing analysis of LIGO/Virgo data.
http://pycbc.org
GNU General Public License v3.0
314 stars 348 forks source link

Improve and expand the help argarse code of pycbc_multi_inspiral #4553

Open sebastiangomezlopez opened 11 months ago

sebastiangomezlopez commented 11 months ago

I'm opening this new issue because:

  1. The pycbc_multi_inspiral executable is currently lacking a more thorough explanation of several argaparse arguments related to the chi-squared statistic, in particular around this line of code. There are no "help" kwargs

  2. Moreover, it would be nice to add several argparse.add_argument, for several fftw options that we'd like to take a look into from the performance side, so that the following flagged options become usable in the future:

--fft-measure-level -> (int [0,1,2,3]) --fftw-import-system_wisdom -> (flag) --fftw-input-float-wisdom-file -> (str) --fftw-input-double-wisdom-file -> (str) --fftw-threads-backend -> (str ['openmp','pthreads', 'unthreaded'])

  1. Finally, we'd like to include a new argparse argument for the processing scheme used in the context manager of the matched filtering engine. It was used as well in previous versions of the GW170817 run.sh example, but for some reason it was removed. Something like

argparse.add_argument("--processing-scheme", help=help = " takes as input the processing method " " as name:N. Where name can be either" " mkl or cpu, and N is the number of threads" " It can be set to cuda for GPU processing")

Since we are exploring the performance of mkl with multiple threads and plan to take a look into GPU stuff in the future, it'd be nice if the help string of processing scheme described how one can select cpu, mkl and cuda, as well as the syntax for selecting multiple threads when using cpu or mkl.

titodalcanton commented 11 months ago

Hi @sebastiangomezlopez, pycbc_multi_inspiral already includes the FFT and processing scheme CLI options you mention. You can verify this using the --help option. You will not see those options explicitly added in the pycbc_multi_inspiral executable script, because they are added by module-specific functions, specifically scheme.insert_processing_option_group(parser) and fft.insert_fft_option_group(parser).

Your other point about the help strings is valid though.