diff --git a/config/acme/machines/syslog.anvil b/config/acme/machines/syslog.anvil index c95edbac999f..7790e2f770b5 100755 --- a/config/acme/machines/syslog.anvil +++ b/config/acme/machines/syslog.anvil @@ -25,6 +25,8 @@ cat > $run/Walltime.Remaining < $dir/qstatr.$lid.$remaining +qstat -1 -n acme > $dir/qstatn.$lid.$remaining while ($remaining > 0) echo "Wallclock time remaining: $remaining" >> $dir/atm.log.$lid.step @@ -41,7 +43,8 @@ while ($remaining > 0) echo "Wallclock time remaining: $remaining" >> $dir/cpl.log.$lid.step tail -n 4 $dir/cpl.log.$lid.step-all >> $dir/cpl.log.$lid.step /bin/cp --preserve=timestamps -u $timing/* $dir - qstat -f acme > $dir/qstatf.$lid.$remaining + qstat -r acme > $dir/qstatr.$lid.$remaining + qstat -1 -n acme > $dir/qstatn.$lid.$remaining chmod a+r $dir/* sleep $sample_interval set remaining = `qstat -f $jid | grep -F Walltime.Remaining | sed 's/ *Walltime.Remaining = *\([0-9]*\) */\1/' ` diff --git a/config/acme/machines/syslog.cetus b/config/acme/machines/syslog.cetus index 17d775b5d09f..77828e53473e 100755 --- a/config/acme/machines/syslog.cetus +++ b/config/acme/machines/syslog.cetus @@ -2,7 +2,6 @@ # cetus syslog script: # mach_syslog -set sec = 0 set sample_interval = $1 set jid = $2 set lid = $3 @@ -12,13 +11,14 @@ set dir = $6 # wait until output file is nonempty before checking remaining time # (note that calling script 'touch'es the acme log file before spawning this script, so that 'wc' does not fail) +set ncpus = `qstat -lf $jid | grep -F Procs | sed 's/^ *Procs *: *\([0-9]*\).*/\1/' ` set outlth = 0 -while ($outlth < 1) +while ($outlth < $ncpus) sleep 10 set outlth = `wc \-l $run/acme.log.$lid | sed 's/ *\([0-9]*\) *.*/\1/' ` end -set TimeRemaining = `qstat -lf $jid | grep TimeRemaining | sed 's/^ *TimeRemaining *: *\([0-9]*:[0-9]*:[0-9]*\) */\1/' ` +set TimeRemaining = `qstat -lf $jid | grep -F TimeRemaining | sed 's/^ *TimeRemaining *: *\([0-9]*:[0-9]*:[0-9]*\) */\1/' ` set rem_hours = `echo $TimeRemaining | sed 's/^0*\([0-9]*\):0*\([0-9]*\):0*\([0-9]*\)/\1/' ` set rem_mins = `echo $TimeRemaining | sed 's/^0*\([0-9]*\):0*\([0-9]*\):0*\([0-9]*\)/\2/' ` set rem_secs = `echo $TimeRemaining | sed 's/^0*\([0-9]*\):0*\([0-9]*\):0*\([0-9]*\)/\3/' ` @@ -32,16 +32,24 @@ EOF1 /bin/cp --preserve=timestamps $run/acme.log.$lid $dir/acme.log.$lid.$remaining while ($remaining > 0) - grep -a -i -e "nstep" -e "model date" $run/*atm.log.$lid | tail > $dir/atm.log.$lid.nstep.$remaining -# grep -a -i "nstep" $run/acme.log.$lid | tail > $dir/acme.log.$lid.nstep.$remaining - grep -a -i -e "timestep" -e "model date" $run/*lnd.log.$lid | tail > $dir/lnd.log.$lid.timestep.$remaining - grep -a -i -e "timestep" -e "Step number" -e "model date" $run/*ocn.log.$lid | tail > $dir/ocn.log.$lid.stepnum.$remaining - grep -a -i -e "timestep" -e "istep" -e "model date" $run/*ice.log.$lid | tail > $dir/ice.log.$lid.istep.$remaining - grep -a -i "model date" $run/*cpl.log.$lid | tail > $dir/cpl.log.$lid.modeldata.$remaining + echo "Wallclock time remaining: $remaining" >> $dir/atm.log.$lid.step + grep -Fa -e "nstep" -e "model date" $run/*atm.log.$lid | tail -n 4 >> $dir/atm.log.$lid.step + echo "Wallclock time remaining: $remaining" >> $dir/lnd.log.$lid.step + grep -Fa -e "timestep" -e "model date" $run/*lnd.log.$lid | tail -n 4 >> $dir/lnd.log.$lid.step + echo "Wallclock time remaining: $remaining" >> $dir/ocn.log.$lid.step + grep -Fa -e "timestep" -e "Step number" -e "model date" $run/*ocn.log.$lid | tail -n 4 >> $dir/ocn.log.$lid.step + echo "Wallclock time remaining: $remaining" >> $dir/ice.log.$lid.step + grep -Fa -e "timestep" -e "istep" -e "model date" $run/*ice.log.$lid | tail -n 4 >> $dir/ice.log.$lid.step + echo "Wallclock time remaining: $remaining" >> $dir/rof.log.$lid.step + grep -Fa "model date" $run/*rof.log.$lid | tail -n 4 >> $dir/rof.log.$lid.step + grep -Fa "model date" $run/*cpl.log.$lid > $dir/cpl.log.$lid.step-all + echo "Wallclock time remaining: $remaining" >> $dir/cpl.log.$lid.step + tail -n 4 $dir/cpl.log.$lid.step-all >> $dir/cpl.log.$lid.step /bin/cp --preserve=timestamps -u $timing/* $dir + qstat -f > $dir/qstatf.$lid.$remaining chmod a+r $dir/* sleep $sample_interval - set TimeRemaining = `qstat -lf $jid | grep TimeRemaining | sed 's/^ *TimeRemaining *: *\([0-9]*:[0-9]*:[0-9]*\) */\1/' ` + set TimeRemaining = `qstat -lf $jid | grep -F TimeRemaining | sed 's/^ *TimeRemaining *: *\([0-9]*:[0-9]*:[0-9]*\) */\1/' ` set rem_hours = `echo $TimeRemaining | sed 's/^0*\([0-9]*\):0*\([0-9]*\):0*\([0-9]*\)/\1/' ` set rem_mins = `echo $TimeRemaining | sed 's/^0*\([0-9]*\):0*\([0-9]*\):0*\([0-9]*\)/\2/' ` set rem_secs = `echo $TimeRemaining | sed 's/^0*\([0-9]*\):0*\([0-9]*\):0*\([0-9]*\)/\3/' ` diff --git a/config/acme/machines/syslog.cori-haswell b/config/acme/machines/syslog.cori-haswell index 548d0446b3dc..2fc5e2e3be54 100755 --- a/config/acme/machines/syslog.cori-haswell +++ b/config/acme/machines/syslog.cori-haswell @@ -1,8 +1,7 @@ #!/bin/csh -f # cori-haswell syslog script: -# mach_syslog