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)
I noticed that using the
wrf.omp_set_num_threads
function withcache
could speed up the process ofgetvar
from this page. However, in my case,wrf.omp_get_num_procs()=128
,(64 CPU cores (128 total threads)), I found that settingwrf.omp_set_num_threads(48)
is better thanwrf.omp_set_num_threads(wrf.omp_get_num_procs())
orwrf.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)