- all commands below should be executed under this working dir
mkdir bin
mkdir data
make
make clean
./bin/datagen.run $number_of_operations $upper_bound_of_value > $data_file
- This will generate data with $number_of_operations operations into $data_file
- All the values generated will be in [1, $upper_bound_of_value]
./$target_name < $input_file (> $output_file)
- This will print the results of each
look_up
operation into stdout or $output_file - Note there are two numbers in each line of input file:
the first
the the operator number (1: Insert / 2: Delete / 3: LookUP), andthe second
is the value to be operated.
./$target_name $MAX_THREAD_COUNT < $input_file (> $output_file)
- only one more parameter for target program: how many threads will run simultaneously to handle the BT operation.
bash comp_correct.sh $number_of_operations $upper_bound_of_value $prog1 $prog2
- For the purpose of hw3's Part 3, just type
bash comp_correct.sh 3000000 1000000 lazy normal
- This script will run an infinite loop to compare the output of $prog1 and $prog2.
- Every time inside the loop, it will:
- generate data based on $number_of_operations and $upper_bound_of_value, store it in
$DATA_DIR/in.in
- feed the data into $prog1 and $prog2
- collect the results into
$DATA_DIR/1.out
and$DATA_DIR/2.out
- compare the two files, if different, break from the loop
- generate data based on $number_of_operations and $upper_bound_of_value, store it in
- So you need to terminate it by yourself if the two programs behave identically.
- (You must run 3.1 before this section, to generate the data)
bash running_time_collect.sh
- Collect the running time of
parallel.run
based on data generated in 3.1, and with thread number from 1 to 128.
- (You must finish 3.2's running before this section, to generate profiling result)
python draw_exp_result.py
- Show the figure