Closed tissatussa closed 1 month ago
Thanks for notifying me! I was working on the SPSA tuning and it required some changes to the make file, I've not tested them on linux yet so will try tomorrow and see if I can fix it.
For now the old make file should still work. https://github.com/Timmoth/Sapling/blob/e5d642ea59d65de565dd4823ed1e7ac13d721137/Makefile
I've added a new set of build scripts, would you be able to pull down the source and run ./scripts/build_linux_avx256.sh and let me know if it works for you?
..run ./scripts/build_linux_avx256.sh and let me know if it works for you?
first, the folder is named 'Scripts', with a capital 'S', which is important on Linux, so i changed that .. second, it seems you aim 'avx256' but i only can do avx2, so i hope this doesn't spoil anything .. anyhow, after setting executable rights to the .sh file, i executed your command, but :
$ ./Scripts/build_linux_avx256.sh
MSBUILD : error MSB1009: Project file does not exist.
Switch: ../src/Sapling/Sapling.csproj
I tried to solve this quickly, but i didn't succeed yet .. also, be aware Linux uses '/' in paths, not '\' like Windows does .. is it important in this case ?
It does work for me on ubuntu. I think the problem is that you're trying to execute the script from the root dir, try:
cd ./Scripts
./build_linux_avx256.sh
..the problem is that you're trying to execute the script from the root dir..
indeed, now compiling succeeded :
(base) roelof@roelof-HP-Elite-x2-1012-G2:~/Compiled/Sapling-v1.1.8/Scripts$ ./build_linux_avx256.sh
Determining projects to restore...
Restored /home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/Sapling.csproj (in 501 ms).
Restored /home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj (in 501 ms).
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Tuning/SpsaOptions.cs(7,23): warning CS8618: Non-nullable field 'Name' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Tuning/SpsaOptions.cs(8,23): warning CS8618: Non-nullable field 'Type' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Tuning/SpsaOptions.cs(9,23): warning CS8618: Non-nullable field 'DefaultValue' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Tuning/SpsaOptions.cs(10,23): warning CS8618: Non-nullable field 'MinValue' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Tuning/SpsaOptions.cs(11,23): warning CS8618: Non-nullable field 'MaxValue' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Tuning/SpsaOptions.cs(12,26): warning CS8618: Non-nullable field 'FieldHandle' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Evaluation/NnueWeights.cs(56,20): warning CS8602: Dereference of a possibly null reference. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/RepetitionDetector.cs(63,26): warning CS8509: The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern '0' is not covered. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/Sapling.Engine.csproj]
Sapling.Engine -> /home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/bin/Release/net8.0/Sapling.Engine.dll
Successfully created package '/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/bin/Release/SaplingEngine.1.1.0.nupkg'.
Successfully created package '/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling.Engine/bin/Release/SaplingEngine.1.1.0.symbols.nupkg'.
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/UciEngine.cs(31,23): warning CS8602: Dereference of a possibly null reference. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/Sapling.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/Program.cs(34,34): warning CS8602: Dereference of a possibly null reference. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/Sapling.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/Program.cs(23,31): warning CS8618: Non-nullable field '_fileStream' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/Sapling.csproj]
/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/Program.cs(24,33): warning CS8618: Non-nullable field '_logWriter' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/Sapling.csproj]
Sapling -> /home/roelof/Compiled/Sapling-v1.1.8/src/Sapling/bin/Release/net8.0/linux-x64/Sapling.dll
Sapling -> /home/roelof/Compiled/Sapling-v1.1.8/Scripts/
Attempting to rename executable file from /home/roelof/Compiled/Sapling-v1.1.8/Scripts//Sapling to /home/roelof/Compiled/Sapling-v1.1.8/Scripts//Sapling_linux_avx256
(base) roelof@roelof-HP-Elite-x2-1012-G2:~/Compiled/Sapling-v1.1.8/Scripts$ ./Sapling_linux_avx256
uci
id name Sapling 1-1-8
id author Tim Jones
option name Threads type spin default 1 min 1 max 1024
option name Ponder type check default false
option name Hash type spin default 319 min 32 max 2046
uciok
NOTE: i got warnings, but no errors
All of those warnings are benign, though I will go through and sort them!
compiling v1.1.4 fails on my Linux :
i often have trouble compiling dotnet / C# programs .. previous v1.1.3 went well (except a few warnings) but now i can't solve it ..