diff --git a/IPython/Release.py b/IPython/Release.py index f46c4a5..adef323 100644 --- a/IPython/Release.py +++ b/IPython/Release.py @@ -22,15 +22,19 @@ name = 'ipython' # because bdist_rpm does not accept dashes (an RPM) convention, and # bdist_deb does not accept underscores (a Debian convention). -revision = '1016' +development = True # change this to False to do a release +version_base = '0.9.0' branch = 'ipython' +revision = '1016' -if branch == 'ipython': - version = '0.9.0.bzr.r' + revision +if development: + if branch == 'ipython': + version = '%s.bzr.r%s' % (version_base, revision) + else: + version = '%s.bzr.r%s.%s' % (version_base, revision, branch) else: - version = '0.9.0.bzr.r%s.%s' % (revision,branch) + version = version_base -# version = '0.8.4' description = "Tools for interactive development in Python." diff --git a/IPython/kernel/scripts/ipcluster.py b/IPython/kernel/scripts/ipcluster.py index 5f5795d..b7756ec 100755 --- a/IPython/kernel/scripts/ipcluster.py +++ b/IPython/kernel/scripts/ipcluster.py @@ -168,8 +168,7 @@ def startMsg(control_host,control_port=10105): print 'For interactive use, you can make a MultiEngineClient with:' print print 'from IPython.kernel import client' - print "mec = client.MultiEngineClient((%r,%s))" % \ - (control_host,control_port) + print "mec = client.MultiEngineClient()" print print 'You can then cleanly stop the cluster from IPython using:' print @@ -195,12 +194,13 @@ def clusterLocal(opt,arg): print 'Controller PID:',controller.pid print 'Starting engines: ', - time.sleep(3) + time.sleep(5) englogfile = '%s%s-' % (logfile,controller.pid) mpi = opt.mpi if mpi: # start with mpi - killing the engines with sigterm will not work if you do this engines = [Popen(['mpirun', '-np', str(opt.n), 'ipengine', '--mpi', mpi, '--logfile',englogfile])] + # engines = [Popen(['mpirun', '-np', str(opt.n), 'ipengine', '--mpi', mpi])] else: # do what we would normally do engines = [ Popen(['ipengine','--logfile',englogfile]) for i in range(opt.n) ] diff --git a/IPython/kernel/scripts/ipengine.py b/IPython/kernel/scripts/ipengine.py index 9f02ea1..d6309ba 100755 --- a/IPython/kernel/scripts/ipengine.py +++ b/IPython/kernel/scripts/ipengine.py @@ -58,16 +58,18 @@ def start_engine(): kernel_config = kernel_config_manager.get_config_obj() core_config = core_config_manager.get_config_obj() + # Execute the mpi import statement that needs to call MPI_Init + global mpi mpikey = kernel_config['mpi']['default'] mpi_import_statement = kernel_config['mpi'].get(mpikey, None) if mpi_import_statement is not None: try: - exec mpi_import_statement in locals(), globals() + exec mpi_import_statement in globals() except: mpi = None else: - mpi = None + mpi = mpi_namespace.get('mpi') # Start logging logfile = kernel_config['engine']['logfile'] diff --git a/docs/source/changes.txt b/docs/source/changes.txt index d10ced7..89fe83b 100644 --- a/docs/source/changes.txt +++ b/docs/source/changes.txt @@ -29,11 +29,13 @@ New features Development Team" as the copyright holder. We give more details about exactly what this means in this file. All developer should read this and use the new banner in all IPython source code files. - * sh profile: ./foo runs foo as system command, no need to do !./foo anymore + * sh profile: ./foo runs foo as system command, no need to do !./foo anymore Bug fixes --------- + * The :mod:`IPython.kernel.scripts.ipengine` script was exec'ing mpi_import_statement + incorrectly, which was leading the engine to crash when mpi was enabled. * A few subpackages has missing `__init__.py` files. * The documentation is only created is Sphinx is found. Previously, the `setup.py` script would fail if it was missing.