Skip to content

Commit

Permalink
Fix Build on Older Workers (#114)
Browse files Browse the repository at this point in the history
Elo   | 10.78 +- 6.75 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=8MB
LLR   | 2.98 (-2.94, 2.94) [-5.00, 0.00]
Games | N: 3418 W: 896 L: 790 D: 1732
Penta | [34, 371, 809, 445, 50]
https://chess.aronpetkovski.com/test/2826/

bench 1849271
  • Loading branch information
xu-shawn authored Aug 13, 2024
1 parent e7dbe69 commit 4aca025
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ ifdef EVALFILE
cp $(EVALFILE) ./Serendipity/src/main/resources/embedded.nnue
endif
mvn -f ./Serendipity/pom.xml package
echo "#!/usr/bin/env -S java -jar -Xmx128m" > $(EXE)
cat ./Serendipity/target/Serendipity-Test.jar >> $(EXE)
cat header.sh ./Serendipity/target/Serendipity-Test.jar > $(EXE)
chmod +x $(EXE)
4 changes: 2 additions & 2 deletions Serendipity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<revision>Test</revision>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void set(String value)

public static void main(String args[])
{
transpositionTable = new TranspositionTable(32);
transpositionTable = new TranspositionTable(4);
options = new HashMap<>();
networkName = new NNUEOption("embedded.nnue", "nnuefile");
threads = new IntegerOption(1, 1, 1, "Threads");
Expand Down
17 changes: 17 additions & 0 deletions header.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# Taken from https://web.archive.org/web/20240813210415/https://coderwall.com/p/ssuaxa/how-to-make-a-jar-file-linux-executable

MYSELF=`which "$0" 2>/dev/null`

[ $? -gt 0 -a -f "$0" ] && MYSELF="./$0"

java=java

if test -n "$JAVA_HOME"; then
java="$JAVA_HOME/bin/java"
fi

exec "$java" -Xms48m -Xmx48m -XX:+UseParallelGC $java_args -jar $MYSELF "$@"

exit 1

0 comments on commit 4aca025

Please sign in to comment.