##// END OF EJS Templates
Fixed bug in ipengine.py when mpi was enabled that was causing the engine to crash at start....
Brian E Granger -
Show More
@@ -22,15 +22,19 b" name = 'ipython'"
22 22 # because bdist_rpm does not accept dashes (an RPM) convention, and
23 23 # bdist_deb does not accept underscores (a Debian convention).
24 24
25 revision = '1016'
25 development = True # change this to False to do a release
26 version_base = '0.9.0'
26 27 branch = 'ipython'
28 revision = '1016'
27 29
28 if branch == 'ipython':
29 version = '0.9.0.bzr.r' + revision
30 if development:
31 if branch == 'ipython':
32 version = '%s.bzr.r%s' % (version_base, revision)
33 else:
34 version = '%s.bzr.r%s.%s' % (version_base, revision, branch)
30 35 else:
31 version = '0.9.0.bzr.r%s.%s' % (revision,branch)
36 version = version_base
32 37
33 # version = '0.8.4'
34 38
35 39 description = "Tools for interactive development in Python."
36 40
@@ -168,8 +168,7 b' def startMsg(control_host,control_port=10105):'
168 168 print 'For interactive use, you can make a MultiEngineClient with:'
169 169 print
170 170 print 'from IPython.kernel import client'
171 print "mec = client.MultiEngineClient((%r,%s))" % \
172 (control_host,control_port)
171 print "mec = client.MultiEngineClient()"
173 172 print
174 173 print 'You can then cleanly stop the cluster from IPython using:'
175 174 print
@@ -195,12 +194,13 b' def clusterLocal(opt,arg):'
195 194 print 'Controller PID:',controller.pid
196 195
197 196 print 'Starting engines: ',
198 time.sleep(3)
197 time.sleep(5)
199 198
200 199 englogfile = '%s%s-' % (logfile,controller.pid)
201 200 mpi = opt.mpi
202 201 if mpi: # start with mpi - killing the engines with sigterm will not work if you do this
203 202 engines = [Popen(['mpirun', '-np', str(opt.n), 'ipengine', '--mpi', mpi, '--logfile',englogfile])]
203 # engines = [Popen(['mpirun', '-np', str(opt.n), 'ipengine', '--mpi', mpi])]
204 204 else: # do what we would normally do
205 205 engines = [ Popen(['ipengine','--logfile',englogfile])
206 206 for i in range(opt.n) ]
@@ -58,16 +58,18 b' def start_engine():'
58 58 kernel_config = kernel_config_manager.get_config_obj()
59 59 core_config = core_config_manager.get_config_obj()
60 60
61
61 62 # Execute the mpi import statement that needs to call MPI_Init
63 global mpi
62 64 mpikey = kernel_config['mpi']['default']
63 65 mpi_import_statement = kernel_config['mpi'].get(mpikey, None)
64 66 if mpi_import_statement is not None:
65 67 try:
66 exec mpi_import_statement in locals(), globals()
68 exec mpi_import_statement in globals()
67 69 except:
68 70 mpi = None
69 71 else:
70 mpi = None
72 mpi = mpi_namespace.get('mpi')
71 73
72 74 # Start logging
73 75 logfile = kernel_config['engine']['logfile']
@@ -29,11 +29,13 b' New features'
29 29 Development Team" as the copyright holder. We give more details about exactly
30 30 what this means in this file. All developer should read this and use the new
31 31 banner in all IPython source code files.
32 * sh profile: ./foo runs foo as system command, no need to do !./foo anymore
32 * sh profile: ./foo runs foo as system command, no need to do !./foo anymore
33 33
34 34 Bug fixes
35 35 ---------
36 36
37 * The :mod:`IPython.kernel.scripts.ipengine` script was exec'ing mpi_import_statement
38 incorrectly, which was leading the engine to crash when mpi was enabled.
37 39 * A few subpackages has missing `__init__.py` files.
38 40 * The documentation is only created is Sphinx is found. Previously, the `setup.py`
39 41 script would fail if it was missing.
General Comments 0
You need to be logged in to leave comments. Login now