Print

Print


This little shell script will run ECJ in single-threaded mode 50 times
using the seeds START+1 through START+50, and the file MYFILE.PARAMS.
Each stat file will be outputted as 1.out.stat through 50.out.stat in
your current directory.  You can pass in additional parameters using
the typical -p foo=bar format.  Save it as "ecj" or something and put
it in an appropriate place.

USAGE
        ecj MYFILE.PARAMS START [-p param]*

EXAMPLE.  Will run ant 50 times with just 4-generation runs,
             starting at seed = 101.
        cd ec/app/ant
        ecj ant.params 100 -p generation=4

THE SCRIPT
-------------------------------
#! /bin/tcsh
@ z=$2
foreach r (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 25 26 27 28 29 30 31 32 33 34 45 36 37 38 39 40 41 42 43 44 45 46 46
47 48 49 50)
        @ seed=$z + $r
        java ec.Evolve -file $1 \
                       -p seed.0=$seed \
                       -p stat.file=\$${r}.out.stat \
                                 $argv[*]
        end
echo All Done!
-------------------------------


Sean




On Jul 9, 2004, at 9:03 AM, Hirsch Laurence wrote:

> Is there a recommended way to implement multiple runs in ECJ?
>
> Thanks,
>
> Laurie