Esempio n. 1
0
    def __init__(self, *args, **kwds):
        """\nNOTE: if number of nodes is not given, will try to grab the number
of nodes from the associated scheduler, and failing will count the local cpus.
If workdir is not given, will default to scheduler's workdir or $WORKDIR.
If scheduler is not given, will default to only run on the current node.
If pickle is not given, will attempt to minimially use TemporaryFiles.

For more details, see the docstrings for the "map" method, or the man page
for the associated launcher (e.g mpirun, mpiexec).
        """
        Mapper.__init__(self, *args, **kwds)
        self.scatter = bool(kwds.get('scatter', False)) #XXX: hang w/ nodes=1 ?
       #self.nodes = kwds.get('nodes', None)
        if not len(args) and not kwds.has_key('nodes'):
            if self.scheduler:
                self.nodes = self.scheduler.nodes
            else:
                self.nodes = cpu_count()
        return
Esempio n. 2
0
 def __init__(self, *args, **kwds):
     Mapper.__init__(self, *args, **kwds)
     self.nodes = 1  # always has one node... it's serial!
     return
Esempio n. 3
0
 def __init__(self, *args, **kwds):
     Mapper.__init__(self, *args, **kwds)
     self.nodes = 1 # always has one node... it's serial!
     return