I want to use sksparse.cholmod in a production environment which requires monitoring. Therefore, I need to limit the resources reserved for the following call:
cholmod.analyze_AAt(A, mode=mode, use_long=use_long, ordering_method=ordering_method)
Specifically, I need to forbid this function call and the spawned subprocesses (running CHOLMOD C codes) from accessing a few threads (or cores) - otherwise the call hijacks all the resources for itself, resulting in a radio silence from the monitoring.
Can anyone help? Thank you
None of the following helped:
- setting environment variables for OMP and BLAS
- os.environ["OMP_NUM_THREADS"] = "1"
- os.environ["OPENBLAS_NUM_THREADS"] = "1"
- os.environ["MKL_NUM_THREADS"] = "1"
- os.environ["OMP_DYNAMIC"] = "FALSE"
- os.environ["OMP_THREAD_LIMIT"] = "1"
- os.environ["OMP_NESTED"] = "FALSE"
- os.environ["OMP_PROC_BIND"] = "TRUE"
- using threadpoolctl - logs showed that the number of threads for OMP and BLAS was set correctly, but it did not help.
I suspect the CHOLMOD C code may be overriding the environment variables by its default values, but verifying and fixing this is beyond my abilities.