Commit 5da684a1 by Robert Utterback

changed CILKRR env vars to PORR

parent d3407c76
......@@ -30,9 +30,9 @@ runcmd() {
mode=$2
name=$3
args=$4
str="CILK_NWORKERS=$P CILKRR_MODE=$mode ./$name $args &> .log"
str="CILK_NWORKERS=$P PORR_MODE=$mode ./$name $args &> .log"
# printf "$str --- "
CILK_NWORKERS=$P CILKRR_MODE=$mode ./$name $args &> .log
CILK_NWORKERS=$P PORR_MODE=$mode ./$name $args &> .log
}
runall () {
......
......@@ -122,11 +122,11 @@ namespace porr {
__cilkrts_set_param("ped seed", "0");
m_filename = ".cilkrecord";
env = std::getenv("CILKRR_FILE");
env = std::getenv("PORR_FILE");
if (env) m_filename = env;
env = std::getenv("CILKRR_MODE");
env = std::getenv("PORR_MODE");
if (!env) return;
std::string mode = env;
......
......@@ -25,12 +25,6 @@ namespace porr {
{ data = (T*) malloc(sizeof(T) * size); }
};
#ifdef ACQ_PTR
#define CHUNK_TYPE acquire_container
#else
#define CHUNK_TYPE acquire_info*
#endif
achunk<CHUNK_TYPE> *m_current_chunk = nullptr;
union {
achunk<CHUNK_TYPE> *m_first_chunk; // recording only
......
......@@ -64,12 +64,12 @@ function showstatus() {
# 1=n, 2=recordp, 3=replayp
function runcmd() {
cmd="CILK_NWORKERS=$3 CILKRR_MODE=replay timeout --signal=SIGSTOP ${maxtime}s ./fib $1"
cmd="CILK_NWORKERS=$3 PORR_MODE=replay timeout --signal=SIGSTOP ${maxtime}s ./fib $1"
msg="fib($1) recorded with $2 workers, replayed with $3 workers"
suffix=""
if [[ "$verbose" -eq 0 ]]; then
echo $msg > log
suffix=" >> log 2>&1"
echo $msg > .log
suffix=" >> .log 2>&1"
fi
eval $cmd $suffix
res=$?
......@@ -95,7 +95,7 @@ for n in `seq $STARTN $ENDN`; do
for recordp in `seq 1 8`; do
for i in `seq 1 $NUM_RECORDS`; do
showstatus
CILK_NWORKERS=$recordp CILKRR_MODE=record ./fib $n >& log
CILK_NWORKERS=$recordp PORR_MODE=record ./fib $n >& .log
if [[ $? -ne 0 ]]; then
echo "Problem with record!"
exit 1
......
#!/bin/bash
trap "kill -- -$$" SIGINT
# Defaults
STARTN=1
ENDN=15
ITER=100
NUM_RECORDS=2
case $# in
0)
# Defaults already set
;;
1)
ITER=$1
;;
2)
STARTN=$1
ENDN=$2
;;
3)
STARTN=$1
ENDN=$2
ITER=$3
;;
4)
STARTN=$1
ENDN=$2
ITER=$3
NUM_RECORDS=$4
;;
*)
echo "Incorrect number of arguments"
exit 1
;;
esac
ITER_PER_RECORD=$(( $ITER / $NUM_RECORDS ))
maxtime=5
line=" "
declare verbose
if [[ "$#" -eq 1 && "$1" -eq "v" ]]; then
verbose=1
else
verbose=0
fi
function clearline() {
printf "\r$line \r"
}
function showstatus() {
if [[ $verbose -eq 0 ]]; then
clearline
printf "$status"
fi
}
# 1=n, 2=recordp, 3=replayp
function runcmd() {
cmd="CILK_NWORKERS=$3 PORR_MODE=replay timeout --signal=SIGSTOP ${maxtime}s ./cilkfor $1"
msg="cilkfor($1) recorded with $2 workers, replayed with $3 workers"
suffix=""
if [[ "$verbose" -eq 0 ]]; then
echo $msg > log
suffix=" >> log 2>&1"
fi
eval $cmd $suffix
res=$?
if [[ $res -ne 0 ]]; then
printf "\n"
if [[ $res -eq 124 ]]; then
printf "Timeout (stopped): "
else
printf "Failed: "
fi
printf "$msg\nSee log for details.\n"
exit 1
fi
}
make cilkfor
rm -f core
status=""
for n in `seq $STARTN $ENDN`; do
status="cilkfor($n):"
for recordp in `seq 1 8`; do
for i in `seq 1 $NUM_RECORDS`; do
showstatus
CILK_NWORKERS=$recordp PORR_MODE=record ./cilkfor $n >& log
if [[ $? -ne 0 ]]; then
echo "Problem with record!"
exit 1
fi
for replayp in `seq 1 8`; do
for j in `seq 1 $ITER_PER_RECORD`; do
status="\rcilkfor($n), recordp=${recordp}-${i}, replayp=$replayp, iter=$j / $ITER_PER_RECORD"
showstatus
runcmd $n $recordp $replayp
done
status="cilkfor($n), recordp=${recordp}-${i}, replayp=$replayp"
showstatus
done
done
done
clearline
printf "\rDone with cilkfor($n)\n"
done
......@@ -51,114 +51,114 @@ runcmd() {
printf "Running %s %d, P=%d, %d iterations \n" $PROG $N $P $ITER
#clean
base=$(runcmd $ITER $N $P "CILKRR_MODE=none")
base=$(runcmd $ITER $N $P "PORR_MODE=none")
printf "Base: %f\n" $base
record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
record=$(runcmd $ITER $N $P "PORR_MODE=record")
printf "Record: %f\n" $record
# clean "PARAMS='-DPTYPE=0 -DIMETHOD=0'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Call only: %f\n" $record
# clean "PARAMS='-DPTYPE=1 -DIMETHOD=0'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Walk only: %f\n" $record
# clean "PARAMS='-DPTYPE=2 -DIMETHOD=0'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Array,none: %f\n" $record
# clean "PARAMS='-DPTYPE=2 -DIMETHOD=1 -DUSE_STL=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Array,STL list: %f\n" $record
# clean "PARAMS='-DPTYPE=2 -DIMETHOD=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Array,LL: %f\n" $record
# clean "PARAMS='-DPTYPE=2 -DIMETHOD=2'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Array,CLL: %f\n" $record
# clean "PARAMS='-DPTYPE=2 -DIMETHOD=2 -DRESERVE_SIZE=$RESERVE'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Array,CLL,reserve: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=0'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,none: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=2'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,CLL only: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=3 -DUSE_STL=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,STL hash: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=3 -DUSE_STL=1 -DRESERVE_SIZE=$RESERVE'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,STL hash, reserve: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=3 -DUSE_STL=1 -DCONFLICT_CHECK=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,STL hash,conflict: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=3 -DUSE_STL=1 -DRESERVE_SIZE=$RESERVE -DCONFLICT_CHECK=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,STL hash, reserve, conflict: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=5'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,Mixed: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=5 -DRESERVE_SIZE=$RESERVE'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,Mixed, reserve: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=5 -DCONFLICT_CHECK=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,Mixed,conflict: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=5 -DRESERVE_SIZE=$RESERVE -DCONFLICT_CHECK=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,Mixed, reserve, conflict: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=4'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,myhash: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=4 -DRESERVE_SIZE=$RESERVE'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,myhash,reserve: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=4 -DCONFLICT_CHECK=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,myhash-conflict: %f\n" $record
# clean "PARAMS='-DPTYPE=3 -DIMETHOD=4 -DRESERVE_SIZE=$RESERVE -DCONFLICT_CHECK=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Dot,myhash-conflict,reserve: %f\n" $record
# clean "PARAMS='-DPTYPE=4 -DIMETHOD=0 -DPRECOMPUTE_PEDIGREES=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Pre,none: %f\n" $record
# clean "PARAMS='-DPTYPE=4 -DIMETHOD=4 -DPRECOMPUTE_PEDIGREES=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Pre,myhash: %f\n" $record
# clean "PARAMS='-DPTYPE=4 -DIMETHOD=4 -DRESERVE_SIZE=$RESERVE -DPRECOMPUTE_PEDIGREES=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Pre,myhash,reserve: %f\n" $record
# clean "PARAMS='-DPTYPE=4 -DIMETHOD=4 -DCONFLICT_CHECK=1 -DPRECOMPUTE_PEDIGREES=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Pre,myhash-conflict: %f\n" $record
# clean "PARAMS='-DPTYPE=4 -DIMETHOD=4 -DRESERVE_SIZE=$RESERVE -DCONFLICT_CHECK=1 -DPRECOMPUTE_PEDIGREES=1'"
# record=$(runcmd $ITER $N $P "CILKRR_MODE=record")
# record=$(runcmd $ITER $N $P "PORR_MODE=record")
# printf "Pre,myhash-conflict,reserve: %f\n" $record
unset PROG
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment