ipcluster_config.py
198 lines
| 7.6 KiB
| text/x-python
|
PythonLexer
Brian Granger
|
r2304 | import os | ||
c = get_config() | ||||
Brian Granger
|
r2310 | #----------------------------------------------------------------------------- | ||
# 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 PBS | ||||
# * Start using SSH (currently broken) | ||||
# The selected launchers can be configured below. | ||||
# Options are (LocalControllerLauncher, MPIExecControllerLauncher, | ||||
bgranger
|
r2327 | # PBSControllerLauncher, WindowsHPCControllerLauncher) | ||
Brian Granger
|
r2304 | # c.Global.controller_launcher = 'IPython.kernel.launcher.LocalControllerLauncher' | ||
Brian Granger
|
r2310 | # Options are (LocalEngineSetLauncher, MPIExecEngineSetLauncher, | ||
# PBSEngineSetLauncher) | ||||
Brian Granger
|
r2304 | # c.Global.engine_launcher = 'IPython.kernel.launcher.LocalEngineSetLauncher' | ||
Brian Granger
|
r2310 | #----------------------------------------------------------------------------- | ||
# Global configuration | ||||
#----------------------------------------------------------------------------- | ||||
# The default number of engine that will be started. This is overridden by | ||||
# the -n command line option: "ipcluster start -n 4" | ||||
Brian Granger
|
r2304 | # c.Global.n = 2 | ||
Brian Granger
|
r2310 | # Log to a file in cluster_dir/log, otherwise just log to sys.stdout. | ||
# c.Global.log_to_file = False | ||||
Brian Granger
|
r2304 | |||
Brian Granger
|
r2310 | # Remove old logs from cluster_dir/log before starting. | ||
# c.Global.clean_logs = True | ||||
Brian Granger
|
r2304 | |||
Brian Granger
|
r2330 | # The working directory for the process. The application will use os.chdir | ||
# to change to this directory before starting. | ||||
# c.Global.working_dir = os.getcwd() | ||||
Brian Granger
|
r2310 | #----------------------------------------------------------------------------- | ||
# Controller launcher configuration | ||||
#----------------------------------------------------------------------------- | ||||
Brian Granger
|
r2304 | |||
Brian Granger
|
r2310 | # Configure how the controller is started. The configuration of the controller | ||
# can also bet setup by editing the controller config file: | ||||
# ipcontroller_config.py | ||||
Brian Granger
|
r2304 | |||
Brian Granger
|
r2310 | # The command line arguments to call the controller with. | ||
# c.LocalControllerLauncher.controller_args = \ | ||||
# ['--log-to-file','--log-level', '40'] | ||||
# The mpiexec/mpirun command to use in started the controller. | ||||
Brian Granger
|
r2304 | # c.MPIExecControllerLauncher.mpi_cmd = ['mpiexec'] | ||
Brian Granger
|
r2310 | |||
# Additional arguments to pass to the actual mpiexec command. | ||||
Brian Granger
|
r2304 | # c.MPIExecControllerLauncher.mpi_args = [] | ||
Brian Granger
|
r2310 | # The command line argument to call the controller with. | ||
# c.MPIExecControllerLauncher.controller_args = \ | ||||
# ['--log-to-file','--log-level', '40'] | ||||
# The command line program to use to submit a PBS job. | ||||
Brian Granger
|
r2304 | # c.PBSControllerLauncher.submit_command = 'qsub' | ||
Brian Granger
|
r2310 | |||
# The command line program to use to delete a PBS job. | ||||
Brian Granger
|
r2304 | # c.PBSControllerLauncher.delete_command = 'qdel' | ||
Brian Granger
|
r2310 | |||
# A regular expression that takes the output of qsub and find the job id. | ||||
Brian Granger
|
r2304 | # c.PBSControllerLauncher.job_id_regexp = '\d+' | ||
Brian Granger
|
r2310 | |||
# 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 ${profile} for | ||||
# the controller profile or ${cluster_dir} for the cluster_dir. | ||||
Brian Granger
|
r2304 | # c.PBSControllerLauncher.batch_template = """""" | ||
Brian Granger
|
r2310 | # 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' | ||||
#----------------------------------------------------------------------------- | ||||
bgranger
|
r2327 | # Windows HPC Server 2008 launcher configuration | ||
#----------------------------------------------------------------------------- | ||||
# c.WinHPCJob.username = 'DOMAIN\\user' | ||||
# c.WinHPCJob.priority = 'Highest' | ||||
# c.WinHPCJob.requested_nodes = '' | ||||
# c.WinHPCJob.project = '' | ||||
# c.WinHPCJob.is_exclusive = False | ||||
# c.WinHPCTask.environment_variables = {} | ||||
# c.WinHPCTask.work_directory = '' | ||||
# c.WinHPCTask.is_rerunnable = True | ||||
# c.IPControllerTask.task_name = 'IPController' | ||||
Brian Granger
|
r2328 | # c.IPControllerTask.controller_cmd = [u'ipcontroller.exe'] | ||
bgranger
|
r2327 | # c.IPControllerTask.controller_args = ['--log-to-file', '--log-level', '40'] | ||
# c.IPControllerTask.environment_variables = {} | ||||
# c.IPEngineTask.task_name = 'IPController' | ||||
Brian Granger
|
r2328 | # c.IPEngineTask.engine_cmd = [u'ipengine.exe'] | ||
bgranger
|
r2327 | # c.IPEngineTask.engine_args = ['--log-to-file', '--log-level', '40'] | ||
# c.IPEngineTask.environment_variables = {} | ||||
# c.WindowsHPCLauncher.scheduler = 'HEADNODE' | ||||
# c.WindowsHPCLauncher.username = '\\DOMAIN\USERNAME' | ||||
# c.WindowsHPCLauncher.priority = 'Highest' | ||||
# c.WindowsHPCLauncher.requested_nodes = '' | ||||
# c.WindowsHPCLauncher.job_file_name = u'ipython_job.xml' | ||||
# c.WindowsHPCLauncher.project = 'MyProject' | ||||
# c.WindowsHPCControllerLauncher.scheduler = 'HEADNODE' | ||||
# c.WindowsHPCControllerLauncher.username = '\\DOMAIN\USERNAME' | ||||
# c.WindowsHPCControllerLauncher.priority = 'Highest' | ||||
# c.WindowsHPCControllerLauncher.requested_nodes = '' | ||||
# c.WindowsHPCControllerLauncher.job_file_name = u'ipcontroller_job.xml' | ||||
# c.WindowsHPCControllerLauncher.project = 'MyProject' | ||||
#----------------------------------------------------------------------------- | ||||
Brian Granger
|
r2310 | # Engine launcher configuration | ||
#----------------------------------------------------------------------------- | ||||
Brian Granger
|
r2304 | |||
Brian Granger
|
r2310 | # Command line argument passed to the engines. | ||
# c.LocalEngineSetLauncher.engine_args = ['--log-to-file','--log-level', '40'] | ||||
Brian Granger
|
r2304 | |||
Brian Granger
|
r2310 | # The mpiexec/mpirun command to use in started the controller. | ||
Brian Granger
|
r2304 | # c.MPIExecEngineSetLauncher.mpi_cmd = ['mpiexec'] | ||
Brian Granger
|
r2310 | |||
# Additional arguments to pass to the actual mpiexec command. | ||||
Brian Granger
|
r2304 | # c.MPIExecEngineSetLauncher.mpi_args = [] | ||
Brian Granger
|
r2310 | |||
# 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. | ||||
Brian Granger
|
r2304 | # c.MPIExecEngineSetLauncher.n = 1 | ||
Brian Granger
|
r2310 | # The command line program to use to submit a PBS job. | ||
Brian Granger
|
r2304 | # c.PBSEngineSetLauncher.submit_command = 'qsub' | ||
Brian Granger
|
r2310 | |||
# The command line program to use to delete a PBS job. | ||||
Brian Granger
|
r2304 | # c.PBSEngineSetLauncher.delete_command = 'qdel' | ||
Brian Granger
|
r2310 | |||
# A regular expression that takes the output of qsub and find the job id. | ||||
Brian Granger
|
r2304 | # c.PBSEngineSetLauncher.job_id_regexp = '\d+' | ||
Brian Granger
|
r2310 | |||
# 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, ${profile} or the engine profile and ${cluster_dir} | ||||
# for the cluster_dir. | ||||
Brian Granger
|
r2304 | # c.PBSEngineSetLauncher.batch_template = """""" | ||
Brian Granger
|
r2310 | |||
# 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' | ||||
#----------------------------------------------------------------------------- | ||||
# Base launcher configuration | ||||
#----------------------------------------------------------------------------- | ||||
# The various launchers are organized into an inheritance hierarchy. | ||||
# The configurations can also be iherited and the following attributes | ||||
# allow you to configure the base classes. | ||||
# c.MPIExecLauncher.mpi_cmd = ['mpiexec'] | ||||
# c.MPIExecLauncher.mpi_args = [] | ||||
# c.MPIExecLauncher.program = [] | ||||
# c.MPIExecLauncher.program_args = [] | ||||
# c.MPIExecLauncher.n = 1 | ||||
# c.SSHLauncher.ssh_cmd = ['ssh'] | ||||
# c.SSHLauncher.ssh_args = [] | ||||
# c.SSHLauncher.program = [] | ||||
# s.SSHLauncher.program_args = [] | ||||
# c.SSHLauncher.hostname = '' | ||||
# c.SSHLauncher.user = os.environ['USER'] | ||||
# c.BatchSystemLauncher.submit_command | ||||
# c.BatchSystemLauncher.delete_command | ||||
# c.BatchSystemLauncher.job_id_regexp | ||||
# c.BatchSystemLauncher.batch_template | ||||
# c.BatchSystemLauncher.batch_file_name | ||||
# c.PBSLauncher.submit_command = 'qsub' | ||||
# c.PBSLauncher.delete_command = 'qdel' | ||||
# c.PBSLauncher.job_id_regexp = '\d+' | ||||
# c.PBSLauncher.batch_template = """""" | ||||
# c.PBSLauncher.batch_file_name = u'pbs_batch_script' | ||||
Brian Granger
|
r2304 | |||