Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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('scattered',
description="A separate PBS/slurm script is created for each "
"and every calculation in the job-folder "
"(or dictionaries).",
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