-
Notifications
You must be signed in to change notification settings - Fork 224
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
Benchmark grdsample, grdfilter and sph2grd with fixed cores #2945
Conversation
CodSpeed Performance ReportMerging #2945 will not alter performanceFalling back to comparing Summary
|
pygmt/tests/test_grdimage.py
Outdated
fig_ref.grdimage( | ||
grid="@earth_relief_01d_g", region="GL", cmap="geo", shading=xrgrid | ||
grid="@earth_relief_01d_g", region="GL", cmap="geo", shading=xrgrid, cores=2 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is raising an error at https://github.com/GenericMappingTools/pygmt/actions/runs/7404780202/job/20146784435?pr=2945#step:8:778:
E pygmt.exceptions.GMTCLibError: Module 'grdimage' failed with status code 72:
Error: grdimage [ERROR]: Option -x given more than once
Error: grdimage [ERROR]: Option -x parsing failure. Correct syntax:
Error: grdimage [ERROR]: Offending option -x2
Equivalent GMT CLI command also fails (both on GMT 6.4.0 and GMT 6.5.0.dev9+0776994):
gmt grdimage @earth_relief_01d_g -RGL -Cgeo -x2 -png map
grdimage [ERROR]: Option -x given more than once
grdimage [ERROR]: Option -x parsing failure. Correct syntax:
[-x[[-]<n>]] .
Limit the number of cores used in multi-threaded algorithms [Default uses all 16 cores]. If <n> is negative then we select (16 - <n>) cores (or at least 1).
grdimage [ERROR]: Offending option -x2
Might be an upstream GMT bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very likely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, reported upstream at GenericMappingTools/gmt#8256. I've reverted the grdimage
commit at 08f36d2 for now.
This reverts commit 56b47f2.
This reverts commit 56d50be.
Description of proposed changes
Benchmarking OpenMP multi-threaded algorithms with a fixed number of CPU cores, to ensure consistency of benchmarks.
Using a fixed core count of 2, which is the maximum number of CPU cores for GitHub Actions' Linux runners - https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
TODO:
Fixes #2942
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version