diff --git a/tools/precommit/entrypoint.sh b/tools/precommit/entrypoint.sh index e40a1c65aa..50fe67f43b 100755 --- a/tools/precommit/entrypoint.sh +++ b/tools/precommit/entrypoint.sh @@ -22,7 +22,7 @@ else git --no-pager log -1 --pretty='%nCommitSHA: %H%nCommitTime: %ci%nCommitAuthor: %an%nCommitSubject: %s%n' echo -e "\n========== Running Precommit Checks ==========" export CP2K_PRECOMMIT_SERVER="http://127.0.0.1:8080" - ./tools/precommit/precommit.py --no-cache --progressbar-wait=10 || true + ./tools/precommit/precommit.py --no-cache --progressbar-wait=10 -j 4 || true fi #EOF diff --git a/tools/precommit/precommit.py b/tools/precommit/precommit.py index 0148aa9af5..47cda35c13 100755 --- a/tools/precommit/precommit.py +++ b/tools/precommit/precommit.py @@ -47,7 +47,7 @@ def main(): "-j", "--num_workers", type=int, - default=min(32, os.cpu_count() + 4), # copied from ThreadPoolExecutor + default=min(16, os.cpu_count() + 2), help="number of parallel workers", ) parser.add_argument( @@ -235,7 +235,7 @@ def run_analyze_src(fn): # ====================================================================================== -def run_local_tool(*cmd, timeout=10): +def run_local_tool(*cmd, timeout=20): p = subprocess.run(cmd, timeout=timeout, stdout=PIPE, stderr=STDOUT) if p.returncode != 0: raise Exception(p.stdout.decode("utf8"))