Skip to content

Commit

Permalink
Improve run.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Apr 28, 2024
1 parent 8626b3b commit 1b78df8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[submodule "src/scripts/merge_tools/merging"]
path = src/scripts/merge_tools/merging
url = [email protected]:plume-lib/merging.git
url = https://github.com/plume-lib/merging.git
pushurl = [email protected]:plume-lib/merging.git
ignore = dirty
12 changes: 8 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ OUT_DIR="results/$RUN_NAME"
N_MERGES=$3
CACHE_DIR="${4}"

# Check if it's run on MacOS, if yes raise an error
# Do not run this script on MacOS.
backend=$(uname -s)
if [ "$backend" = "Darwin" ]; then
echo "Error: MacOS is not supported. Please run the script on a Linux machine. This is due to the use of readarray in certain merge tools."
Expand Down Expand Up @@ -59,8 +59,8 @@ while [ $# -gt 0 ]; do
shift
done

PATH=$(pwd)/src/scripts/merge_tools/:$PATH
PATH=$(pwd)/src/scripts/merge_tools/merging/src/main/sh/:$PATH
PATH=$(pwd)/src/scripts/merge_tools:$PATH
PATH=$(pwd)/src/scripts/merge_tools/merging/src/main/sh:$PATH
export PATH

# Check if cache.tar exists and cache is missing
Expand All @@ -78,7 +78,10 @@ if [ -z "${machine_id:+isset}" ] ; then machine_id=0; fi
if [ -z "${num_machines:+isset}" ] ; then num_machines=1; fi

export JAVA_HOME=$JAVA17_HOME
./src/scripts/merge_tools/merging/gradlew -p src/scripts/merge_tools/merging shadowJar
if [ ! -f ./src/scripts/merge_tools/merging/.git ] ; then
git submodule update --init --recursive
fi
(cd ./src/scripts/merge_tools/merging && ./gradlew shadowJar)

echo "Machine ID: $machine_id"
echo "Number of machines: $num_machines"
Expand All @@ -101,6 +104,7 @@ if [ "$only_plotting" = true ]; then
exit 0
fi

export JAVA_HOME=$JAVA11_HOME
./gradlew -q assemble -g ../.gradle/

mkdir -p "$OUT_DIR"
Expand Down

0 comments on commit 1b78df8

Please sign in to comment.