ncpu module

itrails.ncpu.update_n_cpu(user_requested)[source]

Update the global N_CPU based on the user-requested number of CPUs. This function sets N_CPU to the minimum of the user request and ALLOCATED_CPUS. It also updates environment variables used by numerical libraries.

Parameters:

user_requested (int.) – Number of CPU cores requested by the user.