How to use the ipython.launch.set_queue_parser function in ipython

To help you get started, we’ve selected a few ipython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pylada / pylada-light / ipython / launch / single.py View on Github external
def parser(self, subparsers, opalls):
    """ Adds subparser for scattered. """
    from ... import default_comm
    from . import set_queue_parser, set_default_parser_options
    result = subparsers.add_parser('single',
                                   description="Launch current job only.",
                                   parents=[opalls])
    set_default_parser_options(result)
    result.add_argument('--nbprocs', type=str, dest="nbprocs", required=True,
                        help="Total number of processors per pbsjob/jobfolder")
    result.add_argument('--ppn', dest="ppn",
                        default=default_comm.get('ppn', 1), type=int,
                        help="Number of processes per node. Defaults to {0}."
                        .format(default_comm.get('ppn', 1)))
    set_queue_parser(result)
    result.set_defaults(func=launch)
    return result
github pylada / pylada-light / ipython / launch / scattered.py View on Github external
parents=[opalls])
    set_default_parser_options(result)
    result.add_argument('--nbprocs', type=str, default="None", dest="nbprocs",
                        help="Can be an integer, in which case it specifies "
                        "the number of processes to exectute jobs with. "
                        "Can also be a callable taking a JobFolder as "
                        "argument and returning a integer. Will default "
                        "to as many procs as there are atoms in that "
                        "particular structure. Defaults to something "
                        "close to the number of atoms in the structure "
                        "(eg good for VASP). ")
    result.add_argument('--ppn', dest="ppn",
                        default=default_comm.get('ppn', 1), type=int,
                        help="Number of processes per node. Defaults to {0}."
                        .format(default_comm.get('ppn', 1)))
    set_queue_parser(result)
    result.set_defaults(func=launch)
    return result