diff --git a/bin/yashchiki b/bin/yashchiki index f679741f509b9c71e8285f313163d08bcb4e7e0a..4a904865c621a036ba32228044edbc9b4f10107a 100755 --- a/bin/yashchiki +++ b/bin/yashchiki @@ -55,6 +55,8 @@ all_stages=set(["fetch", "build-base-image", "build-base", "build-spack", "image all_styles = list(os.listdir(os.path.dirname(os.path.realpath(__file__)) + "/../share/yashchiki/styles/")) +count_available_cores = len(os.sched_getaffinity(0)) + # mandatory parser.add_argument( "style", type=str, choices=all_styles, @@ -120,8 +122,9 @@ parser.add_argument( "postfix'ed with an ascending integer.") # optional options parser.add_argument( - "-j", "--jobs", type=int, default=1, - help="Number of parallel jobs to use when concurrent execution of tasks is available.") + "-j", "--jobs", type=int, default=count_available_cores, + help="Number of parallel jobs to use when concurrent execution of " + "tasks is available. Defaults to the number of available cores.") parser.add_argument( "--debug", action="store_true", help="Enable debug-level logging.")