if boolean: log.setLevel(logging.DEBUG) _save(True) else: log.setLevel(logging.WARN) _save(False) return _pid = '.' + str(os.getpid()) + '.' defaults = { 'nodes': str(cpu_count()), 'program': which_strategy(lazy=True) or 'ezscatter', # serialize to tempfile 'mpirun': which_mpirun() or 'mpiexec', 'python': which_python(lazy=True) or 'python', 'progargs': '', 'outfile': 'results%sout' % _pid, 'errfile': 'errors%sout' % _pid, 'jobfile': 'job%sid' % _pid, 'scheduler': '', 'timelimit': '00:02', 'queue': 'normal', 'workdir': '.' } #FIXME FIXME: __init__ and self for 'nodes' vs 'ncpus' is confused; see __repr__ class Mapper(AbstractWorkerPool): """ Mapper base class for pipe-based mapping.
"""if True, print debuging info and save temporary files after pickling""" if boolean: log.setLevel(logging.DEBUG) _save(True) else: log.setLevel(logging.WARN) _save(False) return _pid = '.' + str(os.getpid()) + '.' defaults = { 'nodes' : str(cpu_count()), 'program' : which_strategy(lazy=True) or 'ezscatter.py', # serialize to tempfile 'mpirun' : which_mpirun() or 'mpiexec', 'python' : which_python(lazy=True) or 'python', 'progargs' : '', 'outfile' : 'results%sout' % _pid, 'errfile' : 'errors%sout' % _pid, 'jobfile' : 'job%sid' % _pid, 'scheduler' : '', 'timelimit' : '00:02', 'queue' : 'normal', 'workdir' : '.' } #FIXME FIXME: __init__ and self for 'nodes' vs 'ncpus' is confused; see __repr__