-
Notifications
You must be signed in to change notification settings - Fork 24
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
Enhance Grid-Stat to use OpenMP for efficient computation of neighborhood statistics by setting $OMP_NUM_THREADS #1926
Labels
component: code optimization
Code optimization issue
MET: Grid-to-Grid Verification
requestor: UK Met Office
United Kingdom Met Office
type: new feature
Make it do something new
Milestone
Comments
mo-mglover
added
alert: NEED ACCOUNT KEY
Need to assign an account key to this issue
alert: NEED MORE DEFINITION
Not yet actionable, additional definition required
alert: NEED CYCLE ASSIGNMENT
Need to assign to a release development cycle
type: new feature
Make it do something new
labels
Sep 28, 2021
JohnHalleyGotway
added
component: code optimization
Code optimization issue
MET: Grid-to-Grid Verification
priority: high
requestor: UK Met Office
United Kingdom Met Office
and removed
alert: NEED MORE DEFINITION
Not yet actionable, additional definition required
alert: NEED CYCLE ASSIGNMENT
Need to assign to a release development cycle
labels
Nov 15, 2021
Updated the scaling test slides with later results (last couple of slides). New results based off v10.1.0-beta4. |
12 tasks
JohnHalleyGotway
added a commit
that referenced
this issue
Nov 22, 2021
…_DEVELOPMENT to being like GRIB2, with --enable-grib2."
JohnHalleyGotway
added a commit
that referenced
this issue
Nov 22, 2021
…laceholder for --enable-openmp so that running make test works.
JohnHalleyGotway
added a commit
that referenced
this issue
Nov 22, 2021
…with exiting WITH_GRIB2 and WITH_PYTHON compiler directives.
JohnHalleyGotway
added a commit
that referenced
this issue
Nov 22, 2021
… files after -lgslcblas. I had to link to -lgomp to get this to compile on my Mac. Presumably, that's what's needed for GNU.
mo-mglover
pushed a commit
that referenced
this issue
Nov 26, 2021
…_DEVELOPMENT to being like GRIB2, with --enable-grib2."
mo-mglover
pushed a commit
that referenced
this issue
Nov 26, 2021
…laceholder for --enable-openmp so that running make test works.
mo-mglover
added a commit
that referenced
this issue
Nov 30, 2021
Co-authored-by: johnhg <johnhg@ucar.edu>
mo-mglover
added a commit
that referenced
this issue
Nov 30, 2021
JohnHalleyGotway
added a commit
that referenced
this issue
Dec 2, 2021
…d produce the same result as the previous test named grid_stat_GRIB2_NAM_RTMA.
JohnHalleyGotway
added a commit
that referenced
this issue
Dec 2, 2021
…s seems like a pretty obvious typo that was causing a warning message to be written to the log file. While this will change the unit test results, I'm confident it was the original intention of this Grid-Stat configuration.
@mo-mglover I'm reading about the AC_OPENMP macro for Autoconf at this location. Seems like we should leverage this existing macro in configure.ac rather than a doing it in a custom way. FYI, I'm investigating this now. |
JohnHalleyGotway
added a commit
that referenced
this issue
Dec 3, 2021
JohnHalleyGotway
added a commit
that referenced
this issue
Dec 3, 2021
…calling the AC_OPENMP() macro. And that macro compile WITH openmp support by default. It can be disabled using --disable-openmp.
JohnHalleyGotway
added a commit
that referenced
this issue
Dec 3, 2021
… scripts are no longer needed to enable make test to run.
JohnHalleyGotway
added a commit
that referenced
this issue
Dec 3, 2021
…ch the docs from explaining --enable-openmp to --disable-openmp.
mo-mglover
added a commit
that referenced
this issue
Dec 6, 2021
mo-mglover
added a commit
that referenced
this issue
Dec 6, 2021
TaraJensen
removed
the
alert: NEED ACCOUNT KEY
Need to assign an account key to this issue
label
Dec 16, 2021
21 tasks
mo-mglover
added a commit
that referenced
this issue
Dec 16, 2021
JohnHalleyGotway
changed the title
OpenMP in GridStat
Add OpenMP for efficient computation of neighborhood statistics in GridStat by setting OMP_NUM_THREADS
Jan 15, 2022
JohnHalleyGotway
changed the title
Add OpenMP for efficient computation of neighborhood statistics in GridStat by setting OMP_NUM_THREADS
Enhance GridStat to use OpenMP for efficient computation of neighborhood statistics by settings OMP_NUM_THREADS
Jan 15, 2022
JohnHalleyGotway
changed the title
Enhance GridStat to use OpenMP for efficient computation of neighborhood statistics by settings OMP_NUM_THREADS
Enhance GridStat to use OpenMP for efficient computation of neighborhood statistics by setting $OMP_NUM_THREADS
Jan 15, 2022
12 tasks
JohnHalleyGotway
changed the title
Enhance GridStat to use OpenMP for efficient computation of neighborhood statistics by setting $OMP_NUM_THREADS
Enhance Grid-Stat to use OpenMP for efficient computation of neighborhood statistics by setting $OMP_NUM_THREADS
Mar 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: code optimization
Code optimization issue
MET: Grid-to-Grid Verification
requestor: UK Met Office
United Kingdom Met Office
type: new feature
Make it do something new
Describe the New Feature
OpenMP provides a simple way of adding shared-memory (on-node) parallelism to serial code. It can be added incrementally, and can provide quick wins when a code has a few dominant hotspots.
The
fractional_coverage
routine indata_plane_util.cc
contains a loop-nest representing one such hotspot. We aim to parallelize this loop with OpenMP. This would distribute loop iterations across multiple cores and pull down the overall time spent in GridStat.OMP is directive-based. The directives begin with the comment character (
!
) and hence are ignored by the compiler if OpenMP support is not requested. To instruct the compiler to interpret OMP directives, an additional flag is normally required. This varies between compilers. Withgfortran
the flag is-fopenmp
.The number of threads can be controlled programmatically. However, it is sufficient to set environment variable
OMP_NUM_THREADS
at runtime.Acceptance Testing
List input data types and sources.
The code should give identical answers with 1 vs. 2+ threads. A 1-thread vs. 2-thread result comparison would be needed. Small differences can sometimes appear with/without OpenMP compiled in (even with 1 thread only) because serially optimising compilers sometimes make different choices when the OpenMP flag is present. I don't think that's a reason to omit an OpenMP vs. no-OpenMP test, though; just something to be aware of. It is certainly possible to introduce bugs with OpenMP and only one thread, so OMP/no-OMP tests would be wise.
Time Estimate
Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.
Sub-Issues
Consider breaking the new feature down into sub-issues.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
2799991
Define the Metadata
Assignee
Labels
Projects and Milestone
Define Related Issue(s)
Consider the impact to the other METplus components.
New Feature Checklist
See the METplus Workflow for details.
Branch name:
feature_<Issue Number>_<Description>
Pull request:
feature <Issue Number> <Description>
Select: Reviewer(s) and Linked issues
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version
The text was updated successfully, but these errors were encountered: