def compute_nodes(nworker, taskproc, nodeprocs):
    """Compute number of nodes for the number of workers.

    Args:
        nworker (int):  The number of workers.
        taskproc (int):  The number of processes per task.
        nodeprocs (int):  The number of processes per node.

    Returns:
        (int):  The number of required nodes.

    """
    nds = (nworker * taskproc) // nodeprocs
    if nds * nodeprocs < nworker * taskproc:
        nds += 1
    return nds