# HG changeset patch # User Henry S. Thompson # Date 1745328727 -3600 # Node ID cc2945816b7584978f610f2c21a00a8da54abed8 # Parent 12d13a1d387f5920bdd300ac89c750591db93b46 job index arg to doit, slightly better diagnostic output diff -r 12d13a1d387f -r cc2945816b75 bin/_runme.sh --- a/bin/_runme.sh Fri Apr 18 13:39:55 2025 +0100 +++ b/bin/_runme.sh Tue Apr 22 14:32:07 2025 +0100 @@ -15,9 +15,11 @@ then shift xarg="$1" + xa="run $1 " shift else xarg= + xa= fi cd "$1" @@ -32,15 +34,15 @@ if [ "$1" = "-t" ] then shift - threadsPerTask=$1 + threadsPerJob=$1 shift else - threadsPerTask=2 + threadsPerJob=2 fi -pjobs=$((c / $threadsPerTask)) +pjobs=$((c / $threadsPerJob)) -echo $(date) task $n.$task on $nodename:$N.$node start $pjobs jobs 1>&2 +echo $(date) ${xa}task $n.$task on $nodename:$N.$node start $pjobs jobs 1>&2 PATH=$W/$USER/bin:$W/shared/bin:$PATH export task PATH n xarg @@ -70,16 +72,17 @@ doit () { arg="$1" - echo $(date) start $task $PARALLEL_SEQ "|$cmd|$xarg|$arg|" + i="$2" + echo $(date) start $task $i "|$xarg|$arg|" eval "$cmd" - echo $(date) end $task $PARALLEL_SEQ + echo $(date) end $task $i } export -f doit if [ "$debug" ] then - echo $(date) task $n.$task cmd "|$cmd|" doit $(type doit) + echo $(date) task $n.$task cmd "|$cmd|" $(type doit) fi eval "$input" | \ @@ -93,7 +96,7 @@ then xargs -I ^ -n 1 bash -lc "doit ^" else - parallel --line-buffer -j $pjobs doit '{}' + parallel --line-buffer -j $pjobs doit '{}' '{#}' fi echo $(date) task $n.$task on $nodename:$N.$node end 1>&2