summaryrefslogtreecommitdiff
path: root/start
diff options
context:
space:
mode:
Diffstat (limited to 'start')
-rwxr-xr-xstart16
1 files changed, 4 insertions, 12 deletions
diff --git a/start b/start
index 596d81c..d4d0cc8 100755
--- a/start
+++ b/start
@@ -47,26 +47,18 @@ main() {
OUTPUT_PATH="$OUTPUT_PATH/$(date -u +"%d-%m-%YT%H.%M.%S")"
mkdir -p "$OUTPUT_PATH/pipeline"
cp -r "$PIPELINE_PATH" "$OUTPUT_PATH"
- start_jobs $USE_SBATCH "$MODELS_PATH"
+ start_jobs
}
start_jobs() {
- USE_SBATCH=$1
- MODELS_PATH=$2
-
STRAT_LEN=${#STRATEGIES[@]}
serialize_array STRATEGIES STRAT_STR "|"
- ALL_MODELS=$(find "$MODELS_PATH" -type d -printf '%f\n' | tail -n+2 | sort | head -n "$NUM_PROBLEMS")
-
TOTAL_TIME_LIMIT=$(echo "($TIME_LIMIT * $STRAT_LEN * 16) / 60 + 1" | bc)
- for MODEL in $ALL_MODELS; do
- if [ "$USE_SBATCH" == "true" ]; then
- sbatch --time "$TOTAL_TIME_LIMIT" "$PIPELINE_PATH/run-model" "$PIPELINE_PATH/verifypn-linux64" "$TIME_LIMIT" "$STRAT_STR" "$MODELS_PATH/$MODEL" "$OUTPUT_PATH/$MODEL.csv"
- else
- timeout "${TOTAL_TIME_LIMIT}m" "$PIPELINE_PATH/run-model" "$PIPELINE_PATH/verifypn-linux64" "$TIME_LIMIT" "$STRAT_STR" "$MODELS_PATH/$MODEL" "$OUTPUT_PATH/$MODEL.csv"
- fi
+ for MODEL in $(ls "$MODELS_PATH" | head -n "$NUM_PROBLEMS"); do
+ sbatch --time "$TOTAL_TIME_LIMIT" "$PIPELINE_PATH/run-model" "$BINARY" "$TIME_LIMIT" "$STRAT_STR" "$MODELS_PATH/$MODEL" "$OUTPUT_PATH/$MODEL.csv"
+ # timeout "${TOTAL_TIME_LIMIT}m" "$PIPELINE_PATH/run-model" "$BINARY" "$TIME_LIMIT" "$STRAT_STR" "$MODELS_PATH/$MODEL" "$OUTPUT_PATH/$MODEL.csv"
done
}