From 18c1e7ad8e8a1bde0dbde327daeca9a23ddc582b Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Thu, 14 Nov 2024 22:09:15 +0100 Subject: [PATCH] Reverted theta-start.sh --- scripts/theta-start.sh | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/scripts/theta-start.sh b/scripts/theta-start.sh index 2cf0cc4eac..b54acf3c63 100755 --- a/scripts/theta-start.sh +++ b/scripts/theta-start.sh @@ -15,22 +15,6 @@ grep -o "openjdk $JAVA_VERSION" <<< "$(java --version)" >/dev/null || { exit 1 } - -determine_memlimit() { - cgroup_file="/proc/self/cgroup" - if [[ -f "$cgroup_file" ]]; then - memory_cgroup=$(grep memory "$cgroup_file" | cut -d: -f3) - if [[ ! -z "$memory_cgroup" ]]; then - memory_limit_file="/sys/fs/cgroup/memory${memory_cgroup}/memory.limit_in_bytes" - if [[ -f "$memory_limit_file" ]]; then - cat "$memory_limit_file" - return 0 - fi - fi - fi - echo 0 -} - remove_property() { local args=() local skip=0 @@ -50,7 +34,7 @@ remove_property() { } if [ "$1" == "--version" ]; then - LD_LIBRARY_PATH=$scriptdir/lib java -jar "$scriptdir"/theta.jar --version + LD_LIBRARY_PATH=$scriptdir/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar --version else modified_args=$(remove_property "${@:2}") property=$(cat .property && rm .property) @@ -72,8 +56,8 @@ else transformed_property="$property" fi - echo LD_LIBRARY_PATH="$scriptdir"/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar $modified_args --input "$IN" --property "$transformed_property" --smt-home "$scriptdir"/solvers --memlimit "$(determine_memlimit)" - LD_LIBRARY_PATH="$scriptdir"/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar $modified_args --input "$IN" --property "$transformed_property" --smt-home "$scriptdir"/solvers --memlimit "$(determine_memlimit)" + echo LD_LIBRARY_PATH="$scriptdir"/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar $modified_args --input "$IN" --property "$transformed_property" --smt-home "$scriptdir"/solvers + LD_LIBRARY_PATH="$scriptdir"/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar $modified_args --input "$IN" --property "$transformed_property" --smt-home "$scriptdir"/solvers if [ "$(basename "$property")" == "termination.prp" ]; then echo "Not yet mapping witnesses from '$transformed_property' to '$property', hoping for the best"