ReactionMechanismGenerator / RMG-Py

Python version of the amazing Reaction Mechanism Generator (RMG).
http://reactionmechanismgenerator.github.io/RMG-Py/
Other
397 stars 228 forks source link

generateTree.py script causes RuntimeError: dictionary changed size during iteration #1868

Closed rwest closed 1 year ago

rwest commented 4 years ago

Bug Description

$ cd scripts scripts
$ python generateTree.py R_Recombination 6

Starts off like this

WARNING:root:No kyotocabinet available
Loading thermodynamics library from Klippenstein_Glarborg2016.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from BurkeH2O2.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from thermo_DFT_CCSDTF12_BAC.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from DFT_QCI_thermo.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from primaryThermoLibrary.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from primaryNS.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from NitrogenCurran.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from NOx2018.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from FFCM1(-).py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from SulfurLibrary.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from SulfurGlarborgH2S.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics library from SABIC_aromatics.py in /Users/rwest/Code/RMG-database/input/thermo/libraries...
Loading thermodynamics group database from /Users/rwest/Code/RMG-database/input/thermo/groups...
Loading transport group database from /Users/rwest/Code/RMG-database/input/transport/groups...
Loading frequencies group database from /Users/rwest/Code/RMG-database/input/statmech/groups...
Loading Platts additivity group database from /Users/rwest/Code/RMG-database/input/solvation/groups...
Traceback (most recent call last):
  File "generateTree.py", line 100, in <module>
    main()
  File "generateTree.py", line 87, in main
    family.generate_tree(thermo_database=database.thermo, nprocs=min(4, nprocs))
  File "/Users/rwest/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 3143, in generate_tree
    min_splitable_entry_num=min_splitable_entry_num, min_rxns_to_spawn=min_rxns_to_spawn)
  File "/Users/rwest/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 3281, in make_tree_nodes
    for label in template_rxn_map.keys():
RuntimeError: dictionary changed size during iteration

It then displays nothing more until I hit ^C then

^CError in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/popen_fork.py", line 28, in poll
Process Process-1:1:
Process Process-1:
    pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt
Traceback (most recent call last):
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/rwest/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 4352, in _child_make_tree_nodes
    min_splitable_entry_num=min_splitable_entry_num, min_rxns_to_spawn=min_rxns_to_spawn)
  File "/Users/rwest/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 3281, in make_tree_nodes
    for label in template_rxn_map.keys():
RuntimeError: dictionary changed size during iteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/process.py", line 300, in _bootstrap
    util._exit_function()
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/util.py", line 322, in _exit_function
    p.join()
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/process.py", line 140, in join
    res = self._popen.wait(timeout)
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/popen_fork.py", line 48, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/popen_fork.py", line 28, in poll
    pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt
Traceback (most recent call last):
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/rwest/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 4354, in _child_make_tree_nodes
    child_conn.send(list(family.groups.entries.values()))
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/connection.py", line 398, in _send_bytes
    self._send(buf)
  File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
KeyboardInterrupt

How To Reproduce

$ cd scripts scripts
$ python generateTree.py R_Recombination 6

Installation Information

Describe your installation method and system information.

github-actions[bot] commented 1 year ago

This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.