CIL
CIL copied to clipboard
cil.utilities.multiprocessing.NUM_THREADS not always available
Description
cil.utilities.multiprocessing.NUM_THREADS calculates the number of CPUs on the current machine, then returns around half the number which is assumed to be a number of available threads. Elsewhere in CIL we use this number to initiate multiprocessing. However, the number of threads might not actually be available which can cause errors.
Places where cil.utilities.multiprocessing.NUM_THREADS is used
- IndicatorBox
- FluxNormaliser
- TransmissionAbsorptionConvertor
- GradientOperator
- DataContainer sapyb _axpby
Environment
import cil, sys
print(cil.version.version, cil.version.commit_hash, sys.version, sys.platform)
@paskino to check the environment variables for Numba and OMP number of threads on the DTU system. Our calculation of number of threads to use should be capped by this.