-
Notifications
You must be signed in to change notification settings - Fork 49
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
Issue using Matplotlib with X-server #62
Comments
coleramos425
added
bug
Something isn't working
Roofline
Related to Omniperf's Roofline Analysis
labels
Jan 5, 2023
coleramos425
changed the title
Issue using --roof-only flag with X-server
Issue using Matplotlib with X-server
Jan 5, 2023
import matplotlib
try:
import matplotlib.pyplot as plt
except ImportError:
# other non-interactive options:
# cairo, pdf, pgf, ps, svg, template
matplotlib.use("agg", force=True)
import matplotlib.pyplot as plt
|
The benefit of the above approach is that different backends produce different quality plots and pyplot usually tries to set the best one. This way, you don't lose that while still allowing the user can set the "MPLBACKEND" environment variable to select the one they want. But the try-except should handle your error |
coleramos425
added a commit
that referenced
this issue
Jan 17, 2023
Signed-off-by: colramos425 <colramos@amd.com>
coleramos425
added a commit
that referenced
this issue
Jan 17, 2023
Signed-off-by: colramos425 <colramos@amd.com>
Thanks for the suggestion @jrmadsen. Added this to dev branch. |
Merged
feizheng10
pushed a commit
to feizheng10/omniperf
that referenced
this issue
Dec 6, 2023
Signed-off-by: colramos425 <colramos@amd.com> Signed-off-by: fei.zheng <fei.zheng@amd.com>
feizheng10
pushed a commit
to feizheng10/omniperf
that referenced
this issue
Dec 6, 2023
Signed-off-by: colramos425 <colramos@amd.com> Signed-off-by: fei.zheng <fei.zheng@amd.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This seems to be an issue that only occurs when you are connected via ssh to a system that has an X-server running.
https://github.com/AMDResearch/omniperf/blob/796c495d0b41bb63f62220278bd4fdca323a463b/src/utils/plot_roofline.py#L31
The reason being that when an X-server is running, matplotlib, by default, tries to connect but can't and so he throws fatal exceptions.
Suggested Fix
the
use('Agg')
call sets matplotlib to use the non-interactive backend that can only write to files. This is apparently required if you happen to run omniperf on a system with X running.CC: @keithloweryamd
The text was updated successfully, but these errors were encountered: