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

Support setting the OMP_NUM_THREADS environment variable. #1320

Closed
21 tasks
JohnHalleyGotway opened this issue Dec 16, 2021 · 1 comment · Fixed by #1338
Closed
21 tasks

Support setting the OMP_NUM_THREADS environment variable. #1320

JohnHalleyGotway opened this issue Dec 16, 2021 · 1 comment · Fixed by #1338
Assignees
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue METplus: Configuration priority: high High Priority requestor: UK Met Office United Kingdom Met Office required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project type: new feature Make it do something new
Milestone

Comments

@JohnHalleyGotway
Copy link
Collaborator

Describe the New Feature

MET issue dtcenter/MET#1926 and corresponding PR dtcenter/MET#1977 adds an initial level of OpenMP support to MET for the met-10.1.0_beta5 development release. The initial implementation applies only to the computation of the fractional coverage fields computed by Ensemble-Stat and Gen-Ens-Prod. However, this support will be expanded in future versions.

The OMP_NUM_THREADS environment variable defines the number of threads to be used by OpenMP. If left unset, a single thread is used by default. Recommend adding a new METplus configuration option to define the number of threads the used. The functionality for this is very simple. Just take the setting from the [config] section and use it set the OMP_NUM_THREADS environment variable prior to running the MET tools.

One question is what name to use for the [config] section entry.

  • Calling it OMP_NUM_THREADS would be very clear and consistent with the environment variable. However, differentiating between the OMP_NUM_THREADS config option and the environment variable of the same name could cause confusion.
  • Calling it METPLUS_NUM_THREADS or MET_NUM_THREADS would avoid that confusion, but perhaps cause other types of confusion?

Acceptance Testing

List input data types and sources.
Describe tests required for new functionality.

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.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

New Feature Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Linked issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added priority: high High Priority type: new feature Make it do something new alert: NEED ACCOUNT KEY Need to assign an account key to this issue requestor: UK Met Office United Kingdom Met Office required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project METplus: Configuration labels Dec 16, 2021
@georgemccabe
Copy link
Collaborator

In the default METplus config file, there is a variable called TMP_DIR which sets the MET_TMP_DIR environment variable. If MET_TMP_DIR is already set in the user's environment, then that value will be used instead. We would likely want to implement the same behavior for this variable. I don't have a strong preference on the name of the METplus config variable, but MET_OMP_NUM_THREADS was my first thought. The variable could be set to 1 in the default config file so it could be adjusted for a given installation or overridden by the user.

georgemccabe added a commit that referenced this issue Jan 6, 2022
…able through a METplus config variable of the same name
@georgemccabe georgemccabe linked a pull request Jan 6, 2022 that will close this issue
16 tasks
@georgemccabe georgemccabe added this to the METplus-4.1.0 milestone Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue METplus: Configuration priority: high High Priority requestor: UK Met Office United Kingdom Met Office required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project type: new feature Make it do something new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants