llnl / llnl/prorad

Headless plotting?

Open
#1 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Headless plotting is not implemented; currently requires X11 forwarding if running on a server.

```
Traceback

(most recent call last):
File "prorad.py", line 734, in
main()
File "prorad.py", line 78, in main
plot_results(grid, film_x, film_y, Ep, traces, plot_fluence=True, plot_traces=True, plot_quiver=False, save_images=True)
File "prorad.py", line 665, in plot_results
fig = plt.figure(2,figsize=(8,8))
File "/software/python-2.7.12-el7-x86_64/lib/python2.7/site-packages/matplotlib/pyplot.py", line 535, in figure
**kwargs)
File "/software/python-2.7.12-el7-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 81, in new_figure_manager
return new_figure_manager_given_figure(num, figure)
File "/software/python-2.7.12-el7-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 89, in new_figure_manager_given_figure
window = Tk.Tk()
File "/software/python-2.7.12-el7-x86_64/lib/python2.7/lib-tk/Tkinter.py", line 1815, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display "localhost:16.0"
```
This could be corrected using the matplotlib 'Agg' plotter, which would also suppress GUI popups. I'll see about pushing a change.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in prorad.py at plot_results, especially the plt.figure call around line 665, and review how matplotlib selects its backend. Configure the Agg plotter for headless execution, then verify that plotting completes on a server without X11 forwarding or GUI popups.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.