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

[Bug]: Crash when trying to draw a big circuit #352

Open
A-bnk opened this issue Jan 8, 2025 · 0 comments
Open

[Bug]: Crash when trying to draw a big circuit #352

A-bnk opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@A-bnk
Copy link

A-bnk commented Jan 8, 2025

liionpack Version

0.3.12

Python Version

3.10.12

Describe the bug

Hello, when invoking the draw_circuit method using a 3p96s battery pack, the script terminates with a runtime error

Traceback (most recent call last):
  File "/home/bnk/bat_models/pyBamm/circuit.py", line 28, in <module>
    lp.draw_circuit(net2, cpt_size=1.0, dpi=300, node_spacing=2.5)
  File "/home/bnk/.local/lib/python3.10/site-packages/liionpack/plots.py", line 144, in draw_circuit
    cct.draw(**kwargs)
  File "/home/bnk/.local/lib/python3.10/site-packages/lcapy/netlistmixin.py", line 839, in draw
    return cct.sch.draw(filename=filename, **kwargs)
  File "/home/bnk/.local/lib/python3.10/site-packages/lcapy/schematic.py", line 671, in draw
    self.tikz_draw(filename=filename,
  File "/home/bnk/.local/lib/python3.10/site-packages/lcapy/schematic.py", line 510, in tikz_draw
    raise RuntimeError('Could not generate %s with pdflatex' %
RuntimeError: Could not generate /tmp/tmpjsf1dcnr.pdf with pdflatex

Playing around witht the parameters like reducing dpi makes the script take a bit longer before terminating, which leds me to believe its probably a memory issue. I am currently using liionpack on Ubuntu 22.04 (WSL) if that makes a difference. My Host-PC has 32GB RAM, the WSL instance gets 16 GB, which should have been enough. Many thanks!

Steps to Reproduce

No response

Expected behaviour

No response

Relevant log output

Additional context

No response

@A-bnk A-bnk added the bug Something isn't working label Jan 8, 2025
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

1 participant