Replies: 3 comments 3 replies
-
Hey there, one option is to use the serial version of GSTools provided by PyPI (or self compiled), or you could try setting We could think about adding
Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Another option could be to use threadpoolctl: import numpy as np
import gstools as gs
from threadpoolctl import threadpool_limits
x = np.random.RandomState(19970221).rand(1000) * 10000.
y = np.random.RandomState(20011012).rand(1000) * 10000.
model = gs.Exponential(dim=2, var=2, len_scale=8)
srf = gs.SRF(model, mean=0, seed=19970221)
field = srf((x, y))
with threadpool_limits(limits=1, user_api='openmp'):
bin_center, gamma = gs.vario_estimate((x, y), field) |
Beta Was this translation helpful? Give feedback.
-
Hi Nathan, you can have a look at PR #336. For now, you can set the number of parallel threads for the Cython code with the global variable |
Beta Was this translation helpful? Give feedback.
-
Hi, I am running a series of processes using v1.5.1 on a large machine where I want to only use one thread. It seems that vario_estimate uses all available processes, increasing processing time from ~0.005 seconds to 20-30 seconds. How can this multithreaded behavior be turned off? I have tried setting os.environ['RAYON_NUM_THREADS'] = '1' in several places but this does not seem to have the desired effect.
Beta Was this translation helpful? Give feedback.
All reactions