Skip to content

Commit e4fbb12

Browse files
committed
Improve rampup and finsh in xc runs
1 parent 286007e commit e4fbb12

File tree

4 files changed

+34
-22
lines changed

4 files changed

+34
-22
lines changed

bin/oltpcore

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# Changes
1313
#
14+
# bengsig 14-dec-2022 - --no-awr means even less, $mute:59 for xc
1415
# bengsig 15-nov-2022 - rategradient, -i, -d options
1516
# bengsig 1-nov-2022 - --no-awr option
1617
# bengsig 25-oct-2022 - External control
@@ -181,9 +182,19 @@ trap "rm -f $prepfile" 0 int
181182
komment=`echo $RWLOLTP_NAME $rwl_title $extrakomment | sed 's/[\\"'"']//g"`
182183

183184
# prepare the run; this will also create the $resultsdir/$subdir/$runnumber/env file
184-
rwloadsim -u -v -c $rampup -sss -P $prepfile -k $key -K "$komment" -q \
185-
--fulltitle="$komment" \
186-
-i runperiod:=$runperiod -i proccount:=$procs prepare.rwl
185+
if test $xc_enabled = 1
186+
then
187+
rwloadsim -u -v -c 2 -sss -P $prepfile -k $key -K "$komment" -q \
188+
--fulltitle="$komment" \
189+
-i runperiod:=$runperiod -i proccount:=$procs prepare.rwl
190+
mute59='-x$mute:59'
191+
else
192+
rwloadsim -u -v -c $rampup -sss -P $prepfile -k $key -K "$komment" -q \
193+
--fulltitle="$komment" \
194+
-i runperiod:=$runperiod -i proccount:=$procs prepare.rwl
195+
mute59=''
196+
fi
197+
187198

188199
# Get runnumber and variables from the env file
189200
runnumber=`cut -f1 -d: $prepfile`
@@ -206,7 +217,7 @@ fi
206217
rwloadsim -q $extra_args -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod -i proccount:=$procs -i show_changed_values:=1 parameters.rwl > $resultsdir/$subdir/$runnumber/parmatstart.txt
207218

208219
# Start ping gather and also ask for event notification
209-
rwloadsim -u -E -q -R $prepfile -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod runping.rwl &
220+
rwloadsim $mute59 -u -E -q -R $prepfile -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod runping.rwl &
210221

211222
if test x$killfile != x
212223
then
@@ -216,7 +227,7 @@ fi
216227
quiet=''
217228

218229
# Start sys gather
219-
rwloadsim -u -A 1 -r -q -i procnumber:=99999 -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod -i proccount:=$procs -R $prepfile -i doawr:=$doawr runsys.rwl $starttime &
230+
rwloadsim $mute59 -u -A 1 -r -q -i procnumber:=99999 -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod -i proccount:=$procs -R $prepfile -i doawr:=$doawr runsys.rwl $starttime &
220231
awrpid=$!
221232

222233
if test x$killfile != x
@@ -237,7 +248,7 @@ while test $procnumber -le $procs
237248
do
238249
sleep $script_ramp
239250
echo -n " "`expr $procs - $procnumber`
240-
rwloadsim -u -r -i simulatebatch:=$simulatebatch -i procnumber:=$procnumber \
251+
rwloadsim $mute59 -u -r -i simulatebatch:=$simulatebatch -i procnumber:=$procnumber \
241252
--flush-stop=$runperiod --flush-every=2 -v -i runperiod:=$runperiod \
242253
-W -i xc_run_dedicated:=$xc_run_dedicated $extra_args -i proccount:=$procs -R $prepfile $quiet $runfile &
243254
quiet='-q' # only messages from first
@@ -352,7 +363,7 @@ else
352363
wait
353364
# and do the plot without showing stderr which is likely to
354365
# have lots of gnuplot errors due to missing data
355-
oltpplot $runnumber 2> /dev/null
366+
test $doawr -ne 0 && oltpplot $runnumber 2> /dev/null
356367
fi
357368

358369
# mark run as complete

docs/refman/oltpxcrun.html

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/man2rwl/oltpxcrun.2rwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This option has no effect; the external control values from previous run are sti
3737
.P
3838
.B --no-awr
3939
.RS 4
40-
Do not generate awr snapshots and awr report at the end of each run.
40+
Do not generate awr snapshots, awr report and other run results.
4141
.RE
4242
.P
4343
.B -g

src/rwlmain.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*
1212
* History
1313
*
14+
* bengsig 14-dec-2022 - Move RWL-059 check till after -x processing
1415
* bengsig 24-nov-2022 - Arguments are all positional in generated
1516
* bengsig 31-oct-2022 - Add better queue time via $queueeverytiming:on
1617
* bengsig 15-sep-2022 - New file assignment operators
@@ -1316,17 +1317,6 @@ sb4 main(sb4 main_ac, char **main_av)
13161317
&& bit(rwm->m2flags, RWL_P2_KKSET))
13171318
rwlerror(rwm, RWL_ERROR_KK_NOT_USEFUL);
13181319

1319-
if (rwm->adjepoch <0.0)
1320-
{
1321-
rwlerror(rwm, RWL_ERROR_CLOCKOFF_NEGATIVE, rwm->adjepoch);
1322-
rwm->adjepoch = 0.0;
1323-
}
1324-
if (rwm->adjepoch >600.0)
1325-
{
1326-
rwlerror(rwm, RWL_ERROR_CLOCKOFF_UNREASONABLE, rwm->adjepoch, 600.0);
1327-
rwm->adjepoch = RWL_DEFAULT_ADJ_EPOCH;
1328-
}
1329-
13301320
#ifndef RWL_GEN_EXEC
13311321
// Are we generating
13321322
if (bit(rwm->m3flags, RWL_P3_GENERATE))
@@ -1372,6 +1362,17 @@ sb4 main(sb4 main_ac, char **main_av)
13721362
if (optind>=ac - (sb4)rwm->posargs)
13731363
rwlerror(rwm, RWL_ERROR_NO_INPUT);
13741364

1365+
if (rwm->adjepoch <0.0)
1366+
{
1367+
rwlerror(rwm, RWL_ERROR_CLOCKOFF_NEGATIVE, rwm->adjepoch);
1368+
rwm->adjepoch = 0.0;
1369+
}
1370+
if (rwm->adjepoch >600.0)
1371+
{
1372+
rwlerror(rwm, RWL_ERROR_CLOCKOFF_UNREASONABLE, rwm->adjepoch, 600.0);
1373+
rwm->adjepoch = RWL_DEFAULT_ADJ_EPOCH;
1374+
}
1375+
13751376
if (bit(rwm->m3flags, RWL_P3_GENERATE))
13761377
{
13771378
// create the c source, and fill it with initial contents

0 commit comments

Comments
 (0)