Commit b3eec347 authored by Thomas Vincent's avatar Thomas Vincent

add an option to set xsocs wide number of cores from xsocs gui

parent 92d9f3f8
......@@ -27,8 +27,10 @@
from __future__ import absolute_import
import argparse
from multiprocessing import cpu_count
from ..gui import xsocs_main
from .. import config
def main(argv):
......@@ -42,8 +44,16 @@ def main(argv):
'project_file',
nargs=argparse.OPTIONAL,
help='xsocs project file to open')
parser.add_argument(
'--numcores',
nargs='?',
default=cpu_count(),
help='Max number of processes to use')
options = parser.parse_args(argv[1:])
config.DEFAULT_PROCESS_NUMBER = options.numcores
if options.project_file:
xsocs_main(projectH5File=options.project_file)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment