def start_memory_bench(bench):
    global hosts_state
    nb_hosts = bench['nb-hosts']
    msg = HM(HM.MODULE, HM.MEMORY, HM.START)
    msg.cpu_instances = bench['cores']
    msg.block_size = bench['block-size']
    msg.running_time = bench['runtime']
    msg.mode = bench['mode']

    for host in bench['hosts-list']:
        if nb_hosts == 0:
            break
        if host not in get_host_list(MEMORY_RUN).keys():
            hosts_state[host] |= MEMORY_RUN
            nb_hosts = nb_hosts - 1
            lock_socket_list.acquire()
            start_time(host)
            HP.send_hm_message(socket_list[host], msg)
            lock_socket_list.release()
dataset/ETHPy150Open redhat-cip/edeploy/src/health-server.py/start_memory_bench/original