def __init__(self, *args, **kwds): """ Important class members: nodes - number (and potentially description) of workers queue - name of the scheduler queue [default: 'normal'] timelimit - upper limit of clocktime for each scheduled job workdir - associated $WORKDIR for scratch calculations/files Other class members: jobfile - name of the 'job' file pyina.mpi builds for the scheduler outfile - name of the 'output' file the scheduler will write to errfile - name of the 'error' file the scheduler will write to NOTE: The format for timelimit is typically 'HH:MM' or 'HH:MM:SS', while the format for nodes is typically 'n' or some variant of 'n:ppn=m' where 'n' is number of nodes and 'm' is processors per node. For more details, see the docstrings for the "sumbit" method, or the man page for the associated scheduler. """ self.__init(*args, **kwds) self.timelimit = kwds.get('timelimit', defaults['timelimit']) if isinstance(self.timelimit, int): from pyina.tools import isoformat self.timelimit = isoformat(self.timelimit) self.queue = kwds.get('queue', defaults['queue']) self.workdir = kwds.get('workdir', os.environ.get('WORKDIR', os.path.curdir)) #self.workdir = kwds.get('workdir', os.environ.get('WORKDIR', os.path.expanduser("~")) self.workdir = os.path.abspath(self.workdir) self.jobfile = kwds.get('jobfile', defaults['jobfile']) self.outfile = kwds.get('outfile', defaults['outfile']) self.errfile = kwds.get('errfile', defaults['errfile']) #self.nodes = kwds.get('nodes', defaults['nodes']) return