ReactionMechanismGenerator / ReactionMechanismGenerator/RMG-Py

yaml writer slows down execution

Open
#2,499 10 comments 0 reactions 1 assignee View on GitHub

@ChrisBNEU is already working on this.

Since Jul 26, 2023.

  • #2508 by @ChrisBNEU — closed without merging
bug
Dominant language
Python
Stars
530
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
8

Description

Bug Description

It appears that the yaml writer uses a lot of overhead during the execution of an rmg run. I ran a modified ethane pyrolysis input file with cProfile. The only thing I changed in rmg was I did not write a yaml file for rms every execution. I did that by commenting out this line in main.py:

self.attach(RMSWriter(self.output_directory))

the difference in execution times were:

  • with RMSWriter listener: 15 min 15 sec
  • without RMSWriter listener: 7min 35 sec

I attached the profiles and the rmg logs below. It is possible this becomes insignificant at longer execution times, I have not tried it. The Profiler graph shows it executing every time the model is enlarged, so it is also possible it gets worse with larger mechanisms.

How To Reproduce

Comment out the line specified above, then run the profiler on the input file I attached below (python-jl rmg.py -p input.py)

Installation Information

Describe your installation method and system information.

  • macOS 10.15.7
  • Installed from source via conda
  • RMG version information:
    • RMG-Py: 3.0.0-1437-gef83a1c0e
    • RMG-database: 3.1.0-616-g75fabcb6c
Additional Context

input file used:
input.py.zip

profiles:
profile_with_listener.pdf
profile_without_listener.pdf

rmg logs:
with_listener.log
without_listener.log

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.