Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102929057
unpack-exp-batch.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Feb 25, 14:07
Size
2 KB
Mime Type
text/x-shellscript
Expires
Thu, Feb 27, 14:07 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24451251
Attached To
R3704 elastic-yarn
unpack-exp-batch.sh
View Options
#!/bin/bash
[[ -z $SCRIPT_CONFIG_PATH ]] && echo "SCRIPT_CONFIG_PATH not set!" && exit 1
. $SCRIPT_CONFIG_PATH/config_path.sh
UNPACK_INCOMPLETE_EXPERIMENTS=${UNPACK_INCOMPLETE_EXPERIMENTS:-0}
if [ ! -z $1 ]; then
BATCH_FILE=$1
echo "Unpacking batch: $BATCH_FILE"
CTR_FILES=$(eval echo `cat $BATCH_FILE | grep -v "^#"`.ctrs)
else
CTR_FILES=$(ls *.ctrs)
fi
for CTR_FILE in $CTR_FILES; do
[ ! -f $CTR_FILE ] && continue
EXP=$(echo $CTR_FILE | cut -d'.' -f1 | tr -d [:alpha:])
START_CTR=$(cat $CTR_FILE | cut -d' ' -f1)
STOP_CTR=$(cat $CTR_FILE | cut -d' ' -f2)
# Check if the experiment has finished
completed=1
TGZ_FILES=""
for ctr in $(seq $START_CTR $STOP_CTR); do
ls $YARN_PATH/results/*-$ctr.tgz &>/dev/null
if [ $? != 0 ]; then
# Check if it's already unpacked
# find ../results -name [0-9][0-9][0-9][0-9]-$ctr-* | grep trace | grep exp$EXP
# [ $? == 0 ] && continue
echo "Missing CTR: $ctr"
if [ $UNPACK_INCOMPLETE_EXPERIMENTS == 0 ]; then
echo "Skipping incomplete experiment exp$EXP."
completed=0
break
else
echo $ctr >> exp$EXP.missing
fi
fi
TGZ_FILES="$TGZ_FILES *-$ctr.tgz"
done
[ $completed == 0 ] && continue
echo "Unpacking experiments for exp$EXP."
$YARN_PATH/scripts/unpack-exp exp$EXP "$TGZ_FILES"
[ -f exp$EXP.missing ] && mv exp$EXP.missing exp$EXP
mv $CTR_FILE exp$EXP
# For informed simulations, create wait-time related graphs
# if [ "$SIM" == "informed" ]; then
#
# gnuplot -e "res_idx=$EXP" -e "exp_idx=$EXPID" -e "run_range='$(seq $START_CTR $(($CTR - 1)) | tr '\n' ' ')'" -e "base_name='informed'" $YARN_PATH/scripts/informed-wait.plot
# mv exp$EXP*.pdf exp$EXP/
#
# fi
#
# popd
#
# GRAPH_SIMS="$GRAPH_SIMS $SIM"
#
# RUNS_TOTAL=$(($(echo $NODES | wc -w) * $NRRUNS))
# cd $YARN_PATH/results
# gnuplot -e "res_idxs='$(seq $EXP_START $(($EXP - 1)) | tr '\n' ' ')'" -e "runs_per_exp=$RUNS_TOTAL" -e "sim_types='$GRAPH_SIMS'" -e "file_type='.jrt.cdf'" /HDD-2TB/YARN/scripts/comparative.plot
# gnuplot -e "res_idxs='$(seq $EXP_START $(($EXP - 1)) | tr '\n' ' ')'" -e "runs_per_exp=1" -e "sim_types='$GRAPH_SIMS'" -e "file_type='.cu.cdf'" /HDD-2TB/YARN/scripts/comparative.plot
# cd -
done
Event Timeline
Log In to Comment