Ejemplo n.º 1
0
Archivo: mpi.py Proyecto: mrocklin/ape
def comm_times_group(ns, hosts):
    """ Computes transit times between a set of hosts
    Returns a list of [(sender, receiver, nbytes, transit-time)]
    >>> comm_times([10, 100, 1000], 'A', 'B', 'C')
    todo
    """

    return run_on_hosts(hosts,
        '''python %sape/timings/communication/mpi_run_group.py "%s" %s'''%(
            ape_dir, ns, ' '.join(hosts)))
Ejemplo n.º 2
0
def comm_times_group(ns, hosts):
    """ Computes transit times between a set of hosts
    Returns a list of [(sender, receiver, nbytes, transit-time)]
    >>> comm_times([10, 100, 1000], 'A', 'B', 'C')
    todo
    """

    return run_on_hosts(
        hosts,
        '''python %sape/timings/communication/mpi_run_group.py "%s" %s''' %
        (ape_dir, ns, ' '.join(hosts)))
Ejemplo n.º 3
0
def comm_times_fromgpu(nbytes, host):
    """ Computes transit times between gpu and host
    Returns a list of [(nbytes, transit-time)]
    >>> comm_times([10, 100, 1000], 'host.univ.edu')
     [(40, 0.00015091896057128906),
     (400, 0.0002040863037109375),
     (4000, 0.0005209445953369141)]
    """

    return run_on_hosts((host, ),
     '''python %sape/timings/communication/tocpu_run.py "%s"'''%(
         ape_dir, str(nbytes)))
Ejemplo n.º 4
0
Archivo: mpi.py Proyecto: mrocklin/ape
def comm_times_single(ns, send_host, recv_host):
    """ Computes transit times between two hosts
    Returns a list of [(nbytes, transit-time)]
    >>> comm_times([10, 100, 1000], 'sender.univ.edu', 'receiver.univ.edu')
     [(4, 0.00013303756713867188),
     (40, 0.00015091896057128906),
     (400, 0.0002040863037109375),
     (4000, 0.0005209445953369141)]
    """

    return run_on_hosts((send_host, recv_host),
        '''python %sape/timings/communication/mpi_run_single.py "%s" %s %s'''%(
            ape_dir, str(ns), send_host, recv_host))
Ejemplo n.º 5
0
def comm_times_single(ns, send_host, recv_host):
    """ Computes transit times between two hosts
    Returns a list of [(nbytes, transit-time)]
    >>> comm_times([10, 100, 1000], 'sender.univ.edu', 'receiver.univ.edu')
     [(4, 0.00013303756713867188),
     (40, 0.00015091896057128906),
     (400, 0.0002040863037109375),
     (4000, 0.0005209445953369141)]
    """

    return run_on_hosts(
        (send_host, recv_host),
        '''python %sape/timings/communication/mpi_run_single.py "%s" %s %s''' %
        (ape_dir, str(ns), send_host, recv_host))