From e6accb86f8e89c56ddb592e5030dad9c4ccc4fb6 2011-06-20 23:40:24 From: MinRK Date: 2011-06-20 23:40:24 Subject: [PATCH] rename '--cluster' flag to '--parallel' in ProfileApp Now, to instruct the profile to include parallel scripts, you would do: $> ipython profile create foo --parallel instead of $> ipython profile create foo --cluster docs updated accordingly. --- diff --git a/IPython/core/profileapp.py b/IPython/core/profileapp.py index a5e4003..f28b8c5 100644 --- a/IPython/core/profileapp.py +++ b/IPython/core/profileapp.py @@ -36,7 +36,7 @@ from IPython.utils.traitlets import Unicode, Bool, Dict # Constants #----------------------------------------------------------------------------- -create_help = """Create an ipcluster profile by name +create_help = """Create an IPython profile by name Create an ipython profile directory by its name or profile directory path. Profile directories contain @@ -45,7 +45,7 @@ using the convention 'profile_'. By default they are located in your ipython directory. Once created, you will can edit the configuration files in the profile directory to configure IPython. Most users will create a -cluster directory by profile name, +profile directory by name, `ipython profile create myprofile`, which will put the directory in `/profile_myprofile`. """ @@ -124,7 +124,7 @@ create_flags = {} create_flags.update(base_flags) create_flags.update(boolean_flag('reset', 'ProfileCreate.overwrite', "reset config files to defaults", "leave existing config files")) -create_flags.update(boolean_flag('cluster', 'ProfileCreate.cluster', +create_flags.update(boolean_flag('parallel', 'ProfileCreate.parallel', "Include parallel computing config files", "Don't include parallel computing config files")) @@ -136,18 +136,18 @@ class ProfileCreate(BaseIPythonApplication): def _copy_config_files_default(self): return True - cluster = Bool(False, config=True, + parallel = Bool(False, config=True, help="whether to include parallel computing config files") - def _cluster_changed(self, name, old, new): - cluster_files = [ 'ipcontroller_config.py', + def _parallel_changed(self, name, old, new): + parallel_files = [ 'ipcontroller_config.py', 'ipengine_config.py', 'ipcluster_config.py' ] if new: - for cf in cluster_files: + for cf in parallel_files: self.config_files.append(cf) else: - for cf in cluster_files: + for cf in parallel_files: if cf in self.config_files: self.config_files.remove(cf) @@ -174,7 +174,7 @@ class ProfileCreate(BaseIPythonApplication): pass else: apps.append(IPythonQtConsoleApp) - if self.cluster: + if self.parallel: from IPython.parallel.apps.ipcontrollerapp import IPControllerApp from IPython.parallel.apps.ipengineapp import IPEngineApp from IPython.parallel.apps.ipclusterapp import IPClusterStart diff --git a/docs/source/parallel/parallel_process.txt b/docs/source/parallel/parallel_process.txt index de6a72f..e33f4fb 100644 --- a/docs/source/parallel/parallel_process.txt +++ b/docs/source/parallel/parallel_process.txt @@ -92,7 +92,7 @@ Configuring an IPython cluster Cluster configurations are stored as `profiles`. You can create a new profile with:: - $ ipython profile create --cluster profile=myprofile + $ ipython profile create --parallel profile=myprofile This will create the directory :file:`IPYTHONDIR/cluster_myprofile`, and populate it with the default configuration files for the three IPython cluster commands. Once @@ -133,7 +133,7 @@ The mpiexec/mpirun mode is useful if you: If these are satisfied, you can create a new profile:: - $ ipython profile create --cluster profile=mpi + $ ipython profile create --parallel profile=mpi and edit the file :file:`IPYTHONDIR/cluster_mpi/ipcluster_config.py`. @@ -190,7 +190,7 @@ The PBS mode uses the Portable Batch System [PBS]_ to start the engines. As usual, we will start by creating a fresh profile:: - $ ipython profile create --cluster profile=pbs + $ ipython profile create --parallel profile=pbs And in :file:`ipcluster_config.py`, we will select the PBS launchers for the controller and engines: @@ -310,7 +310,7 @@ nodes and :command:`ipcontroller` can be run remotely as well, or on localhost. As usual, we start by creating a clean profile:: - $ ipython profile create --cluster profile=ssh + $ ipython profile create --parallel profile=ssh To use this mode, select the SSH launchers in :file:`ipcluster_config.py`: diff --git a/docs/source/parallel/parallel_winhpc.txt b/docs/source/parallel/parallel_winhpc.txt index 1eccff0..3452470 100644 --- a/docs/source/parallel/parallel_winhpc.txt +++ b/docs/source/parallel/parallel_winhpc.txt @@ -179,7 +179,7 @@ describe how to configure and run an IPython cluster on an actual compute cluster running Windows HPC Server 2008. Here is an outline of the needed steps: -1. Create a cluster profile using: ``ipython profile create --cluster profile=mycluster`` +1. Create a cluster profile using: ``ipython profile create --parallel profile=mycluster`` 2. Edit configuration files in the directory :file:`.ipython\\cluster_mycluster` @@ -204,7 +204,7 @@ security keys. The naming convention for cluster directories is: To create a new cluster profile (named "mycluster") and the associated cluster directory, type the following command at the Windows Command Prompt:: - ipython profile create --cluster profile=mycluster + ipython profile create --parallel profile=mycluster The output of this command is shown in the screenshot below. Notice how :command:`ipcluster` prints out the location of the newly created cluster