Skip to content
Snippets Groups Projects
Commit bacf1a8f authored by Satya Prakash Nayak's avatar Satya Prakash Nayak
Browse files

working one

parent cb04ee75
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,7 @@ RUN apt-get update && \
libblas-dev \
liblapack-dev \
python3-distutils \
bc \
systemd
bc
# Install Haskell stack
......
#!/bin/bash
TIMEOUT=$1
# Set memory limit to 8GB
ulimit -v 8000000
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
TIMESTAMP=`date +%Y-%m-%d-%H-%M-%S`
......@@ -32,8 +35,7 @@ muval() {
$RPGCONVERT muclp < $filename > $hesfile
starttime=`date +%s%N`
result=`timeout $TIMEOUT systemd-run --scope -p MemoryMax=8G --user \
$BINARY_MV $OPTS_MV $hesfile 2>> $LOGFILE_MV`
result=$(timeout $TIMEOUT bash -c "$BINARY_MV $OPTS_MV $hesfile" 2>> $LOGFILE_MV)
endtime=`date +%s%N`
local elapsed_time=$(echo "scale=2; ($endtime - $starttime) / 1000000000" | bc)
......@@ -65,18 +67,13 @@ rpgprune() {
local cmd="$MAINDIR/rpg-stela/builds/rpg-stela solve"
local opts="$2"
local shortcmd="$3"
local save_log="$4"
log_file="$LOGS_RPG_STELA/${shortname}-${shortcmd}"
echo -n "${shortname}-${shortcmd}:"
local starttime=`date +%s%N`
if [ "$save_log" -eq 1 ]; then
{ timeout $TIMEOUT systemd-run --scope -p MemoryMax=8G --user $cmd $opts < "$filename" 2> "$log_file"; } || { echo "TIMED OUT"; echo -n ",TO" >> $output; return; }
else
{ timeout $TIMEOUT systemd-run --scope -p MemoryMax=8G --user $cmd $opts < "$filename" > /dev/null 2>&1; } || { echo "TIMED OUT"; echo -n ",TO" >> $output;return; }
fi
{ timeout $TIMEOUT bash -c "$cmd $opts < $filename" 2> "$log_file"; } || { echo "TIMED OUT"; echo -n ",TO" >> $output; return; }
local endtime=`date +%s%N`
local elapsed_time=$(echo "scale=2; ($endtime - $starttime) / 1000000000" | bc)
......@@ -103,11 +100,11 @@ execute_file() {
echo -n "$shortname,$domain,$loc_count,$output_count,$input_count" >> $output
### run each tool and save the logs ###
rpgprune $shortname "--enable-no-pruning" "normal" 1
rpgprune $shortname "" "pruning" 1
rpgprune $shortname "--enable-no-caching" "prune-only" 1
rpgprune $shortname "--enable-no-pruning" "normal"
rpgprune $shortname "" "pruning"
rpgprune $shortname "--enable-no-caching" "prune-only"
rpgprune $shortname "--enable-no-pruning --enable-no-caching" "rpgsolve" 1
rpgprune $shortname "--enable-no-pruning --enable-no-caching" "rpgsolve"
muval $shortname
}
......
......@@ -47,7 +47,7 @@ defaultConfig :: Config
defaultConfig =
Config
{ smtConf = defaultSMTConfig
, pestelLoc = "/home/tool/pestel/pestel"
, pestelLoc = "/tool/pestel/pestel"
, timeoutAttractorCache = 60000
, boundSubgames = maxBound
, logging = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment