コード例 #1
0
    def _add_arguments(self):
        super(IPEngineAppConfigLoader, self)._add_arguments()
        paa = self.parser.add_argument
        # Controller config
        paa('--file',
            '-f',
            type=unicode,
            dest='Global.url_file',
            help=
            'The full location of the file containing the connection information fo '
            'controller. If this is not given, the file must be in the '
            'security directory of the cluster directory.  This location is '
            'resolved using the --profile and --app-dir options.',
            metavar='Global.url_file')
        # MPI
        paa('--mpi',
            type=str,
            dest='MPI.use',
            help=
            'How to enable MPI (mpi4py, pytrilinos, or empty string to disable).',
            metavar='MPI.use')
        # Global config
        paa('--log-to-file',
            action='store_true',
            dest='Global.log_to_file',
            help='Log to a file in the log directory (default is stdout)')
        paa('--log-url',
            dest='Global.log_url',
            help="url of ZMQ logger, as started with iploggerz")
        # paa('--execkey',
        #     type=str, dest='Global.exec_key',
        #     help='path to a file containing an execution key.',
        #     metavar='keyfile')
        # paa('--no-secure',
        #     action='store_false', dest='Global.secure',
        #     help='Turn off execution keys.')
        # paa('--secure',
        #     action='store_true', dest='Global.secure',
        #     help='Turn on execution keys (default).')
        # init command
        paa('-c',
            type=str,
            dest='Global.extra_exec_lines',
            help='specify a command to be run at startup')
        paa('-s',
            type=unicode,
            dest='Global.extra_exec_file',
            help='specify a script to be run at startup')

        factory.add_session_arguments(self.parser)
        factory.add_registration_arguments(self.parser)
コード例 #2
0
ファイル: ipengineapp.py プロジェクト: addisonc/ipython
 def _add_arguments(self):
     super(IPEngineAppConfigLoader, self)._add_arguments()
     paa = self.parser.add_argument
     # Controller config
     paa('--file', '-f',
         type=unicode, dest='Global.url_file',
         help='The full location of the file containing the connection information fo '
         'controller. If this is not given, the file must be in the '
         'security directory of the cluster directory.  This location is '
         'resolved using the --profile and --app-dir options.',
         metavar='Global.url_file')
     # MPI
     paa('--mpi',
         type=str, dest='MPI.use',
         help='How to enable MPI (mpi4py, pytrilinos, or empty string to disable).',
         metavar='MPI.use')
     # Global config
     paa('--log-to-file',
         action='store_true', dest='Global.log_to_file',
         help='Log to a file in the log directory (default is stdout)')
     paa('--log-url',
         dest='Global.log_url',
         help="url of ZMQ logger, as started with iploggerz")
     # paa('--execkey',
     #     type=str, dest='Global.exec_key',
     #     help='path to a file containing an execution key.',
     #     metavar='keyfile')
     # paa('--no-secure',
     #     action='store_false', dest='Global.secure',
     #     help='Turn off execution keys.')
     # paa('--secure',
     #     action='store_true', dest='Global.secure',
     #     help='Turn on execution keys (default).')
     # init command
     paa('-c',
         type=str, dest='Global.extra_exec_lines',
         help='specify a command to be run at startup')
     paa('-s',
         type=unicode, dest='Global.extra_exec_file',
         help='specify a script to be run at startup')
     
     factory.add_session_arguments(self.parser)
     factory.add_registration_arguments(self.parser)
コード例 #3
0
 def _add_arguments(self):
     super(IPControllerAppConfigLoader, self)._add_arguments()
     paa = self.parser.add_argument
     
     ## Hub Config:
     paa('--mongodb', 
         dest='HubFactory.db_class', action='store_const',
         const='IPython.parallel.controller.mongodb.MongoDB', 
         help='Use MongoDB for task storage [default: in-memory]')
     paa('--sqlite', 
         dest='HubFactory.db_class', action='store_const',
         const='IPython.parallel.controller.sqlitedb.SQLiteDB',
         help='Use SQLite3 for DB task storage [default: in-memory]')
     paa('--hb',
         type=int, dest='HubFactory.hb', nargs=2,
         help='The (2) ports the Hub\'s Heartmonitor will use for the heartbeat '
         'connections [default: random]',
         metavar='Hub.hb_ports')
     paa('--ping',
         type=int, dest='HubFactory.ping',
         help='The frequency at which the Hub pings the engines for heartbeats '
         ' (in ms) [default: 100]',
         metavar='Hub.ping')
     
     # Client config
     paa('--client-ip',
         type=str, dest='HubFactory.client_ip', 
         help='The IP address or hostname the Hub will listen on for '
         'client connections. Both engine-ip and client-ip can be set simultaneously '
         'via --ip [default: loopback]',
         metavar='Hub.client_ip')
     paa('--client-transport',
         type=str, dest='HubFactory.client_transport', 
         help='The ZeroMQ transport the Hub will use for '
         'client connections. Both engine-transport and client-transport can be set simultaneously '
         'via --transport [default: tcp]',
         metavar='Hub.client_transport')
     paa('--query',
         type=int, dest='HubFactory.query_port', 
         help='The port on which the Hub XREP socket will listen for result queries from clients [default: random]',
         metavar='Hub.query_port')
     paa('--notifier',
         type=int, dest='HubFactory.notifier_port', 
         help='The port on which the Hub PUB socket will listen for notification connections [default: random]',
         metavar='Hub.notifier_port')
     
     # Engine config
     paa('--engine-ip',
         type=str, dest='HubFactory.engine_ip', 
         help='The IP address or hostname the Hub will listen on for '
         'engine connections. This applies to the Hub and its schedulers'
         'engine-ip and client-ip can be set simultaneously '
         'via --ip [default: loopback]',
         metavar='Hub.engine_ip')
     paa('--engine-transport',
         type=str, dest='HubFactory.engine_transport', 
         help='The ZeroMQ transport the Hub will use for '
         'client connections. Both engine-transport and client-transport can be set simultaneously '
         'via --transport [default: tcp]',
         metavar='Hub.engine_transport')
     
     # Scheduler config
     paa('--mux',
         type=int, dest='ControllerFactory.mux', nargs=2,
         help='The (2) ports the MUX scheduler will listen on for client,engine '
         'connections, respectively [default: random]',
         metavar='Scheduler.mux_ports')
     paa('--task',
         type=int, dest='ControllerFactory.task', nargs=2,
         help='The (2) ports the Task scheduler will listen on for client,engine '
         'connections, respectively [default: random]',
         metavar='Scheduler.task_ports')
     paa('--control',
         type=int, dest='ControllerFactory.control', nargs=2,
         help='The (2) ports the Control scheduler will listen on for client,engine '
         'connections, respectively [default: random]',
         metavar='Scheduler.control_ports')
     paa('--iopub',
         type=int, dest='ControllerFactory.iopub', nargs=2,
         help='The (2) ports the IOPub scheduler will listen on for client,engine '
         'connections, respectively [default: random]',
         metavar='Scheduler.iopub_ports')
         
     paa('--scheme',
         type=str, dest='HubFactory.scheme',
         choices = ['pure', 'lru', 'plainrandom', 'weighted', 'twobin','leastload'],
         help='select the task scheduler scheme  [default: Python LRU]',
         metavar='Scheduler.scheme')
     paa('--usethreads',
         dest='ControllerFactory.usethreads', action="store_true",
         help='Use threads instead of processes for the schedulers',
         )
     paa('--hwm',
         dest='ControllerFactory.hwm', type=int,
         help='specify the High Water Mark (HWM) for the downstream '
         'socket in the pure ZMQ scheduler. This is the maximum number '
         'of allowed outstanding tasks on each engine.',
         )
     
     ## Global config
     paa('--log-to-file',
         action='store_true', dest='Global.log_to_file',
         help='Log to a file in the log directory (default is stdout)')
     paa('--log-url',
         type=str, dest='Global.log_url',
         help='Broadcast logs to an iploggerz process [default: disabled]')
     paa('-r','--reuse-files', 
         action='store_true', dest='Global.reuse_files',
         help='Try to reuse existing json connection files.')
     paa('--no-secure',
         action='store_false', dest='Global.secure',
         help='Turn off execution keys (default).')
     paa('--secure',
         action='store_true', dest='Global.secure',
         help='Turn on execution keys.')
     paa('--execkey',
         type=str, dest='Global.exec_key',
         help='path to a file containing an execution key.',
         metavar='keyfile')
     paa('--ssh',
         type=str, dest='Global.sshserver',
         help='ssh url for clients to use when connecting to the Controller '
         'processes. It should be of the form: [user@]server[:port]. The '
         'Controller\'s listening addresses must be accessible from the ssh server',
         metavar='Global.sshserver')
     paa('--location',
         type=str, dest='Global.location',
         help="The external IP or domain name of this machine, used for disambiguating "
         "engine and client connections.",
         metavar='Global.location')
     factory.add_session_arguments(self.parser)
     factory.add_registration_arguments(self.parser)