Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102903235
exp-runner.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, 08:54
Size
2 KB
Mime Type
text/x-shellscript
Expires
Thu, Feb 27, 08:54 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24447051
Attached To
R3704 elastic-yarn
exp-runner.sh
View Options
#!/bin/bash
. config/config_path.sh
. config/config_classpath.sh
if [ $# -ne 7 ]
then
echo "Wrong number of parameters given. Given $#"
echo "Usage: $0 JOB_FILE TOPO_FILE SIM_TYPE PORT_START HB_SEED EXPID CTR"
exit -1
fi
JOB_FILE=$1
shift
TOPO_FILE=$1
shift
SIM_TYPE=$1
shift
PORT_START=$1
shift
HB_SEED=$1
shift
EXPID=$1
shift
ctr=$1
shift
if [ $SIM_TYPE != 'greedy' ] && [ $SIM_TYPE != 'informed' ] && [ $SIM_TYPE != 'reserved' ] && [ $SIM_TYPE != 'regular' ]; then
echo "Invalid sim-type chosen: $SIM_TYPE. Valid options are: 'greedy', 'informed', 'reserved' or 'regular'"
exit -1
fi
BASE_DIR=`pwd`
EXP_DIR=`pwd`/xexperiments
exp () {
OUT_DIR=$EXP_DIR/$EXPID-$ctr-$(basename $JOB_FILE)---$(basename $TOPO_FILE)---$SIM_TYPE---`date +"%Y-%m-%d_%H-%M-%S"`
echo "Output dir $OUT_DIR"
mkdir -p $OUT_DIR
PATH="$PATH:$YARN_PATH/hadoop-2.3.0/bin" \
HADOOP_CLASSPATH="${HADOOP_CLASSPATH}" \
JAVA_HOME="${JAVA_HOME}" \
bin/slsrun.sh \
--input-sls=$JOB_FILE \
--output-dir=$OUT_DIR \
--nodes=$TOPO_FILE \
--print-simulation \
--hbseed=$HB_SEED \
--simtype=$SIM_TYPE \
--portstart=$PORT_START &> $OUT_DIR/simulation-log
cp $TOPO_FILE $JOB_FILE $OUT_DIR
cd $OUT_DIR
TRUNC=$EXP_DIR/$EXPID-$ctr-$SIM_TYPE
echo "Done with $TRUNC"
grep app jobruntime.csv | awk -F, '{print $1,$6-$5}' | sed 's/_/ /g' | awk '{print $2,$3/1000}' | sed 's/^0*//g' > $TRUNC.jrt
$YARN_PATH/scripts/cdf-gen.py $TRUNC.jrt 1 > $TRUNC.jrt.cdf
# Parse log file for informed wait-related info
if [ $SIM_TYPE == "informed" ]; then
$YARN_PATH/scripts/parse_est_times.py simulation-log $TRUNC
for suffix in $(echo "dcr dpcr ddr cgt cgm cgmd"); do
$YARN_PATH/scripts/cdf-gen.py $TRUNC.$suffix 0 > $TRUNC.$suffix.cdf
done
fi
cat metrics/variable.cluster.allocated.memory.csv | sed 's/,/ /g' | grep -v value | awk 'BEGIN{s=0}{s++; print s,$2/1000}' > $TRUNC.tmem
cd $BASE_DIR
ctr=$(($ctr+1))
}
exp
Event Timeline
Log In to Comment