import distributed respects any previous calls to dask.config.set that change a value, but not those that remove a key:
>>> import dask
>>> dask.config.set({"distributed.nanny.pre-spawn-environ": {'OMP_NUM_THREADS': 2}})
>>> dask.config.get("distributed.nanny.pre-spawn-environ")
{'OMP_NUM_THREADS': 2}
>>> import distributed
>>> dask.config.get("distributed.nanny.pre-spawn-environ")
{'OMP_NUM_THREADS': 2, 'MALLOC_TRIM_THRESHOLD_': 65536, 'MKL_NUM_THREADS': 1, 'OPENBLAS_NUM_THREADS': 1}
The problem here is that an unset MALLOC_TRIM_THRESHOLD_ has a special meaning for the glibc so it can't just simply be overridden with a different explicit value.
import distributedrespects any previous calls todask.config.setthat change a value, but not those that remove a key:The problem here is that an unset
MALLOC_TRIM_THRESHOLD_has a special meaning for the glibc so it can't just simply be overridden with a different explicit value.