def todo(pid, N_proc, queue_list,
					mutex, barriex, turnstile, turnstile2, cnt):	

	comm = mpComm(pid, N_proc, queue_list,
					mutex, barriex, turnstile, turnstile2, cnt)

	from ring_of_CPUs import RingOfCPUs
	from Simulation_with_eclouds import Simulation
	simulation_content = Simulation()

	myCPUring = RingOfCPUs(simulation_content, N_pieces_per_transfer=1, comm=comm)

	myCPUring.run()
def todo(pid, N_proc, queue_list, mutex, barriex, turnstile, turnstile2, cnt):

    comm = mpComm(pid, N_proc, queue_list, mutex, barriex, turnstile,
                  turnstile2, cnt)

    from ring_of_CPUs import RingOfCPUs
    from Simulation_with_eclouds import Simulation
    simulation_content = Simulation()

    myCPUring = RingOfCPUs(simulation_content,
                           N_pieces_per_transfer=1,
                           comm=comm)

    myCPUring.run()
def todo(sim_module_string, pid, N_proc, queue_list,
					mutex, barriex, turnstile, turnstile2, cnt):	

	comm = mpComm(pid, N_proc, queue_list,
					mutex, barriex, turnstile, turnstile2, cnt)

	BIN = os.path.expanduser("./")
	sys.path.append(BIN)

	sim_module_strings = sim_module_string.split('.')
	if len(sim_module_strings)!=2:
		raise(ValueError('\n\nsim_class must be given in the form: module.class.\nNested referencing not implemented.\n\n'))
	module_name = sim_module_strings[0]
	class_name = sim_module_strings[1]
		
	
	SimModule = __import__(module_name)
	SimClass = getattr(SimModule, class_name)
	
	from ring_of_CPUs import RingOfCPUs
	simulation_content = SimClass()
	myCPUring = RingOfCPUs(simulation_content, comm=comm)
	myCPUring.run()
def todo(sim_module_string, pid, N_proc, queue_list, mutex, barriex, turnstile,
         turnstile2, cnt):

    comm = mpComm(pid, N_proc, queue_list, mutex, barriex, turnstile,
                  turnstile2, cnt)

    BIN = os.path.expanduser("./")
    sys.path.append(BIN)

    sim_module_strings = sim_module_string.split('.')
    if len(sim_module_strings) != 2:
        raise (ValueError(
            '\n\nsim_class must be given in the form: module.class.\nNested referencing not implemented.\n\n'
        ))
    module_name = sim_module_strings[0]
    class_name = sim_module_strings[1]

    SimModule = __import__(module_name)
    SimClass = getattr(SimModule, class_name)

    from ring_of_CPUs import RingOfCPUs
    simulation_content = SimClass()
    myCPUring = RingOfCPUs(simulation_content, comm=comm)
    myCPUring.run()
Exemple #5
0
import sys, os

BIN = os.path.expanduser("../../../")
sys.path.append(BIN)
BIN = os.path.expanduser("../../")
sys.path.append(BIN)

from ring_of_CPUs import RingOfCPUs
from Simulation_with_eclouds import Simulation

simulation_content = Simulation()

myCPUring = RingOfCPUs(simulation_content, N_pieces_per_transfer=1)

myCPUring.run()