NCAR / NCAR/wrf-python

How to determine the suitable number of threads for omp_set_num_threads

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
498
Forks
178
PR merge metrics
No merged PRs in 30d

Description

I noticed that using the wrf.omp_set_num_threadsfunction with cache could speed up the process of getvar from this page. However, in my case, wrf.omp_get_num_procs()=128 ,(64 CPU cores (128 total threads)), I found that setting wrf.omp_set_num_threads(48) is better than wrf.omp_set_num_threads(wrf.omp_get_num_procs()) or wrf.omp_get_num_procs(64), which means that the former case spend less time. Are there some rules to set the threads number to be used?

My wrfout files contain a series of variables whose shape is (time,level,lat,lon) = (4,53,312,321)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the cache-argument documentation page and the wrf.omp_set_num_threads and wrf.omp_get_num_procs entry points mentioned in the issue. Investigate how thread counts affect getvar for the stated WRF output shape and determine what measurements or environment details are needed. Done means documenting evidence-based guidance or limits for choosing a thread count.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.