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

Allow PyCBC Live to run with only one IFO provided #4669

Closed
maxtrevor opened this issue Mar 21, 2024 · 4 comments
Closed

Allow PyCBC Live to run with only one IFO provided #4669

maxtrevor opened this issue Mar 21, 2024 · 4 comments

Comments

@maxtrevor
Copy link
Contributor

Currently the PyCBC Live search requires at least two ifos that are able to be used for estimating significance (i.e. not set as skymap-only).
Attempting to run PyCBC Live while providing only a single ifo gives the following error:

Traceback (most recent call last):
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/site-packages/mpi4py/__main__.py", line 7, in <module>
    main()
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/site-packages/mpi4py/run.py", line 198, in main
    run_command_line(args)
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/site-packages/mpi4py/run.py", line 47, in run_command_line
    run_path(sys.argv[0], run_name='__main__')
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/runpy.py", line 288, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/pycbc.live/.conda/envs/o4-test-env/bin/pycbc_live", line 1182, in <module>
    coinc_pool = BroadcastPool(len(estimators))
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/site-packages/pycbc/pool.py", line 56, in __init__
    super(BroadcastPool, self).__init__(processes, noint, initargs, **kwds)
  File "/home/pycbc.live/.conda/envs/o4-test-env/lib/python3.9/multiprocessing/pool.py", line 205, in __init__
    raise ValueError("Number of processes must be at least 1")
ValueError: Number of processes must be at least 1

The error seems to happen because PyCBC Live attempts to form an MPI pool with 0 Coincer objects

@titodalcanton
Copy link
Contributor

I suppose the desired solution is to behave as if args.enable_background_estimation was False when only one detector is used for the search.

@titodalcanton
Copy link
Contributor

…though I am not sure it makes a lot of sense to use --enable-background-estimation and provide a single searching detector? Maybe the best thing to do is just error out and say that is not a valid operation mode.

@maxtrevor
Copy link
Contributor Author

Looking at this now, turning off --enable-background-estimation does what I want. I think this option could use a better name though, I would not have guessed thats what I needed to turn off to enable a single detector search. Maybe --enable-coincident-search ? and then I would agree that it should just error out if that option is given but only one ifo is given for significance..

@GarethCabournDavies
Copy link
Contributor

Should we close this issue, or assign someone to rename the option?

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

No branches or pull requests

3 participants