Show More
@@ -0,0 +1,184 b'' | |||
|
1 | import os | |
|
2 | ||
|
3 | c = get_config() | |
|
4 | ||
|
5 | #----------------------------------------------------------------------------- | |
|
6 | # Select which launchers to use | |
|
7 | #----------------------------------------------------------------------------- | |
|
8 | ||
|
9 | # This allows you to control what method is used to start the controller | |
|
10 | # and engines. The following methods are currently supported: | |
|
11 | # - Start as a regular process on localhost. | |
|
12 | # - Start using mpiexec. | |
|
13 | # - Start using the Windows HPC Server 2008 scheduler | |
|
14 | # - Start using PBS | |
|
15 | # - Start using SSH (currently broken) | |
|
16 | ||
|
17 | ||
|
18 | # The selected launchers can be configured below. | |
|
19 | ||
|
20 | # Options are: | |
|
21 | # - LocalControllerLauncher | |
|
22 | # - MPIExecControllerLauncher | |
|
23 | # - PBSControllerLauncher | |
|
24 | # - WindowsHPCControllerLauncher | |
|
25 | # c.Global.controller_launcher = 'IPython.kernel.launcher.LocalControllerLauncher' | |
|
26 | ||
|
27 | # Options are: | |
|
28 | # - LocalEngineSetLauncher | |
|
29 | # - MPIExecEngineSetLauncher | |
|
30 | # - PBSEngineSetLauncher | |
|
31 | # - WindowsHPCEngineSetLauncher | |
|
32 | # c.Global.engine_launcher = 'IPython.kernel.launcher.LocalEngineSetLauncher' | |
|
33 | ||
|
34 | #----------------------------------------------------------------------------- | |
|
35 | # Global configuration | |
|
36 | #----------------------------------------------------------------------------- | |
|
37 | ||
|
38 | # The default number of engines that will be started. This is overridden by | |
|
39 | # the -n command line option: "ipcluster start -n 4" | |
|
40 | # c.Global.n = 2 | |
|
41 | ||
|
42 | # Log to a file in cluster_dir/log, otherwise just log to sys.stdout. | |
|
43 | # c.Global.log_to_file = False | |
|
44 | ||
|
45 | # Remove old logs from cluster_dir/log before starting. | |
|
46 | # c.Global.clean_logs = True | |
|
47 | ||
|
48 | # The working directory for the process. The application will use os.chdir | |
|
49 | # to change to this directory before starting. | |
|
50 | # c.Global.work_dir = os.getcwd() | |
|
51 | ||
|
52 | ||
|
53 | #----------------------------------------------------------------------------- | |
|
54 | # Local process launchers | |
|
55 | #----------------------------------------------------------------------------- | |
|
56 | ||
|
57 | # The command line arguments to call the controller with. | |
|
58 | # c.LocalControllerLauncher.controller_args = \ | |
|
59 | # ['--log-to-file','--log-level', '40'] | |
|
60 | ||
|
61 | # The working directory for the controller | |
|
62 | # c.LocalEngineSetLauncher.work_dir = u'' | |
|
63 | ||
|
64 | # Command line argument passed to the engines. | |
|
65 | # c.LocalEngineSetLauncher.engine_args = ['--log-to-file','--log-level', '40'] | |
|
66 | ||
|
67 | #----------------------------------------------------------------------------- | |
|
68 | # MPIExec launchers | |
|
69 | #----------------------------------------------------------------------------- | |
|
70 | ||
|
71 | # The mpiexec/mpirun command to use in started the controller. | |
|
72 | # c.MPIExecControllerLauncher.mpi_cmd = ['mpiexec'] | |
|
73 | ||
|
74 | # Additional arguments to pass to the actual mpiexec command. | |
|
75 | # c.MPIExecControllerLauncher.mpi_args = [] | |
|
76 | ||
|
77 | # The command line argument to call the controller with. | |
|
78 | # c.MPIExecControllerLauncher.controller_args = \ | |
|
79 | # ['--log-to-file','--log-level', '40'] | |
|
80 | ||
|
81 | ||
|
82 | # The mpiexec/mpirun command to use in started the controller. | |
|
83 | # c.MPIExecEngineSetLauncher.mpi_cmd = ['mpiexec'] | |
|
84 | ||
|
85 | # Additional arguments to pass to the actual mpiexec command. | |
|
86 | # c.MPIExecEngineSetLauncher.mpi_args = [] | |
|
87 | ||
|
88 | # Command line argument passed to the engines. | |
|
89 | # c.MPIExecEngineSetLauncher.engine_args = ['--log-to-file','--log-level', '40'] | |
|
90 | ||
|
91 | # The default number of engines to start if not given elsewhere. | |
|
92 | # c.MPIExecEngineSetLauncher.n = 1 | |
|
93 | ||
|
94 | #----------------------------------------------------------------------------- | |
|
95 | # SSH launchers | |
|
96 | #----------------------------------------------------------------------------- | |
|
97 | ||
|
98 | # Todo | |
|
99 | ||
|
100 | ||
|
101 | #----------------------------------------------------------------------------- | |
|
102 | # Unix batch (PBS) schedulers launchers | |
|
103 | #----------------------------------------------------------------------------- | |
|
104 | ||
|
105 | # The command line program to use to submit a PBS job. | |
|
106 | # c.PBSControllerLauncher.submit_command = 'qsub' | |
|
107 | ||
|
108 | # The command line program to use to delete a PBS job. | |
|
109 | # c.PBSControllerLauncher.delete_command = 'qdel' | |
|
110 | ||
|
111 | # A regular expression that takes the output of qsub and find the job id. | |
|
112 | # c.PBSControllerLauncher.job_id_regexp = r'\d+' | |
|
113 | ||
|
114 | # The batch submission script used to start the controller. This is where | |
|
115 | # environment variables would be setup, etc. This string is interpolated using | |
|
116 | # the Itpl module in IPython.external. Basically, you can use ${n} for the | |
|
117 | # number of engine and ${cluster_dir} for the cluster_dir. | |
|
118 | # c.PBSControllerLauncher.batch_template = """""" | |
|
119 | ||
|
120 | # The name of the instantiated batch script that will actually be used to | |
|
121 | # submit the job. This will be written to the cluster directory. | |
|
122 | # c.PBSControllerLauncher.batch_file_name = u'pbs_batch_script_controller' | |
|
123 | ||
|
124 | ||
|
125 | # The command line program to use to submit a PBS job. | |
|
126 | # c.PBSEngineSetLauncher.submit_command = 'qsub' | |
|
127 | ||
|
128 | # The command line program to use to delete a PBS job. | |
|
129 | # c.PBSEngineSetLauncher.delete_command = 'qdel' | |
|
130 | ||
|
131 | # A regular expression that takes the output of qsub and find the job id. | |
|
132 | # c.PBSEngineSetLauncher.job_id_regexp = r'\d+' | |
|
133 | ||
|
134 | # The batch submission script used to start the engines. This is where | |
|
135 | # environment variables would be setup, etc. This string is interpolated using | |
|
136 | # the Itpl module in IPython.external. Basically, you can use ${n} for the | |
|
137 | # number of engine and ${cluster_dir} for the cluster_dir. | |
|
138 | # c.PBSEngineSetLauncher.batch_template = """""" | |
|
139 | ||
|
140 | # The name of the instantiated batch script that will actually be used to | |
|
141 | # submit the job. This will be written to the cluster directory. | |
|
142 | # c.PBSEngineSetLauncher.batch_file_name = u'pbs_batch_script_engines' | |
|
143 | ||
|
144 | #----------------------------------------------------------------------------- | |
|
145 | # Windows HPC Server 2008 launcher configuration | |
|
146 | #----------------------------------------------------------------------------- | |
|
147 | ||
|
148 | # c.IPControllerJob.job_name = 'IPController' | |
|
149 | # c.IPControllerJob.is_exclusive = False | |
|
150 | # c.IPControllerJob.username = r'USERDOMAIN\USERNAME' | |
|
151 | # c.IPControllerJob.priority = 'Highest' | |
|
152 | # c.IPControllerJob.requested_nodes = '' | |
|
153 | # c.IPControllerJob.project = 'MyProject' | |
|
154 | ||
|
155 | # c.IPControllerTask.task_name = 'IPController' | |
|
156 | # c.IPControllerTask.controller_cmd = [u'ipcontroller.exe'] | |
|
157 | # c.IPControllerTask.controller_args = ['--log-to-file', '--log-level', '40'] | |
|
158 | # c.IPControllerTask.environment_variables = {} | |
|
159 | ||
|
160 | # c.WindowsHPCControllerLauncher.scheduler = 'HEADNODE' | |
|
161 | # c.WindowsHPCControllerLauncher.job_file_name = u'ipcontroller_job.xml' | |
|
162 | ||
|
163 | ||
|
164 | # c.IPEngineSetJob.job_name = 'IPEngineSet' | |
|
165 | # c.IPEngineSetJob.is_exclusive = False | |
|
166 | # c.IPEngineSetJob.username = r'USERDOMAIN\USERNAME' | |
|
167 | # c.IPEngineSetJob.priority = 'Highest' | |
|
168 | # c.IPEngineSetJob.requested_nodes = '' | |
|
169 | # c.IPEngineSetJob.project = 'MyProject' | |
|
170 | ||
|
171 | # c.IPEngineTask.task_name = 'IPEngine' | |
|
172 | # c.IPEngineTask.engine_cmd = [u'ipengine.exe'] | |
|
173 | # c.IPEngineTask.engine_args = ['--log-to-file', '--log-level', '40'] | |
|
174 | # c.IPEngineTask.environment_variables = {} | |
|
175 | ||
|
176 | # c.WindowsHPCEngineSetLauncher.scheduler = 'HEADNODE' | |
|
177 | # c.WindowsHPCEngineSetLauncher.job_file_name = u'ipengineset_job.xml' | |
|
178 | ||
|
179 | ||
|
180 | ||
|
181 | ||
|
182 | ||
|
183 | ||
|
184 |
@@ -0,0 +1,136 b'' | |||
|
1 | from IPython.config.loader import Config | |
|
2 | ||
|
3 | c = get_config() | |
|
4 | ||
|
5 | #----------------------------------------------------------------------------- | |
|
6 | # Global configuration | |
|
7 | #----------------------------------------------------------------------------- | |
|
8 | ||
|
9 | # Basic Global config attributes | |
|
10 | ||
|
11 | # Start up messages are logged to stdout using the logging module. | |
|
12 | # These all happen before the twisted reactor is started and are | |
|
13 | # useful for debugging purposes. Can be (10=DEBUG,20=INFO,30=WARN,40=CRITICAL) | |
|
14 | # and smaller is more verbose. | |
|
15 | # c.Global.log_level = 20 | |
|
16 | ||
|
17 | # Log to a file in cluster_dir/log, otherwise just log to sys.stdout. | |
|
18 | # c.Global.log_to_file = False | |
|
19 | ||
|
20 | # Remove old logs from cluster_dir/log before starting. | |
|
21 | # c.Global.clean_logs = True | |
|
22 | ||
|
23 | # A list of Python statements that will be run before starting the | |
|
24 | # controller. This is provided because occasionally certain things need to | |
|
25 | # be imported in the controller for pickling to work. | |
|
26 | # c.Global.import_statements = ['import math'] | |
|
27 | ||
|
28 | # Reuse the controller's FURL files. If False, FURL files are regenerated | |
|
29 | # each time the controller is run. If True, they will be reused, *but*, you | |
|
30 | # also must set the network ports by hand. If set, this will override the | |
|
31 | # values set for the client and engine connections below. | |
|
32 | # c.Global.reuse_furls = True | |
|
33 | ||
|
34 | # Enable SSL encryption on all connections to the controller. If set, this | |
|
35 | # will override the values set for the client and engine connections below. | |
|
36 | # c.Global.secure = True | |
|
37 | ||
|
38 | # The working directory for the process. The application will use os.chdir | |
|
39 | # to change to this directory before starting. | |
|
40 | # c.Global.work_dir = os.getcwd() | |
|
41 | ||
|
42 | #----------------------------------------------------------------------------- | |
|
43 | # Configure the client services | |
|
44 | #----------------------------------------------------------------------------- | |
|
45 | ||
|
46 | # Basic client service config attributes | |
|
47 | ||
|
48 | # The network interface the controller will listen on for client connections. | |
|
49 | # This should be an IP address or hostname of the controller's host. The empty | |
|
50 | # string means listen on all interfaces. | |
|
51 | # c.FCClientServiceFactory.ip = '' | |
|
52 | ||
|
53 | # The TCP/IP port the controller will listen on for client connections. If 0 | |
|
54 | # a random port will be used. If the controller's host has a firewall running | |
|
55 | # it must allow incoming traffic on this port. | |
|
56 | # c.FCClientServiceFactory.port = 0 | |
|
57 | ||
|
58 | # The client learns how to connect to the controller by looking at the | |
|
59 | # location field embedded in the FURL. If this field is empty, all network | |
|
60 | # interfaces that the controller is listening on will be listed. To have the | |
|
61 | # client connect on a particular interface, list it here. | |
|
62 | # c.FCClientServiceFactory.location = '' | |
|
63 | ||
|
64 | # Use SSL encryption for the client connection. | |
|
65 | # c.FCClientServiceFactory.secure = True | |
|
66 | ||
|
67 | # Reuse the client FURL each time the controller is started. If set, you must | |
|
68 | # also pick a specific network port above (FCClientServiceFactory.port). | |
|
69 | # c.FCClientServiceFactory.reuse_furls = False | |
|
70 | ||
|
71 | #----------------------------------------------------------------------------- | |
|
72 | # Configure the engine services | |
|
73 | #----------------------------------------------------------------------------- | |
|
74 | ||
|
75 | # Basic config attributes for the engine services. | |
|
76 | ||
|
77 | # The network interface the controller will listen on for engine connections. | |
|
78 | # This should be an IP address or hostname of the controller's host. The empty | |
|
79 | # string means listen on all interfaces. | |
|
80 | # c.FCEngineServiceFactory.ip = '' | |
|
81 | ||
|
82 | # The TCP/IP port the controller will listen on for engine connections. If 0 | |
|
83 | # a random port will be used. If the controller's host has a firewall running | |
|
84 | # it must allow incoming traffic on this port. | |
|
85 | # c.FCEngineServiceFactory.port = 0 | |
|
86 | ||
|
87 | # The engine learns how to connect to the controller by looking at the | |
|
88 | # location field embedded in the FURL. If this field is empty, all network | |
|
89 | # interfaces that the controller is listening on will be listed. To have the | |
|
90 | # client connect on a particular interface, list it here. | |
|
91 | # c.FCEngineServiceFactory.location = '' | |
|
92 | ||
|
93 | # Use SSL encryption for the engine connection. | |
|
94 | # c.FCEngineServiceFactory.secure = True | |
|
95 | ||
|
96 | # Reuse the client FURL each time the controller is started. If set, you must | |
|
97 | # also pick a specific network port above (FCClientServiceFactory.port). | |
|
98 | # c.FCEngineServiceFactory.reuse_furls = False | |
|
99 | ||
|
100 | #----------------------------------------------------------------------------- | |
|
101 | # Developer level configuration attributes | |
|
102 | #----------------------------------------------------------------------------- | |
|
103 | ||
|
104 | # You shouldn't have to modify anything in this section. These attributes | |
|
105 | # are more for developers who want to change the behavior of the controller | |
|
106 | # at a fundamental level. | |
|
107 | ||
|
108 | # c.FCClientServiceFactory.cert_file = u'ipcontroller-client.pem' | |
|
109 | ||
|
110 | # default_client_interfaces = Config() | |
|
111 | # default_client_interfaces.Task.interface_chain = [ | |
|
112 | # 'IPython.kernel.task.ITaskController', | |
|
113 | # 'IPython.kernel.taskfc.IFCTaskController' | |
|
114 | # ] | |
|
115 | # | |
|
116 | # default_client_interfaces.Task.furl_file = u'ipcontroller-tc.furl' | |
|
117 | # | |
|
118 | # default_client_interfaces.MultiEngine.interface_chain = [ | |
|
119 | # 'IPython.kernel.multiengine.IMultiEngine', | |
|
120 | # 'IPython.kernel.multienginefc.IFCSynchronousMultiEngine' | |
|
121 | # ] | |
|
122 | # | |
|
123 | # default_client_interfaces.MultiEngine.furl_file = u'ipcontroller-mec.furl' | |
|
124 | # | |
|
125 | # c.FCEngineServiceFactory.interfaces = default_client_interfaces | |
|
126 | ||
|
127 | # c.FCEngineServiceFactory.cert_file = u'ipcontroller-engine.pem' | |
|
128 | ||
|
129 | # default_engine_interfaces = Config() | |
|
130 | # default_engine_interfaces.Default.interface_chain = [ | |
|
131 | # 'IPython.kernel.enginefc.IFCControllerBase' | |
|
132 | # ] | |
|
133 | # | |
|
134 | # default_engine_interfaces.Default.furl_file = u'ipcontroller-engine.furl' | |
|
135 | # | |
|
136 | # c.FCEngineServiceFactory.interfaces = default_engine_interfaces |
@@ -0,0 +1,90 b'' | |||
|
1 | c = get_config() | |
|
2 | ||
|
3 | #----------------------------------------------------------------------------- | |
|
4 | # Global configuration | |
|
5 | #----------------------------------------------------------------------------- | |
|
6 | ||
|
7 | # Start up messages are logged to stdout using the logging module. | |
|
8 | # These all happen before the twisted reactor is started and are | |
|
9 | # useful for debugging purposes. Can be (10=DEBUG,20=INFO,30=WARN,40=CRITICAL) | |
|
10 | # and smaller is more verbose. | |
|
11 | # c.Global.log_level = 20 | |
|
12 | ||
|
13 | # Log to a file in cluster_dir/log, otherwise just log to sys.stdout. | |
|
14 | # c.Global.log_to_file = False | |
|
15 | ||
|
16 | # Remove old logs from cluster_dir/log before starting. | |
|
17 | # c.Global.clean_logs = True | |
|
18 | ||
|
19 | # A list of strings that will be executed in the users namespace on the engine | |
|
20 | # before it connects to the controller. | |
|
21 | # c.Global.exec_lines = ['import numpy'] | |
|
22 | ||
|
23 | # The engine will try to connect to the controller multiple times, to allow | |
|
24 | # the controller time to startup and write its FURL file. These parameters | |
|
25 | # control the number of retries (connect_max_tries) and the initial delay | |
|
26 | # (connect_delay) between attemps. The actual delay between attempts gets | |
|
27 | # longer each time by a factor of 1.5 (delay[i] = 1.5*delay[i-1]) | |
|
28 | # those attemps. | |
|
29 | # c.Global.connect_delay = 0.1 | |
|
30 | # c.Global.connect_max_tries = 15 | |
|
31 | ||
|
32 | # By default, the engine will look for the controller's FURL file in its own | |
|
33 | # cluster directory. Sometimes, the FURL file will be elsewhere and this | |
|
34 | # attribute can be set to the full path of the FURL file. | |
|
35 | # c.Global.furl_file = u'' | |
|
36 | ||
|
37 | # The working directory for the process. The application will use os.chdir | |
|
38 | # to change to this directory before starting. | |
|
39 | # c.Global.work_dir = os.getcwd() | |
|
40 | ||
|
41 | #----------------------------------------------------------------------------- | |
|
42 | # MPI configuration | |
|
43 | #----------------------------------------------------------------------------- | |
|
44 | ||
|
45 | # Upon starting the engine can be configured to call MPI_Init. This section | |
|
46 | # configures that. | |
|
47 | ||
|
48 | # Select which MPI section to execute to setup MPI. The value of this | |
|
49 | # attribute must match the name of another attribute in the MPI config | |
|
50 | # section (mpi4py, pytrilinos, etc.). This can also be set by the --mpi | |
|
51 | # command line option. | |
|
52 | # c.MPI.use = '' | |
|
53 | ||
|
54 | # Initialize MPI using mpi4py. To use this, set c.MPI.use = 'mpi4py' to use | |
|
55 | # --mpi=mpi4py at the command line. | |
|
56 | # c.MPI.mpi4py = """from mpi4py import MPI as mpi | |
|
57 | # mpi.size = mpi.COMM_WORLD.Get_size() | |
|
58 | # mpi.rank = mpi.COMM_WORLD.Get_rank() | |
|
59 | # """ | |
|
60 | ||
|
61 | # Initialize MPI using pytrilinos. To use this, set c.MPI.use = 'pytrilinos' | |
|
62 | # to use --mpi=pytrilinos at the command line. | |
|
63 | # c.MPI.pytrilinos = """from PyTrilinos import Epetra | |
|
64 | # class SimpleStruct: | |
|
65 | # pass | |
|
66 | # mpi = SimpleStruct() | |
|
67 | # mpi.rank = 0 | |
|
68 | # mpi.size = 0 | |
|
69 | # """ | |
|
70 | ||
|
71 | #----------------------------------------------------------------------------- | |
|
72 | # Developer level configuration attributes | |
|
73 | #----------------------------------------------------------------------------- | |
|
74 | ||
|
75 | # You shouldn't have to modify anything in this section. These attributes | |
|
76 | # are more for developers who want to change the behavior of the controller | |
|
77 | # at a fundamental level. | |
|
78 | ||
|
79 | # You should not have to change these attributes. | |
|
80 | ||
|
81 | # c.Global.shell_class = 'IPython.kernel.core.interpreter.Interpreter' | |
|
82 | ||
|
83 | # c.Global.furl_file_name = u'ipcontroller-engine.furl' | |
|
84 | ||
|
85 | ||
|
86 | ||
|
87 | ||
|
88 | ||
|
89 | ||
|
90 |
General Comments 0
You need to be logged in to leave comments.
Login now