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

UnboundLocalError: local variable 'output_data' referenced before assignment #176

Closed
trevorgokey opened this issue Nov 17, 2019 · 1 comment
Labels
Bug Something isn't working

Comments

@trevorgokey
Copy link

Describe the bug
Running jobs with qcfractal-manager, and came across this "failed" job:

[W 191116 19:55:18 managers:586] Job 369024 failed: unknown_error - Msg: QCEngine Execution Error:
    Traceback (most recent call last):
      File "/export/home/tgokey/opt/lib/python3.7/site-packages/qcengine-0.12.0-py3.7.egg/qcengine/util.py", line 74, in compute_wrapper
        yield metadata
      File "/export/home/tgokey/opt/lib/python3.7/site-packages/qcengine-0.12.0-py3.7.egg/qcengine/compute.py", line 86, in compute
        output_data = executor.compute(input_data, config)
      File "/export/home/tgokey/opt/lib/python3.7/site-packages/qcengine-0.12.0-py3.7.egg/qcengine/programs/psi4.py", line 134, in compute
        output_data["schema_name"] = "qcschema_output"
    UnboundLocalError: local variable 'output_data' referenced before assignment

There isn't anything else in the log regarding this job.

To Reproduce
Just spun up a manager... this is the failed job:

[D 191116 01:48:49 base_adapter:153] Submitted Task:
    {'id': '369024', 'spec': {'function': 'qcengine.compute', 'args': [{'molecule': {'symbols': ['C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'N', 'N', 'N', 'O', 'O', 'H', 'H', 'H', '
H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H'], 'geometry': [0.57426417, -1.76307953, -1.16386869, -1.47978368, -2.24619508, -2.75941109, 2.74413569, -3.24931665, -1.34716956, -1.33181318, -4.20770247, -4.5
1471714, 13.32191332, -8.35663934, -12.83410606, 11.44467574, -8.78436772, -11.03868877, 8.23420593, -6.55351199, -13.53594165, 2.90643258, -5.22572166, -3.10567323, 0.84445409, -5.70346844, -4.7099867, 12.65282185, -7.0102777, 
-15.00519621, 8.93197759, -7.90773264, -11.3598525, 10.15762671, -6.16505774, -15.27477129, 12.43132868, -5.06715346, -18.53910154, 4.67927175, -7.92177835, -9.23975043, 5.29529728, -6.8051532, -3.28146083, 0.9106814, -7.8429122
4, -6.62874052, 4.78079419, -9.28500297, -4.67875428, 12.84651209, -3.85373275, -21.03942941, 14.04207412, -6.26749508, -17.13523185, 3.46901028, -8.79729428, -7.06684771, 7.2380414, -8.46174168, -9.37478738, 3.53211844, -6.8187
0128, -10.93700297, 10.00778802, -4.91063299, -17.55305051, 0.48296456, -0.23916519, 0.21021945, -3.1766797, -1.09487934, -2.64203791, 4.34180367, -2.87932082, -0.1054238, -2.91940231, -4.57621612, -5.76946934, 15.23438845, -9.0
449066, -12.55556938, 11.91887755, -9.82707218, -9.3304528, 6.32496233, -5.88249497, -13.80579222, 6.76321643, -5.74408794, -4.29250307, 6.03371138, -7.19630468, -1.3859967, -0.26204768, -9.4189406, -5.96004396, 0.15060304, -7.2
1422316, -8.43483111, 6.5075239, -10.38278599, -4.9578624, 3.53561928, -10.48988482, -3.54591095, 11.61663072, -4.69734817, -22.47359554, 12.41252019, -1.83262451, -20.95148419, 14.81484793, -4.10679705, -21.59280923, 7.99605943
, -9.50891788, -7.97487656], 'masses': [12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 14.00307400443, 14.00307400443, 14.00307400443, 15.99491461957, 15.99491461957, 
1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.00782503223, 1.0
0782503223, 1.00782503223], 'real': [True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True,
 True, True, True, True, True, True, True, True], 'fragments': [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]], 'fragment_c
harges': [0.0], 'fragment_multiplicities': [1], 'schema_name': 'qcschema_molecule', 'schema_version': 2, 'name': 'C18H17N3O2', 'identifiers': {'molecule_hash': '56efe06472ee562b18994fa4b6334ff553f9dd23', 'molecular_formula': 'C1
8H17N3O2'}, 'comment': None, 'molecular_charge': 0.0, 'molecular_multiplicity': 1, 'atom_labels': ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '
', '', '', '', '', '', '', ''], 'atomic_numbers': [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 'mass_numbers': [12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 16, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 'connectivity': [[0, 1, 1.0], [0, 2, 2.0], [0, 23, 1.0], [1, 3, 2.0], [1, 24, 1.0], [2, 7, 1.0], [2, 25, 1.0], [3, 8, 1.0],
 [3, 26, 1.0], [4, 5, 2.0], [4, 9, 1.0], [4, 27, 1.0], [5, 10, 1.0], [5, 28, 1.0], [6, 10, 2.0], [6, 11, 1.0], [6, 29, 1.0], [7, 8, 2.0], [7, 14, 1.0], [8, 15, 1.0], [9, 11, 2.0], [9, 18, 1.0], [10, 20, 1.0], [11, 22, 1.0], [12,
 17, 1.0], [12, 18, 2.0], [12, 22, 1.0], [13, 19, 1.0], [13, 20, 1.0], [13, 21, 2.0], [14, 16, 1.0], [14, 30, 1.0], [14, 31, 1.0], [15, 19, 1.0], [15, 32, 1.0], [15, 33, 1.0], [16, 19, 1.0], [16, 34, 1.0], [16, 35, 1.0], [17, 36
, 1.0], [17, 37, 1.0], [17, 38, 1.0], [20, 39, 1.0]], 'fix_com': True, 'fix_orientation': True, 'fix_symmetry': None, 'provenance': {'creator': 'QCElemental', 'version': 'v0.5.0', 'routine': 'qcelemental.molparse.from_schema'}, 
'id': '2847582', 'extras': None}, 'driver': 'hessian', 'model': {'method': 'b3lyp-d3bj', 'basis': 'dzvp'}, 'id': None, 'schema_name': 'qcschema_input', 'schema_version': 1, 'keywords': {'maxiter': 200, 'scf_properties': ['dipole
', 'quadrupole', 'wiberg_lowdin_indices', 'mayer_indices']}, 'extras': {'_qcfractal_tags': {'program': 'psi4', 'keywords': '2'}}, 'provenance': {'creator': 'QCElemental', 'version': 'v0.5.0', 'routine': 'qcelemental.models.resul
ts'}}, 'psi4'], 'kwargs': {'local_options': {'memory': 32.0, 'ncores': 16, 'scratch_directory': '/dev/shm', 'retries': 2}}}, 'parser': 'single', 'status': 'RUNNING', 'program': 'psi4', 'procedure': None, 'manager': 'OpenFF_Moble
y_HPC-gplogin2.gp.local-9a1f67ec-e1d2-40f6-88b4-50b87a37a760', 'priority': 0, 'tag': 'openff', 'base_result': {'ref': 'result', 'id': '4227774'}, 'error': None, 'modified_on': '2019-11-16T09:48:49.770283', 'created_on': '2019-08
-07T23:42:40.267434'

Additional context
Been running for ~24 hours, with 40 jobs completed no problem. This is the only job to do this. Using v0.12.0.

@dgasmith
Copy link
Collaborator

Thank you for the report. We recently reworked this and didn't anticipate a code execution path.

This is definitely a failed task so no real harm, but we did loose the real error message.

@dgasmith dgasmith added the Bug Something isn't working label Dec 10, 2019
muammar added a commit to muammar/QCEngine that referenced this issue Dec 11, 2019
* master: (21 commits)
  Docs: Changelog 0.13.0 extension
  Psi4: Ensures output data for psi4, fixes MolSSI#176
  Docs: Adds v0.13.0 changelog
  Lint: Fixes GHA routine
  Testing: Canonicalizes from testing, closes MolSSI#193
  Lint: Adds a GHA action to check for Black
  GitHub: Updates tempaltes to QCArchive standard
  Lint: Blackens code base
  Addresses MolSSI#186
  Improved MPI support
  Clarified documentation
  Improved documentation and type checking for node configuration
  Added ability to forward output from popen
  Documentation for configs needed for node-parallel tasks
  Removed unused import
  Bug fix: Use integer division not floating point
  Read from both stderr and stdout to prevent buffer deadlock
  Bug fix: Memory is per MPI rank
  Bug fix: Missing task configuration when making mpi command
  Improved warnings for when multi-node jobs are misconfigured
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants