Skip to content
Snippets Groups Projects
Commit 6bdcfd35 authored by Theodore Efremov's avatar Theodore Efremov :hibiscus:
Browse files

Fixed convert parallelisation

parent efec815a
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #370990 passed
......@@ -3,11 +3,15 @@
max_jobs=20 # Set the maximum number of parallel jobs (cores)
for run in {201..260}; do
while [ $(jobs | wc -l) -ge $max_jobs ]; do
while [ $(jobs -r | wc -l) -ge $max_jobs ]; do
wait -n # Wait for at least one job to finish
echo "A job has finished. $(jobs -r | wc -l) jobs remaining."
done
root "convert.C($run)" &
root -b -q "convert.C($run)" &
echo "Started job for run $run. $(jobs -r | wc -l) jobs currently running."
done
wait # Wait for all jobs to finish
# Ensure all remaining jobs are completed
wait
echo "All jobs are complete."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment