Skip to content
Snippets Groups Projects
Commit 61ee53af authored by Reiner Jung's avatar Reiner Jung
Browse files

Updated scripts and made setup more generic.

parent b21118cb
Branches
No related tags found
No related merge requests found
Showing
with 171 additions and 127 deletions
# Main replication directory
export REPLICATION_DIR="/home/reiner/temp/experiment/experiments"
# Library path including Kieker libraries
export KIEKER_LIBRARY_PATH="${REPLICATION_DIR}/../install/km/lib/"
# Location for dynamic and static data
export DATA_PATH="/home/reiner/Projects/OceanDSL/architecture-recovery-and-optimization-data"
# List of external functions
export EXTERNAL_FUNCTIONS_MAP="${REPLICATION_DIR}/builtin-functions.csv"
export STATIC_AUX_MODULE_MAP="${REPLICATION_DIR}/uvic-aux-map-file.csv"
export TOOL_DIR="/home/reiner/temp/experiment/install"
# Data directory for results from the optimization
OPTIMIZATION_DATA="/home/reiner/Projects/OceanDSL/restructuring-results"
DAR="${TOOL_DIR}/oceandsl-tools/bin/dar"
SAR="${TOOL_DIR}/oceandsl-tools/bin/sar"
MAA="${TOOL_DIR}/oceandsl-tools/bin/maa"
MOP="${TOOL_DIR}/oceandsl-tools/bin/mop"
MVIS="${TOOL_DIR}/oceandsl-tools/bin/mvis"
RELABEL="${TOOL_DIR}/oceandsl-tools/bin/relabel"
FXCA="${TOOL_DIR}/oceandsl-tools/bin/fxca"
FXTRAN="${TOOL_DIR}/fxtran"
RESTRUCTURING="${TOOL_DIR}/oceandsl-tools/bin/restructuring"
DELTA="${TOOL_DIR}/oceandsl-tools/bin/delta"
# collector tool
COLLECTOR="${TOOL_DIR}/collector/bin/collector"
# addr2line
ADDR2LINE=`which addr2line`
# Hostname where the dynamic analysis was executed
HOST=glasgow
#!/bin/bash
export BASE_DIR=$(cd "$(dirname "$0")"; pwd)
. "${BASE_DIR}/../common-functions.rc"
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
echo "Config file not found."
fi
for I in `find "${OPTIMIZATION_DATA}" -name "type-model.xmi"` ; do
DIR=`dirname $I`
if [ ! -f "${DIR}/.project" ] ; then
basename $DIR
fi
done
# end
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......
......@@ -4,6 +4,12 @@ export BASE_DIR=$(cd "$(dirname "$0")"; pwd)
. "${BASE_DIR}/../../common-functions.rc"
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......@@ -27,28 +33,6 @@ for JOB_DIRECTORY in `find "${OPTIMIZATION_DATA}/jss"* -name '*mitgcm*job'` ; do
checkDirectory "job directory" "${JOB_DIRECTORY}"
export ORIGINAL_ARCHIVE="${JOB_DIRECTORY}/optimized-models.tar.xz"
export OPTIMIZED_ARCHIVE="${JOB_DIRECTORY}/original-model.tar.xz"
export COMBINED_ARCHIVE="${JOB_DIRECTORY}/kieker-repositories.tar.xz"
cd "${JOB_DIRECTORY}"
if [ -f "${ORIGINAL_ARCHIVE}" ] && [ -f "${OPTIMIZED_ARCHIVE}" ] ; then
tar -xpf "${ORIGINAL_ARCHIVE}"
tar -xpf "${OPTIMIZED_ARCHIVE}"
elif [ -f "${COMBINED_ARCHIVE}" ] ; then
rm -rf "${JOB_DIRECTORY}/original-model"
for J in "${JOB_DIRECTORY}/optimized-"* ; do
if [ -d "$J" ] ; then
rm -rf "$J"
fi
done
tar -xpf "${COMBINED_ARCHIVE}"
mv "${JOB_DIRECTORY}/kieker-repositories/"* .
else
echo "No data."
fi
ORIGINAL="${JOB_DIRECTORY}/original-model"
if [ -d "${ORIGINAL}" ] ; then
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......
# Main replication directory
export REPLICATION_DIR="/home/reiner/temp/experiment/experiments"
# Library path including Kieker libraries
export KIEKER_LIBRARY_PATH="${REPLICATION_DIR}/../install/km/lib/"
# Location for dynamic and static data
export DATA_PATH="/home/reiner/Projects/OceanDSL/architecture-recovery-and-optimization-data"
# List of external functions
export EXTERNAL_FUNCTIONS_MAP="${REPLICATION_DIR}/builtin-functions.csv"
export STATIC_AUX_MODULE_MAP="${REPLICATION_DIR}/mitgcm-aux-map-file.csv"
export TOOL_DIR="/home/reiner/temp/experiment/install"
# Data directory for results from the optimization
OPTIMIZATION_DATA="/home/reiner/jss-results"
DAR="${TOOL_DIR}/oceandsl-tools/bin/dar"
SAR="${TOOL_DIR}/oceandsl-tools/bin/sar"
MAA="${TOOL_DIR}/oceandsl-tools/bin/maa"
MOP="${TOOL_DIR}/oceandsl-tools/bin/mop"
MVIS="${TOOL_DIR}/oceandsl-tools/bin/mvis"
RELABEL="${TOOL_DIR}/oceandsl-tools/bin/relabel"
FXCA="${TOOL_DIR}/oceandsl-tools/bin/fxca"
FXTRAN="${TOOL_DIR}/fxtran"
RESTRUCTURING="${TOOL_DIR}/oceandsl-tools/bin/restructuring"
DELTA="${TOOL_DIR}/oceandsl-tools/bin/delta"
# collector tool
COLLECTOR="${TOOL_DIR}/collector/bin/collector"
# addr2line
ADDR2LINE=`which addr2line`
# Repository prefix for the mitgcm model variants
REPOSITORY_DIR="${REPLICATION_DIR}/MITgcm"
# Compile configurtion for kieker
......@@ -44,5 +9,3 @@ PROCESSED_CODE_PATH="${REPOSITORY_DIR}/verification/${EXPERIMENT_NAME}/build"
# Path to the executable
EXECUTABLE="${REPOSITORY_DIR}/verification/${EXPERIMENT_NAME}/build/mitgcmuv"
# Hostname where the dynamic analysis was executed
HOST=glasgow
......@@ -4,6 +4,12 @@ export BASE_DIR=$(cd "$(dirname "$0")"; pwd)
. "${BASE_DIR}/../../common-functions.rc"
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......@@ -56,12 +62,16 @@ for JOB_DIRECTORY in `find "${OPTIMIZATION_DATA}/jss"* -name '*mitgcm*job'` ; do
echo "$ORIGINAL -> $OPTIMIZED in $STEPS"
if [ -d "$OPTIMIZED" ] ; then
cat "${BASE_DIR}/template.project" | sed "s/NAME/${MODEL_ID}-$OPTIMIZED/g" > "$OPTIMIZED/.project"
rm -rf "merge-${OPTIMIZED}"
mkdir "merge-${OPTIMIZED}"
"${MOP}" -e "${MODEL_ID}-${OPTIMIZED}-merged" -i "original-model" "${OPTIMIZED}" -o "merge-${OPTIMIZED}" -s all merge >> "${MOP_LOG}" 2>&1
else
warning "Missing $OPTIMIZED model"
fi
done
else
error "Missing MED output for job $BASENAME"
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "${BASE_DIR}/config" ] ; then
. "${BASE_DIR}/config"
else
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. "${BASE_DIR}/config"
else
......
......@@ -13,6 +13,12 @@ fi
checkMode $2
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "${BASE_DIR}/config" ] ; then
. "${BASE_DIR}/config"
else
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. "${BASE_DIR}/config"
else
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......
......@@ -4,6 +4,12 @@ export BASE_DIR=$(cd "$(dirname "$0")"; pwd)
. "${BASE_DIR}/../../common-functions.rc"
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......@@ -27,28 +33,6 @@ for JOB_DIRECTORY in `find "${OPTIMIZATION_DATA}/jss"* -name '*uvic*job'` ; do
checkDirectory "job directory" "${JOB_DIRECTORY}"
export ORIGINAL_ARCHIVE="${JOB_DIRECTORY}/optimized-models.tar.xz"
export OPTIMIZED_ARCHIVE="${JOB_DIRECTORY}/original-model.tar.xz"
export COMBINED_ARCHIVE="${JOB_DIRECTORY}/kieker-repositories.tar.xz"
cd "${JOB_DIRECTORY}"
if [ -f "${ORIGINAL_ARCHIVE}" ] && [ -f "${OPTIMIZED_ARCHIVE}" ] ; then
tar -xpf "${ORIGINAL_ARCHIVE}"
tar -xpf "${OPTIMIZED_ARCHIVE}"
elif [ -f "${COMBINED_ARCHIVE}" ] ; then
rm -rf "${JOB_DIRECTORY}/original-model"
for J in "${JOB_DIRECTORY}/optimized-"* ; do
if [ -d "$J" ] ; then
rm -rf "$J"
fi
done
tar -xpf "${COMBINED_ARCHIVE}"
mv "${JOB_DIRECTORY}/kieker-repositories/"* .
else
echo "No data."
fi
ORIGINAL="${JOB_DIRECTORY}/original-model"
if [ -d "${ORIGINAL}" ] ; then
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......
# Main replication directory
export REPLICATION_DIR="/home/reiner/temp/experiment/experiments"
# Library path including Kieker libraries
export KIEKER_LIBRARY_PATH="${REPLICATION_DIR}/../install/km/lib/"
# Location for dynamic and static data
export DATA_PATH="/home/reiner/Projects/OceanDSL/architecture-recovery-and-optimization-data"
# List of external functions
export EXTERNAL_FUNCTIONS_MAP="${REPLICATION_DIR}/builtin-functions.csv"
export STATIC_AUX_MODULE_MAP="${REPLICATION_DIR}/uvic-aux-map-file.csv"
export TOOL_DIR="/home/reiner/temp/experiment/install"
# Data directory for results from the optimization
OPTIMIZATION_DATA="/home/reiner/jss-results"
DAR="${TOOL_DIR}/oceandsl-tools/bin/dar"
SAR="${TOOL_DIR}/oceandsl-tools/bin/sar"
MAA="${TOOL_DIR}/oceandsl-tools/bin/maa"
MOP="${TOOL_DIR}/oceandsl-tools/bin/mop"
MVIS="${TOOL_DIR}/oceandsl-tools/bin/mvis"
RELABEL="${TOOL_DIR}/oceandsl-tools/bin/relabel"
FXCA="${TOOL_DIR}/oceandsl-tools/bin/fxca"
FXTRAN="${TOOL_DIR}/fxtran"
RESTRUCTURING="${TOOL_DIR}/oceandsl-tools/bin/restructuring"
DELTA="${TOOL_DIR}/oceandsl-tools/bin/delta"
# collector tool
COLLECTOR="${TOOL_DIR}/collector/bin/collector"
# addr2line
ADDR2LINE=`which addr2line`
# Path to uvic repository
REPOSITORY_DIR="${REPLICATION_DIR}/UVic_ESCM/2.9"
# Compile configurtion for kieker
......@@ -44,5 +9,3 @@ PROCESSED_CODE_PATH="${REPOSITORY_DIR}/run/code"
# Path to the executable
EXECUTABLE="${REPOSITORY_DIR}/run/UVic_ESCM"
# Hostname where the dynamic analysis was executed
HOST=glasgow
......@@ -4,6 +4,12 @@ export BASE_DIR=$(cd "$(dirname "$0")"; pwd)
. "${BASE_DIR}/../../common-functions.rc"
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......@@ -56,12 +62,16 @@ for JOB_DIRECTORY in `find "${OPTIMIZATION_DATA}/jss"* -name '*uvic*job'` ; do
echo "$ORIGINAL -> $OPTIMIZED in $STEPS"
if [ -d "$OPTIMIZED" ] ; then
cat "${BASE_DIR}/template.project" | sed "s/NAME/${MODEL_ID}-$OPTIMIZED/g" > "$OPTIMIZED/.project"
rm -rf "merge-${OPTIMIZED}"
mkdir "merge-${OPTIMIZED}"
"${MOP}" -e "${MODEL_ID}-${OPTIMIZED}-merged" -i "original-model" "${OPTIMIZED}" -o "merge-${OPTIMIZED}" -s all merge >> "${MOP_LOG}" 2>&1
else
warning "Missing $OPTIMIZED model"
fi
done
else
error "Missing MED output for job $BASENAME"
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. $BASE_DIR/config
else
......
......@@ -11,6 +11,12 @@ else
exit 1
fi
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "${BASE_DIR}/config" ] ; then
. "${BASE_DIR}/config"
else
......
......@@ -4,6 +4,12 @@ export BASE_DIR=$(cd "$(dirname "$0")"; pwd)
. "${BASE_DIR}/../../common-functions.rc"
if [ -f "${BASE_DIR}/../config" ] ; then
. "${BASE_DIR}/../config"
else
echo "Main config file not found."
exit 1
fi
if [ -f "$BASE_DIR/config" ] ; then
. "${BASE_DIR}/config"
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment