def METHOD_NAME(self, req_mem_gb_per_core=3.0, max_cores_allowed=32):
    """
    Compute the number of usable cores given memory and size
    constraints for the problem.
    Steps:
        1) compute max number of CPUs by cpu constraints: min(sys cores, max_cores_allowed)
        2) compute max cores by mem constraints: sys_mem_GB / req_mem_gb_per_core
        3) return min of (1) and (2)
    Args:
        req_mem_gb_per_core (float): The minimum memory (GB) per core required. Default=3.0
        max_cores_allowed   (int)  : The maximum number of cores to use. Default=32
    Returns:
        int: Returns the minimum of (1) and (2)
    """
    if max_cores_allowed < 1:
        max_cores_allowed = 1
    output = 1
    n_cpu = multiprocessing.cpu_count()
    mem_G = self.meminfo["mem_gb"]
    max_cpu_by_param_constraint = min(n_cpu, max_cores_allowed)
    max_cpu_by_mem_constraint   = int(mem_G / req_mem_gb_per_core)
    output = min(max_cpu_by_mem_constraint, max_cpu_by_param_constraint)
    return output