diff --git a/IPython/config/default/ipclusterz_config.py b/IPython/config/default/ipclusterz_config.py new file mode 100644 index 0000000..36aa453 --- /dev/null +++ b/IPython/config/default/ipclusterz_config.py @@ -0,0 +1,184 @@ +import os + +c = get_config() + +#----------------------------------------------------------------------------- +# Select which launchers to use +#----------------------------------------------------------------------------- + +# This allows you to control what method is used to start the controller +# and engines. The following methods are currently supported: +# - Start as a regular process on localhost. +# - Start using mpiexec. +# - Start using the Windows HPC Server 2008 scheduler +# - Start using PBS +# - Start using SSH (currently broken) + + +# The selected launchers can be configured below. + +# Options are: +# - LocalControllerLauncher +# - MPIExecControllerLauncher +# - PBSControllerLauncher +# - WindowsHPCControllerLauncher +# c.Global.controller_launcher = 'IPython.kernel.launcher.LocalControllerLauncher' + +# Options are: +# - LocalEngineSetLauncher +# - MPIExecEngineSetLauncher +# - PBSEngineSetLauncher +# - WindowsHPCEngineSetLauncher +# c.Global.engine_launcher = 'IPython.kernel.launcher.LocalEngineSetLauncher' + +#----------------------------------------------------------------------------- +# Global configuration +#----------------------------------------------------------------------------- + +# The default number of engines that will be started. This is overridden by +# the -n command line option: "ipcluster start -n 4" +# c.Global.n = 2 + +# Log to a file in cluster_dir/log, otherwise just log to sys.stdout. +# c.Global.log_to_file = False + +# Remove old logs from cluster_dir/log before starting. +# c.Global.clean_logs = True + +# The working directory for the process. The application will use os.chdir +# to change to this directory before starting. +# c.Global.work_dir = os.getcwd() + + +#----------------------------------------------------------------------------- +# Local process launchers +#----------------------------------------------------------------------------- + +# The command line arguments to call the controller with. +# c.LocalControllerLauncher.controller_args = \ +# ['--log-to-file','--log-level', '40'] + +# The working directory for the controller +# c.LocalEngineSetLauncher.work_dir = u'' + +# Command line argument passed to the engines. +# c.LocalEngineSetLauncher.engine_args = ['--log-to-file','--log-level', '40'] + +#----------------------------------------------------------------------------- +# MPIExec launchers +#----------------------------------------------------------------------------- + +# The mpiexec/mpirun command to use in started the controller. +# c.MPIExecControllerLauncher.mpi_cmd = ['mpiexec'] + +# Additional arguments to pass to the actual mpiexec command. +# c.MPIExecControllerLauncher.mpi_args = [] + +# The command line argument to call the controller with. +# c.MPIExecControllerLauncher.controller_args = \ +# ['--log-to-file','--log-level', '40'] + + +# The mpiexec/mpirun command to use in started the controller. +# c.MPIExecEngineSetLauncher.mpi_cmd = ['mpiexec'] + +# Additional arguments to pass to the actual mpiexec command. +# c.MPIExecEngineSetLauncher.mpi_args = [] + +# Command line argument passed to the engines. +# c.MPIExecEngineSetLauncher.engine_args = ['--log-to-file','--log-level', '40'] + +# The default number of engines to start if not given elsewhere. +# c.MPIExecEngineSetLauncher.n = 1 + +#----------------------------------------------------------------------------- +# SSH launchers +#----------------------------------------------------------------------------- + +# Todo + + +#----------------------------------------------------------------------------- +# Unix batch (PBS) schedulers launchers +#----------------------------------------------------------------------------- + +# The command line program to use to submit a PBS job. +# c.PBSControllerLauncher.submit_command = 'qsub' + +# The command line program to use to delete a PBS job. +# c.PBSControllerLauncher.delete_command = 'qdel' + +# A regular expression that takes the output of qsub and find the job id. +# c.PBSControllerLauncher.job_id_regexp = r'\d+' + +# The batch submission script used to start the controller. This is where +# environment variables would be setup, etc. This string is interpolated using +# the Itpl module in IPython.external. Basically, you can use ${n} for the +# number of engine and ${cluster_dir} for the cluster_dir. +# c.PBSControllerLauncher.batch_template = """""" + +# The name of the instantiated batch script that will actually be used to +# submit the job. This will be written to the cluster directory. +# c.PBSControllerLauncher.batch_file_name = u'pbs_batch_script_controller' + + +# The command line program to use to submit a PBS job. +# c.PBSEngineSetLauncher.submit_command = 'qsub' + +# The command line program to use to delete a PBS job. +# c.PBSEngineSetLauncher.delete_command = 'qdel' + +# A regular expression that takes the output of qsub and find the job id. +# c.PBSEngineSetLauncher.job_id_regexp = r'\d+' + +# The batch submission script used to start the engines. This is where +# environment variables would be setup, etc. This string is interpolated using +# the Itpl module in IPython.external. Basically, you can use ${n} for the +# number of engine and ${cluster_dir} for the cluster_dir. +# c.PBSEngineSetLauncher.batch_template = """""" + +# The name of the instantiated batch script that will actually be used to +# submit the job. This will be written to the cluster directory. +# c.PBSEngineSetLauncher.batch_file_name = u'pbs_batch_script_engines' + +#----------------------------------------------------------------------------- +# Windows HPC Server 2008 launcher configuration +#----------------------------------------------------------------------------- + +# c.IPControllerJob.job_name = 'IPController' +# c.IPControllerJob.is_exclusive = False +# c.IPControllerJob.username = r'USERDOMAIN\USERNAME' +# c.IPControllerJob.priority = 'Highest' +# c.IPControllerJob.requested_nodes = '' +# c.IPControllerJob.project = 'MyProject' + +# c.IPControllerTask.task_name = 'IPController' +# c.IPControllerTask.controller_cmd = [u'ipcontroller.exe'] +# c.IPControllerTask.controller_args = ['--log-to-file', '--log-level', '40'] +# c.IPControllerTask.environment_variables = {} + +# c.WindowsHPCControllerLauncher.scheduler = 'HEADNODE' +# c.WindowsHPCControllerLauncher.job_file_name = u'ipcontroller_job.xml' + + +# c.IPEngineSetJob.job_name = 'IPEngineSet' +# c.IPEngineSetJob.is_exclusive = False +# c.IPEngineSetJob.username = r'USERDOMAIN\USERNAME' +# c.IPEngineSetJob.priority = 'Highest' +# c.IPEngineSetJob.requested_nodes = '' +# c.IPEngineSetJob.project = 'MyProject' + +# c.IPEngineTask.task_name = 'IPEngine' +# c.IPEngineTask.engine_cmd = [u'ipengine.exe'] +# c.IPEngineTask.engine_args = ['--log-to-file', '--log-level', '40'] +# c.IPEngineTask.environment_variables = {} + +# c.WindowsHPCEngineSetLauncher.scheduler = 'HEADNODE' +# c.WindowsHPCEngineSetLauncher.job_file_name = u'ipengineset_job.xml' + + + + + + + diff --git a/IPython/config/default/ipcontrollerz_config.py b/IPython/config/default/ipcontrollerz_config.py new file mode 100644 index 0000000..c1d0bce --- /dev/null +++ b/IPython/config/default/ipcontrollerz_config.py @@ -0,0 +1,136 @@ +from IPython.config.loader import Config + +c = get_config() + +#----------------------------------------------------------------------------- +# Global configuration +#----------------------------------------------------------------------------- + +# Basic Global config attributes + +# Start up messages are logged to stdout using the logging module. +# These all happen before the twisted reactor is started and are +# useful for debugging purposes. Can be (10=DEBUG,20=INFO,30=WARN,40=CRITICAL) +# and smaller is more verbose. +# c.Global.log_level = 20 + +# Log to a file in cluster_dir/log, otherwise just log to sys.stdout. +# c.Global.log_to_file = False + +# Remove old logs from cluster_dir/log before starting. +# c.Global.clean_logs = True + +# A list of Python statements that will be run before starting the +# controller. This is provided because occasionally certain things need to +# be imported in the controller for pickling to work. +# c.Global.import_statements = ['import math'] + +# Reuse the controller's FURL files. If False, FURL files are regenerated +# each time the controller is run. If True, they will be reused, *but*, you +# also must set the network ports by hand. If set, this will override the +# values set for the client and engine connections below. +# c.Global.reuse_furls = True + +# Enable SSL encryption on all connections to the controller. If set, this +# will override the values set for the client and engine connections below. +# c.Global.secure = True + +# The working directory for the process. The application will use os.chdir +# to change to this directory before starting. +# c.Global.work_dir = os.getcwd() + +#----------------------------------------------------------------------------- +# Configure the client services +#----------------------------------------------------------------------------- + +# Basic client service config attributes + +# The network interface the controller will listen on for client connections. +# This should be an IP address or hostname of the controller's host. The empty +# string means listen on all interfaces. +# c.FCClientServiceFactory.ip = '' + +# The TCP/IP port the controller will listen on for client connections. If 0 +# a random port will be used. If the controller's host has a firewall running +# it must allow incoming traffic on this port. +# c.FCClientServiceFactory.port = 0 + +# The client learns how to connect to the controller by looking at the +# location field embedded in the FURL. If this field is empty, all network +# interfaces that the controller is listening on will be listed. To have the +# client connect on a particular interface, list it here. +# c.FCClientServiceFactory.location = '' + +# Use SSL encryption for the client connection. +# c.FCClientServiceFactory.secure = True + +# Reuse the client FURL each time the controller is started. If set, you must +# also pick a specific network port above (FCClientServiceFactory.port). +# c.FCClientServiceFactory.reuse_furls = False + +#----------------------------------------------------------------------------- +# Configure the engine services +#----------------------------------------------------------------------------- + +# Basic config attributes for the engine services. + +# The network interface the controller will listen on for engine connections. +# This should be an IP address or hostname of the controller's host. The empty +# string means listen on all interfaces. +# c.FCEngineServiceFactory.ip = '' + +# The TCP/IP port the controller will listen on for engine connections. If 0 +# a random port will be used. If the controller's host has a firewall running +# it must allow incoming traffic on this port. +# c.FCEngineServiceFactory.port = 0 + +# The engine learns how to connect to the controller by looking at the +# location field embedded in the FURL. If this field is empty, all network +# interfaces that the controller is listening on will be listed. To have the +# client connect on a particular interface, list it here. +# c.FCEngineServiceFactory.location = '' + +# Use SSL encryption for the engine connection. +# c.FCEngineServiceFactory.secure = True + +# Reuse the client FURL each time the controller is started. If set, you must +# also pick a specific network port above (FCClientServiceFactory.port). +# c.FCEngineServiceFactory.reuse_furls = False + +#----------------------------------------------------------------------------- +# Developer level configuration attributes +#----------------------------------------------------------------------------- + +# You shouldn't have to modify anything in this section. These attributes +# are more for developers who want to change the behavior of the controller +# at a fundamental level. + +# c.FCClientServiceFactory.cert_file = u'ipcontroller-client.pem' + +# default_client_interfaces = Config() +# default_client_interfaces.Task.interface_chain = [ +# 'IPython.kernel.task.ITaskController', +# 'IPython.kernel.taskfc.IFCTaskController' +# ] +# +# default_client_interfaces.Task.furl_file = u'ipcontroller-tc.furl' +# +# default_client_interfaces.MultiEngine.interface_chain = [ +# 'IPython.kernel.multiengine.IMultiEngine', +# 'IPython.kernel.multienginefc.IFCSynchronousMultiEngine' +# ] +# +# default_client_interfaces.MultiEngine.furl_file = u'ipcontroller-mec.furl' +# +# c.FCEngineServiceFactory.interfaces = default_client_interfaces + +# c.FCEngineServiceFactory.cert_file = u'ipcontroller-engine.pem' + +# default_engine_interfaces = Config() +# default_engine_interfaces.Default.interface_chain = [ +# 'IPython.kernel.enginefc.IFCControllerBase' +# ] +# +# default_engine_interfaces.Default.furl_file = u'ipcontroller-engine.furl' +# +# c.FCEngineServiceFactory.interfaces = default_engine_interfaces diff --git a/IPython/config/default/ipenginez_config.py b/IPython/config/default/ipenginez_config.py new file mode 100644 index 0000000..42483ed --- /dev/null +++ b/IPython/config/default/ipenginez_config.py @@ -0,0 +1,90 @@ +c = get_config() + +#----------------------------------------------------------------------------- +# Global configuration +#----------------------------------------------------------------------------- + +# Start up messages are logged to stdout using the logging module. +# These all happen before the twisted reactor is started and are +# useful for debugging purposes. Can be (10=DEBUG,20=INFO,30=WARN,40=CRITICAL) +# and smaller is more verbose. +# c.Global.log_level = 20 + +# Log to a file in cluster_dir/log, otherwise just log to sys.stdout. +# c.Global.log_to_file = False + +# Remove old logs from cluster_dir/log before starting. +# c.Global.clean_logs = True + +# A list of strings that will be executed in the users namespace on the engine +# before it connects to the controller. +# c.Global.exec_lines = ['import numpy'] + +# The engine will try to connect to the controller multiple times, to allow +# the controller time to startup and write its FURL file. These parameters +# control the number of retries (connect_max_tries) and the initial delay +# (connect_delay) between attemps. The actual delay between attempts gets +# longer each time by a factor of 1.5 (delay[i] = 1.5*delay[i-1]) +# those attemps. +# c.Global.connect_delay = 0.1 +# c.Global.connect_max_tries = 15 + +# By default, the engine will look for the controller's FURL file in its own +# cluster directory. Sometimes, the FURL file will be elsewhere and this +# attribute can be set to the full path of the FURL file. +# c.Global.furl_file = u'' + +# The working directory for the process. The application will use os.chdir +# to change to this directory before starting. +# c.Global.work_dir = os.getcwd() + +#----------------------------------------------------------------------------- +# MPI configuration +#----------------------------------------------------------------------------- + +# Upon starting the engine can be configured to call MPI_Init. This section +# configures that. + +# Select which MPI section to execute to setup MPI. The value of this +# attribute must match the name of another attribute in the MPI config +# section (mpi4py, pytrilinos, etc.). This can also be set by the --mpi +# command line option. +# c.MPI.use = '' + +# Initialize MPI using mpi4py. To use this, set c.MPI.use = 'mpi4py' to use +# --mpi=mpi4py at the command line. +# c.MPI.mpi4py = """from mpi4py import MPI as mpi +# mpi.size = mpi.COMM_WORLD.Get_size() +# mpi.rank = mpi.COMM_WORLD.Get_rank() +# """ + +# Initialize MPI using pytrilinos. To use this, set c.MPI.use = 'pytrilinos' +# to use --mpi=pytrilinos at the command line. +# c.MPI.pytrilinos = """from PyTrilinos import Epetra +# class SimpleStruct: +# pass +# mpi = SimpleStruct() +# mpi.rank = 0 +# mpi.size = 0 +# """ + +#----------------------------------------------------------------------------- +# Developer level configuration attributes +#----------------------------------------------------------------------------- + +# You shouldn't have to modify anything in this section. These attributes +# are more for developers who want to change the behavior of the controller +# at a fundamental level. + +# You should not have to change these attributes. + +# c.Global.shell_class = 'IPython.kernel.core.interpreter.Interpreter' + +# c.Global.furl_file_name = u'ipcontroller-engine.furl' + + + + + + +