From c2275e4b9625a1a19eb50d0880f70ed583d5c358 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 8 Jul 2024 19:22:16 +0200 Subject: Stats for h48 solver as tool --- tools/run_tool.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tools/run_tool.sh') diff --git a/tools/run_tool.sh b/tools/run_tool.sh index 21b6ce9..14d0e45 100755 --- a/tools/run_tool.sh +++ b/tools/run_tool.sh @@ -6,21 +6,29 @@ if [ -z "$TOOL" ]; then fi CC="cc -std=c99 -pedantic -Wall -Wextra \ - -Wno-unused-parameter -Wno-unused-function -O3 -D$CUBETYPE \ + -Wno-unused-parameter -Wno-unused-function -D$CUBETYPE \ -D_POSIX_C_SOURCE=199309L" +if [ -n "$DEBUG" ]; then + CC="$CC -fsanitize=address -g3" + CUBEOBJ="debugcube.o" +else + CC="$CC -O3" + CUBEOBJ="cube.o" +fi + [ "$CUBETYPE" = "CUBE_AVX2" ] && CC="$CC -mavx2" BIN="tools/run" -CUBEOBJ="cube.o" d="$(date +'%Y-%m-%d-%H-%M-%S')" for t in tools/*; do if [ ! -d "$t" ] || [ -z "$(echo "$t" | grep "$TOOL")" ]; then continue fi + toolname="$(basename "$t" .c)" $CC -o $BIN $t/*.c $CUBEOBJ || exit 1; - $BIN + $BIN | tee "tools/results/$toolname-$d.txt" break done -- cgit v1.3