Example #1
0
def init(cpu=None, dist=False, interactive=False, verbose=None):
    global engine, isClusterEngine, isInteractive
    if engine==None:
        if dist:
            engine = ClientEngine()
            isClusterEngine = True
        else:
            conf = None
            if cpu == None: conf = Config.par()
            else: conf = Config.par(cpu)

            if verbose: conf.setVerbose()
            engine = LocalEngine(conf)
    if interactive:
        isInteractive = True
        engine = AsyncEngine(engine)
Example #2
0
def init(cpu=None, dist=False, interactive=False, verbose=None):
    verbose = True
    global engine, isClusterEngine, isInteractive
    if engine==None:
        if dist:
            engine = ClientEngine()
            isClusterEngine = True
        else:
            conf = None
            if cpu == None: conf = Config.par()
            else: conf = Config.par(cpu)

            if verbose: conf.setVerbose()
            engine = LocalEngine(conf)
    if interactive:
        isInteractive = True
        engine = AsyncEngine(engine)