Fix UnboundLocalError in lalinference_pipe_utils
Description
This MR addresses an UnboundLocalError
emitted by lalinference_pipe
:
$ lalinference_pipe --run-path example_nest --injections lalinference/test/injection_standard.xml --daglog-path daglog example_nest.ini
/home/duncan/opt/mambaforge/envs/py310/bin/lalinference_pipe:215: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in Python 3.12. Use ConfigParser directly instead.
cp=configparser.SafeConfigParser()
/home/duncan/opt/mambaforge/envs/py310/bin/lalinference_pipe:218: DeprecationWarning: This method will be removed in Python 3.12. Use 'parser.read_file()' instead.
cp.readfp(fp)
Only 0-th event in the XML table will be considered while running with ROQ
ROQ has bounds in chirp mass and mass-ratio
Prior in Mchirp will be [12.299703, 45.0] to contain the trigger Mchirp 26.11652.
Generating LALInference DAG in /home/duncan/git/lalsuite/example_nest/4s
Traceback (most recent call last):
File "/home/duncan/opt/mambaforge/envs/py310/bin/lalinference_pipe", line 482, in <module>
dag=pipe_utils.LALInferencePipelineDAG(this_cp)
File "/home/duncan/opt/mambaforge/envs/py310/lib/python3.10/site-packages/lalinference/lalinference_pipe_utils.py", line 782, in __init__
self.computeroqweights_job = ROMJob(self.config,os.path.join(self.basepath,'computeroqweights.sub'),self.logpath)
File "/home/duncan/opt/mambaforge/envs/py310/lib/python3.10/site-packages/lalinference/lalinference_pipe_utils.py", line 3356, in __init__
self.add_condor_cmd('request_memory', str(required_memory))
UnboundLocalError: local variable 'required_memory' referenced before assignment
API Changes and Justification
Backwards Compatible Changes
-
This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions -
This change adds new classes/functions/structs/types to a public C header file or Python module
Backwards Incompatible Changes
-
This change modifies an existing class/function/struct/type definition in a public C header file or Python module -
This change removes an existing class/function/struct/type from a public C header file or Python module
If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.
Review Status
Please provide details on any reviews related to this change and and the associated reviewers.