Worker-side logic tree processing triggered erroneously

Bug #962788 reported by Muharem Hrnjadovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
High
Muharem Hrnjadovic

Bug Description

[2012-03-22 16:08:58,122: ERROR/MainProcess] Task openquake.calculators.hazard.classical.core.compute_hazard_curve[73a46a12-78dc-4587-b27a-b5358b8b0c92] raised exception: UnpickleableExceptionWrapper('openquake.input.logictree', 'ParsingError', ("[Errno 2] No such file or directory: u'/home/muharem/failed-gemsun-job/asz_simple-0.3/ASZ_model_logic_tree.xml'",), 'ParsingError("[Errno 2] No such file or directory: u\'/home/muharem/failed-gemsun-job/asz_simple-0.3/ASZ_model_logic_tree.xml\'",)')
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/celery/execute/trace.py", line 47, in trace
    return cls(states.SUCCESS, retval=fun(*args, **kwargs))
  File "/usr/lib/pymodules/python2.7/celery/app/task/__init__.py", line 247, in __call__
    return self.run(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/celery/app/__init__.py", line 175, in run
    return fun(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openquake/java.py", line 332, in unwrap_exception
    return func(*targs, **tkwargs)
  File "/usr/lib/pymodules/python2.7/openquake/utils/stats.py", line 215, in wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openquake/calculators/hazard/classical/core.py", line 73, in compute_hazard_curve
    calculator = utils_tasks.calculator_for_task(job_id, 'hazard')
  File "/usr/lib/pymodules/python2.7/openquake/utils/tasks.py", line 163, in calculator_for_task
    calculator = CALCS[job_type][calc_mode](calc_proxy)
  File "/usr/lib/pymodules/python2.7/openquake/calculators/hazard/general.py", line 226, in __init__
    gmpe_lt)
  File "/usr/lib/pymodules/python2.7/openquake/input/logictree.py", line 990, in __init__
    basepath, source_model_logictree_path
  File "/usr/lib/pymodules/python2.7/openquake/input/logictree.py", line 606, in __init__
    super(SourceModelLogicTree, self).__init__(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openquake/input/logictree.py", line 373, in __init__
    filestream = self._open_file(self.filename)
  File "/usr/lib/pymodules/python2.7/openquake/input/logictree.py", line 407, in _open_file
    raise ParsingError(filename, self.basepath, str(exc))
ParsingError: ParsingError("[Errno 2] No such file or directory: u'/home/muharem/failed-gemsun-job/asz_simple-0.3/ASZ_model_logic_tree.xml'",)

Changed in openquake:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Muharem Hrnjadovic (al-maisan)
milestone: none → 0.6.1
tags: added: defect enduser-visible hazard mfcluster
Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :
Revision history for this message
Lars Butler (lars-butler) wrote :

Just for the record:

The issue is that there was some logic parsing occurring in the constructor of the Classical Hazard calculator class. Workers, however, also need to instantiate the calculator. For starters, having the logic tree in the constructor is redundant; it only needs to be done once per calculation. Additionally, remote worker nodes most likely wouldn't have access to the input logic tree XML files (except, perhaps, with the use of an NFS), which is what causes the above error to occur.

Changed in openquake:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.