PhenomHM segfault for unsupported modes through SimInspiralChooseTDWaveform
@lionel.london @sebastian-khan Similar to #359 (closed) for X(P)HM, PhenomHM also doesn't properly handle errors when unsupported modes are requested through the ModeArray interface, but only when called through the time domain wrappers:
- When called through SimInspiralChooseFDWaveform it exits with a clean error message.
- Through SimInspiralChooseTDWaveform it tries to throw the same errors, but then also a segfault.
Note that IMRPhenomPv3HM does not seem to have the same segfault.
With the test script from the other issue, changing the model name in L10, you should be able to reproduce the following behaviour:
lal: v7.0.0.1 from /home/dkeitel/bin/lalsuite-opt/lib/python3.7/site-packages/lal/__init__.py
lalsimulation: v2.2.0.1 from /home/dkeitel/bin/lalsuite-opt/lib/python3.7/site-packages/lalsimulation/__init__.py
approximant: IMRPhenomHM
Activating modes: [[2, 2], [8, 8]]
calling SimInspiralChooseFDWaveform...
XLAL Error - IMRPhenomHM_check_mode_array (LALSimIMRPhenomHM.c:127): (8,8) mode in ModeArray but model does not include this!
XLAL Error - IMRPhenomHM_check_mode_array (LALSimIMRPhenomHM.c:127): Internal function call failed
XLAL Error - XLALSimIMRPhenomHMGethlmModes (LALSimIMRPhenomHM.c:1211): IMRPhenomHM_check_mode_array failed
XLAL Error - XLALSimIMRPhenomHMGethlmModes (LALSimIMRPhenomHM.c:1211): Internal function call failed
XLAL Error - IMRPhenomHMCore (LALSimIMRPhenomHM.c:1040): XLALSimIMRPhenomHMGethlmModes failed
XLAL Error - IMRPhenomHMCore (LALSimIMRPhenomHM.c:1040): Internal function call failed
XLAL Error - XLALSimIMRPhenomHM (LALSimIMRPhenomHM.c:981): IMRPhenomHMCore failed in XLALSimIMRPhenomHM.
XLAL Error - XLALSimIMRPhenomHM (LALSimIMRPhenomHM.c:981): Internal function call failed
XLAL Error - XLALSimInspiralChooseFDWaveform (LALSimInspiral.c:1620): Internal function call failed
Traceback (most recent call last):
File "documents/LSC/reviews/PhenomX/test_IMRPhenomXHM_unsupported_modes.py", line 72, in <module>
approximant=eval("lalsimulation."+model)
RuntimeError: Internal function call failed
(ok)
lal: v7.0.0.1 from /home/dkeitel/bin/lalsuite-opt/lib/python3.7/site-packages/lal/__init__.py
lalsimulation: v2.2.0.1 from /home/dkeitel/bin/lalsuite-opt/lib/python3.7/site-packages/lalsimulation/__init__.py
approximant: IMRPhenomHM
Activating modes: [[2, 2], [8, 8]]
calling SimInspiralChooseTDWaveform...
XLAL Error - IMRPhenomHM_check_mode_array (LALSimIMRPhenomHM.c:127): (8,8) mode in ModeArray but model does not include this!
XLAL Error - IMRPhenomHM_check_mode_array (LALSimIMRPhenomHM.c:127): Internal function call failed
XLAL Error - XLALSimIMRPhenomHMGethlmModes (LALSimIMRPhenomHM.c:1211): IMRPhenomHM_check_mode_array failed
XLAL Error - XLALSimIMRPhenomHMGethlmModes (LALSimIMRPhenomHM.c:1211): Internal function call failed
XLAL Error - IMRPhenomHMCore (LALSimIMRPhenomHM.c:1040): XLALSimIMRPhenomHMGethlmModes failed
XLAL Error - IMRPhenomHMCore (LALSimIMRPhenomHM.c:1040): Internal function call failed
XLAL Error - XLALSimIMRPhenomHM (LALSimIMRPhenomHM.c:981): IMRPhenomHMCore failed in XLALSimIMRPhenomHM.
XLAL Error - XLALSimIMRPhenomHM (LALSimIMRPhenomHM.c:981): Internal function call failed
XLAL Error - XLALSimInspiralChooseFDWaveform (LALSimInspiral.c:1620): Internal function call failed
XLAL Error - XLALSimInspiralFD (LALSimInspiral.c:2864): Internal function call failed
XLAL Error - XLALSimInspiralTDFromFD (LALSimInspiral.c:2550): Internal function call failed
Segmentation fault
(not ok)