Show More
@@ -294,7 +294,7 b' class IPClusterApp(ApplicationWithClusterDir):' | |||||
294 |
|
294 | |||
295 | # Start the controller and engines |
|
295 | # Start the controller and engines | |
296 | d = self.controller_launcher.start( |
|
296 | d = self.controller_launcher.start( | |
297 |
|
|
297 | cluster_dir=config.Global.cluster_dir | |
298 | ) |
|
298 | ) | |
299 | d.addCallback(lambda _: self.start_engines()) |
|
299 | d.addCallback(lambda _: self.start_engines()) | |
300 | d.addErrback(self.err_and_stop) |
|
300 | d.addErrback(self.err_and_stop) | |
@@ -311,7 +311,7 b' class IPClusterApp(ApplicationWithClusterDir):' | |||||
311 | config = self.master_config |
|
311 | config = self.master_config | |
312 | d = self.engine_launcher.start( |
|
312 | d = self.engine_launcher.start( | |
313 | config.Global.n, |
|
313 | config.Global.n, | |
314 |
|
|
314 | cluster_dir=config.Global.cluster_dir | |
315 | ) |
|
315 | ) | |
316 | return d |
|
316 | return d | |
317 |
|
317 |
@@ -569,13 +569,12 b' class WindowsHPCLauncher(BaseLauncher):' | |||||
569 | job_file = Unicode(u'') |
|
569 | job_file = Unicode(u'') | |
570 | # The hostname of the scheduler to submit the job to |
|
570 | # The hostname of the scheduler to submit the job to | |
571 | scheduler = Str('', config=True) |
|
571 | scheduler = Str('', config=True) | |
572 | job_cmd = Str(find_job_cmd, config=True) |
|
572 | job_cmd = Str(find_job_cmd(), config=True) | |
573 |
|
573 | |||
574 | def __init__(self, working_dir, parent=None, name=None, config=None): |
|
574 | def __init__(self, working_dir, parent=None, name=None, config=None): | |
575 | super(WindowsHPCLauncher, self).__init__( |
|
575 | super(WindowsHPCLauncher, self).__init__( | |
576 | working_dir, parent, name, config |
|
576 | working_dir, parent, name, config | |
577 | ) |
|
577 | ) | |
578 | self.job_file = os.path.join(self.working_dir, self.job_file_name) |
|
|||
579 |
|
578 | |||
580 | @property |
|
579 | @property | |
581 | def job_file(self): |
|
580 | def job_file(self): | |
@@ -608,9 +607,10 b' class WindowsHPCLauncher(BaseLauncher):' | |||||
608 | '/scheduler:%s' % self.scheduler |
|
607 | '/scheduler:%s' % self.scheduler | |
609 | ] |
|
608 | ] | |
610 | log.msg("Starting Win HPC Job: %s" % (self.job_cmd + ' ' + ' '.join(args),)) |
|
609 | log.msg("Starting Win HPC Job: %s" % (self.job_cmd + ' ' + ' '.join(args),)) | |
611 | output = yield getProcessOutput(self.job_cmd, |
|
610 | # Twisted will raise DeprecationWarnings if we try to pass unicode to this | |
612 | args, |
|
611 | output = yield getProcessOutput(str(self.job_cmd), | |
613 | env=os.environ, |
|
612 | [str(a) for a in args], | |
|
613 | env=dict((str(k),str(v)) for k,v in os.environ.items()), | |||
614 | path=self.working_dir |
|
614 | path=self.working_dir | |
615 | ) |
|
615 | ) | |
616 | job_id = self.parse_job_id(output) |
|
616 | job_id = self.parse_job_id(output) | |
@@ -626,9 +626,10 b' class WindowsHPCLauncher(BaseLauncher):' | |||||
626 | ] |
|
626 | ] | |
627 | log.msg("Stopping Win HPC Job: %s" % (self.job_cmd + ' ' + ' '.join(args),)) |
|
627 | log.msg("Stopping Win HPC Job: %s" % (self.job_cmd + ' ' + ' '.join(args),)) | |
628 | try: |
|
628 | try: | |
629 | output = yield getProcessOutput(self.job_cmd, |
|
629 | # Twisted will raise DeprecationWarnings if we try to pass unicode to this | |
630 | args, |
|
630 | output = yield getProcessOutput(str(self.job_cmd), | |
631 | env=os.environ, |
|
631 | [str(a) for a in args], | |
|
632 | env=dict((str(k),str(v)) for k,v in os.environ.items()), | |||
632 | path=self.working_dir |
|
633 | path=self.working_dir | |
633 | ) |
|
634 | ) | |
634 | except: |
|
635 | except: | |
@@ -676,7 +677,7 b' class WindowsHPCEngineSetLauncher(WindowsHPCLauncher):' | |||||
676 | extra_args = List([], config=False) |
|
677 | extra_args = List([], config=False) | |
677 |
|
678 | |||
678 | def write_job_file(self, n): |
|
679 | def write_job_file(self, n): | |
679 |
job = IP |
|
680 | job = IPEngineSetJob(self) | |
680 |
|
681 | |||
681 | for i in range(n): |
|
682 | for i in range(n): | |
682 | t = IPEngineTask(self) |
|
683 | t = IPEngineTask(self) | |
@@ -695,13 +696,13 b' class WindowsHPCEngineSetLauncher(WindowsHPCLauncher):' | |||||
695 | def job_file(self): |
|
696 | def job_file(self): | |
696 | return os.path.join(self.cluster_dir, self.job_file_name) |
|
697 | return os.path.join(self.cluster_dir, self.job_file_name) | |
697 |
|
698 | |||
698 | def start(self, cluster_dir): |
|
699 | def start(self, n, cluster_dir): | |
699 | """Start the controller by cluster_dir.""" |
|
700 | """Start the controller by cluster_dir.""" | |
700 | self.extra_args = [ |
|
701 | self.extra_args = [ | |
701 | '--cluster-dir', cluster_dir, '--working-dir', self.working_dir |
|
702 | '--cluster-dir', cluster_dir, '--working-dir', self.working_dir | |
702 | ] |
|
703 | ] | |
703 | self.cluster_dir = unicode(cluster_dir) |
|
704 | self.cluster_dir = unicode(cluster_dir) | |
704 |
return super(WindowsHPC |
|
705 | return super(WindowsHPCEngineSetLauncher, self).start(n) | |
705 |
|
706 | |||
706 |
|
707 | |||
707 | #----------------------------------------------------------------------------- |
|
708 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now