Permalink
Browse files

firt pass to support sge

  • Loading branch information...
1 parent b222b5c commit e9f42798c45f841e68aa449ce6aba41b468b2a30 Satrajit Ghosh committed Jul 17, 2010
Showing with 22 additions and 13 deletions.
  1. +11 −2 IPython/kernel/scripts/ipcluster.py
  2. +11 −11 docs/source/parallel/parallel_process.txt
@@ -339,6 +339,15 @@ class SGEEngineSet(BatchEngineSet):
def __init__(self, template_file, **kwargs):
BatchEngineSet.__init__(self, template_file, **kwargs)
+ def parse_job_id(self, output):
+ m = re.search(self.job_id_regexp, output)
+ if m is not None:
+ job_id = m.group()
+ else:
+ raise Exception("job id couldn't be determined: %s" % output)
+ self.job_id = job_id
+ log.msg('Job started with job id: %r' % job_id)
+ return job_id
sshx_template="""#!/bin/sh
"$@" &> /dev/null &
@@ -820,15 +829,15 @@ def get_args():
parser_sge = subparsers.add_parser(
'sge',
- help='run a sge cluster',
+ help='run an sge cluster',
parents=[base_parser]
)
parser_sge.add_argument(
'--sge-script',
type=str,
dest='sgescript',
help='SGE script template',
- default='sge.template'
+ default='template.sge'
)
parser_sge.set_defaults(func=main_sge)
@@ -177,17 +177,17 @@ The SGE mode uses the Sun Grid Engine [SGE]_ to start the engines. To use this
.. sourcecode:: bash
- #!/bin/bash
- #$ -V
- #$ -cwd
- #$ -M joe@gmail.com
- #$ -m beas
- #$ -N ipython
- #$ -r y
- #$ -S /bin/bash
-
- cd $$HOME/sge
- /usr/local/bin/mpiexec -n ${n} ipengine --logfile=$$HOME/sge/ipengine
+ #!/bin/bash
+ #$ -V
+ #$ -cwd
+ #$ -m n
+ #$ -N satra-ipython
+ #$ -r y
+ #$ -q sub
+ #$ -S /bin/bash
+
+ cd $$HOME/sge
+ ipengine --logfile=ipengine
There are a few important points about this template:

0 comments on commit e9f4279

Please sign in to comment.