compute_num_cores
- stcal.multiprocessing.compute_num_cores(max_cores, nchunks, max_available)[source]
Compute the number of chunks to be created for multiprocessing.
- Parameters:
max_cores (str) – Number of cores to use for multiprocessing. If set to ‘none’ (the default), then no multiprocessing will be done. The other allowable values are ‘quarter’, ‘half’, and ‘all’ and string integers. This is the fraction of cores to use for multi-proc.
nchunks (int) – The total number of chunks that will be processed. If more cores are requested than chunks, then the number of chunks will be used as the output to make sure that each process has some data.
max_available (int) – This is the total number of cores available. The total number of cores includes the SMT cores (Hyper Threading for Intel).
- Returns:
number_slices – The number of slices for multiprocessing.
- Return type: