From f9f1317b2942b18dc2429f00759991fd766b5fc2 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 18 Dec 2024 23:45:50 -0500 Subject: [PATCH] benchmarks/{background,ecal_gaps}/Snakefile: redirect dask scheduler/worker to .logs --- benchmarks/backgrounds/Snakefile | 7 +++++-- benchmarks/ecal_gaps/Snakefile | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/benchmarks/backgrounds/Snakefile b/benchmarks/backgrounds/Snakefile index 7aac8808..73221938 100644 --- a/benchmarks/backgrounds/Snakefile +++ b/benchmarks/backgrounds/Snakefile @@ -38,6 +38,9 @@ rule backgrounds_ecal_backwards: proton_beam_gas_sim="sim_output/" + DETECTOR_CONFIG + "/backgrounds/EPIC/EVGEN/BACKGROUNDS/BEAMGAS/proton/pythia8.306-1.0/100GeV/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.edm4hep.root", output: directory("results/backgrounds/backwards_ecal") + log: + scheduler=".logs/results/backgrounds/backwards_ecal/scheduler.log", + worker=".logs/results/backgrounds/backwards_ecal/worker.log", threads: workflow.cores shell: """ @@ -49,10 +52,10 @@ cleanup() {{ trap cleanup EXIT PORT=$RANDOM -dask scheduler --port $PORT & +dask scheduler --port $PORT 2>{log.scheduler} & export DASK_SCHEDULER=localhost:$PORT SCHEDULER_PID=$! -dask worker tcp://$DASK_SCHEDULER --nworkers {threads} --nthreads 1 & +dask worker tcp://$DASK_SCHEDULER --nworkers {threads} --nthreads 1 2>{log.worker} & WORKER_PID=$! env \ MATPLOTLIBRC={input.matplotlibrc} \ diff --git a/benchmarks/ecal_gaps/Snakefile b/benchmarks/ecal_gaps/Snakefile index 6b793eff..699a2c0c 100644 --- a/benchmarks/ecal_gaps/Snakefile +++ b/benchmarks/ecal_gaps/Snakefile @@ -74,6 +74,9 @@ rule ecal_gaps: ), output: directory("results/{DETECTOR_CONFIG}/ecal_gaps"), + log: + scheduler=".logs/results/{DETECTOR_CONFIG}/ecal_gaps/scheduler.log", + worker=".logs/results/{DETECTOR_CONFIG}/ecal_gaps/worker.log", threads: workflow.cores shell: """ @@ -85,10 +88,10 @@ cleanup() {{ trap cleanup EXIT PORT=$RANDOM -dask scheduler --port $PORT & +dask scheduler --port $PORT 2>{log.scheduler} & export DASK_SCHEDULER=localhost:$PORT SCHEDULER_PID=$! -dask worker tcp://$DASK_SCHEDULER --nworkers {threads} --nthreads 1 & +dask worker tcp://$DASK_SCHEDULER --nworkers {threads} --nthreads 1 2>{log.worker} & WORKER_PID=$! env \ MATPLOTLIBRC={input.matplotlibrc} \