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

How to determine the suitable number of threads for omp_set_num_threads #200

Open
ZhangAllen98 opened this issue Feb 2, 2023 · 0 comments

Comments

@ZhangAllen98
Copy link

ZhangAllen98 commented Feb 2, 2023

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)

@ZhangAllen98 ZhangAllen98 changed the title How to How to determine the suitable number of threads for omp_set_num_threads Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant