Rebel 15.1 problems

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

chrisw
Posts: 4749
Joined: Tue Apr 03, 2012 4:28 pm
Location: Midi-Pyrénées
Full name: Christopher Whittington

Re: Rebel 15.1 problems

Post by chrisw »

Eelco de Groot wrote: Mon Aug 22, 2022 1:12 pm Chris says it is legacy code So I just comment out the get_file_size function in useful.cpp:

Code: Select all

/*
u32 get_file_size(char* file)
{
	assert(file != NULL);

	HANDLE fh;
	LARGE_INTEGER  size;

	size_t pReturnValue;
	wchar_t wcstr[1024];
	size_t sizeInWords = 512;
	size_t count = 512;
	errno_t err;

	err = mbstowcs_s(&pReturnValue, wcstr, sizeInWords, file, count);

	fh = CreateFile(wcstr, GENERIC_READ, 0, NULL, OPEN_EXISTING,
		FILE_ATTRIBUTE_NORMAL, NULL);
	if (!GetFileSizeEx(fh, &size)) {
		return FILE_SIZE_ERROR;
	}
	CloseHandle(fh);

	return (u32)size.QuadPart;
}

*/
So far it does not seem to hurt Ed :)


Build started...
1>------ Build started: Project: fruitig, Configuration: Release x64 ------
1>useful.cpp
1>fruitig.vcxproj -> C:\Users\Gebruiker\Downloads\Rebel-15.1-Master Fruitig version\Rebel-14.1-Master\fruitig\x64\Release\fruitig.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


But this is using your fruitig.sln useful.cpp ended up in a different place

Image

But it is still needed for compilation, I can not give useful.cpp some different extension. But the specific function might not be needed at all. The source code you gave already specified a SSE build so that did not have to change anymore.
Useful.cpp is mine. It’s a dumping ground for hacks and fixes and debug stuff that ideally gets thrown away later (more legacy code). Is any of it actually called, or is the compiler just breaking on it?
chrisw
Posts: 4749
Joined: Tue Apr 03, 2012 4:28 pm
Location: Midi-Pyrénées
Full name: Christopher Whittington

Re: Rebel 15.1 problems

Post by chrisw »

chessica wrote: Mon Aug 22, 2022 2:10 pm Part 1:
I commented out this section. After that the compilation was successful.
The EXE was generated. So far ok.

Part 2:

As shown in the attachment, this does not fix the program crash when
the calculation starts.





Rebel 15.1 UCI by Fabien Letouzey, Thomas Gaksch, Jerry Donald Watson, Chris Whittington and Ed Schroder
uci
id name Rebel 15.1
id author Fabien Letouzey, Thomas Gaksch, Jerry Donald Watson, Chris Whittington and Ed Schroder
option name Hash type spin default 128 min 4 max 16384
option name NNUE Tuner type spin default 60 min 25 max 200
option name IRR type spin default 6 min 2 max 10
option name Eval-Depth type spin default 6 min 2 max 10
option name Eval-Margin type spin default 75 min 10 max 200
option name Search Time type spin default 0 min 0 max 3600
option name Search Depth type spin default 0 min 0 max 20
option name Ponder type check default false
option name OwnBook type check default true
option name BookFile type string default performance.bin
option name MultiPV type spin default 1 min 1 max 10
option name NullMove Pruning type combo default Always var Always var Fail High var Never
option name NullMove Reduction type spin default 3 min 1 max 4
option name Razoring type check default true
option name Razoring Depth type spin default 4 min 0 max 6
option name Razoring Margin type spin default 300 min 0 max 1000
option name Razoring Decay type spin default 39 min 0 max 100
option name Evaluation Pruning type check default true
option name Evaluation Pruning Depth type spin default 5 min 0 max 6
option name History Pruning type check default true
option name History Threshold type spin default 70 min 0 max 100
option name Delta Pruning type check default true
option name Delta Margin type spin default 200 min 0 max 999
option name Quiescence Check Plies type spin default 1 min 0 max 2
option name Material type spin default 100 min 0 max 400
option name Piece Activity type spin default 100 min 0 max 400
option name Piece Square Activity type spin default 100 min 0 max 400
option name King Safety type spin default 100 min 0 max 400
option name Pawn Structure type spin default 100 min 0 max 400
option name Passed Pawns type spin default 100 min 0 max 400
option name Toga Lazy Eval type check default true
option name Toga Lazy Eval Margin type spin default 200 min 0 max 900
option name Toga Lazy Eval Mobility Margin type spin default 125 min 0 max 900
option name Toga King Pawn Endgame Bonus type spin default 30 min 0 max 100
option name Toga Rook Pawn Endgame Penalty type spin default 10 min 0 max 100
option name Threads type spin default 1 min 1 max 64
uciok
isready
readyok
ucinewgame
isready
readyok
position fen N6k/8/8/8/8/8/8/K6B w - - 0 1
go infinite
info depth 1


Image error: https://ibb.co/CQrcbwV

If i debnugging, then i get this:

#elif (USE_SSE)
int i;
int n_iterations = n_values/8;

int128 *pi = (int128*)input;
int128 *po = (int128*)output;

int128 c0 = _mm_set1_epi16(0);

for (i=0; i < n_iterations/2; i++)
{
int128 v1 = _mm_load_si128(pi++);
int128 v2 = _mm_load_si128(pi++);
int128 v8 = _mm_packs_epi16(v1, v2);
int128 s = _mm_max_epi8(v8, c0);
_mm_store_si128(po++, s);
}
#else
That tells me the engine got past the NN parsing and check controls. Ie it’s found the network, integrity checked it etc. so that part is ok.
“Failing on an illegal obstruction” looks like somewhere in the NN inference code. Most likely explanation for that (fails in your PC but not others) is that the engine compile flags do NOT match your PC.
chessica
Posts: 1004
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: Rebel 15.1 problems

Post by chessica »

chrisw wrote: Mon Aug 22, 2022 4:34 pm
That tells me the engine got past the NN parsing and check controls. Ie it’s found the network,
integrity checked it etc. so that part is ok.
“Failing on an illegal obstruction” looks like somewhere in the NN inference code. Most likely
explanation for that (fails in your PC but not others) is that the engine compile flags do NOT
match your PC.
Hi, that makes sense to me. Only it would be appropriate on the download page or in the readme
to give a hint about what requirements the program has on the system. I already had the suspicion
and that's why I wanted to compile it myself.
chessica
Posts: 1004
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: Rebel 15.1 problems

Post by chessica »

chessica wrote: Mon Aug 22, 2022 5:45 pm
chrisw wrote: Mon Aug 22, 2022 4:34 pm
That tells me the engine got past the NN parsing and check controls. Ie it’s found the network,
integrity checked it etc. so that part is ok.
“Failing on an illegal obstruction” looks like somewhere in the NN inference code. Most likely
explanation for that (fails in your PC but not others) is that the engine compile flags do NOT
match your PC.
Hi, that makes sense to me. Only it would be appropriate on the download page or in the readme
to give a hint about what requirements the program has on the system. I already had the suspicion
and that's why I wanted to compile it myself.
For general understanding I show here which version was used and leads to the crash.

Image

I would be very happy to receive a corrected working version.

thanks
User avatar
Rebel
Posts: 7435
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Rebel 15.1 problems

Post by Rebel »

Did you make the changes in SIMD.CPP and SIMD.H as previously suggested?

And BTW, you list Rebel-15 in the picture, the thread is about 15.1
90% of coding is debugging, the other 10% is writing bugs.
chessica
Posts: 1004
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: Rebel 15.1 problems

Post by chessica »

Rebel wrote: Tue Aug 23, 2022 10:10 am Did you make the changes in SIMD.CPP and SIMD.H as previously suggested?

And BTW, you list Rebel-15 in the picture, the thread is about 15.1
Oh, sorry. that was a mistake of mine. The headline is wrong. The start posting
where i showed the output of the "uci" command already says that. :-(

but also the rebel 15.1 has the same error
User avatar
Rebel
Posts: 7435
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Rebel 15.1 problems

Post by Rebel »

chessica wrote: Tue Aug 23, 2022 10:19 am
Rebel wrote: Tue Aug 23, 2022 10:10 am Did you make the changes in SIMD.CPP and SIMD.H as previously suggested?

And BTW, you list Rebel-15 in the picture, the thread is about 15.1
Oh, sorry. that was a mistake of mine. The headline is wrong. The start posting
where i showed the output of the "uci" command already says that. :-(

but also the rebel 15.1 has the same error
Questions, please answer:

1. Did you make the changes in SIMD.CPP and SIMD.H as previously suggested? If not, you are compiling the AVX2 version which of course crashes on your non-AVX2 PC.

2. I suppose you are compiling with Visual Studio. But with which version?

I am asking because Rebel is developed with Visual Studio 2019 and recently I installed Visual Studio 2020 PREVIEW on my new PC and it refused to compile. So both questions matter.
90% of coding is debugging, the other 10% is writing bugs.
chessica
Posts: 1004
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: Rebel 15.1 problems

Post by chessica »

Rebel wrote: Tue Aug 23, 2022 10:38 am
chessica wrote: Tue Aug 23, 2022 10:19 am
Rebel wrote: Tue Aug 23, 2022 10:10 am Did you make the changes in SIMD.CPP and SIMD.H as previously suggested?

And BTW, you list Rebel-15 in the picture, the thread is about 15.1
Oh, sorry. that was a mistake of mine. The headline is wrong. The start posting
where i showed the output of the "uci" command already says that. :-(

but also the rebel 15.1 has the same error
Questions, please answer:

1. Did you make the changes in SIMD.CPP and SIMD.H as previously suggested? If not, you are compiling the AVX2 version which of course crashes on your non-AVX2 PC.

2. I suppose you are compiling with Visual Studio. But with which version?

I am asking because Rebel is developed with Visual Studio 2019 and recently I installed Visual Studio 2020 PREVIEW on my new PC and it refused to compile. So both questions matter.
Point 1: I try this again and answer
Point 2: I use this version: Microsoft Visual Studio Community 2022 (64-Bit) - Current Version 17.3.1
chessica
Posts: 1004
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: Rebel 15.1 problems

Post by chessica »

chessica wrote: Tue Aug 23, 2022 10:46 am
Rebel wrote: Tue Aug 23, 2022 10:38 am
chessica wrote: Tue Aug 23, 2022 10:19 am
Rebel wrote: Tue Aug 23, 2022 10:10 am Did you make the changes in SIMD.CPP and SIMD.H as previously suggested?

And BTW, you list Rebel-15 in the picture, the thread is about 15.1
Oh, sorry. that was a mistake of mine. The headline is wrong. The start posting
where i showed the output of the "uci" command already says that. :-(

but also the rebel 15.1 has the same error
Questions, please answer:

1. Did you make the changes in SIMD.CPP and SIMD.H as previously suggested? If not, you are compiling the AVX2 version which of course crashes on your non-AVX2 PC.

2. I suppose you are compiling with Visual Studio. But with which version?

I am asking because Rebel is developed with Visual Studio 2019 and recently I installed Visual Studio 2020 PREVIEW on my new PC and it refused to compile. So both questions matter.
Point 1: I try this again and answer. In the two files, the information was already as suggested, so I did not need to change anything. Or should it be the other way around?

Point 2: I use this version: Microsoft Visual Studio Community 2022 (64-Bit) - Current Version 17.3.1
Summary: I could compile both source files version 15 and 15.1 without errors after changing the useful. But the EXE files abort when the computation is started.

The original programs loaded from the web page behave exactly the same.
chessica
Posts: 1004
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: Rebel 15.1 problems

Post by chessica »

> Rebel 15.1 23-08-2022.exe!simd_clamp(short * input, unsigned char * output, int n_values) Zeile 247 C++
Rebel 15.1 23-08-2022.exe!HalfKxLayerForward(POSITIONDATA * pos, int move, net_data * data, int us, int nply) Zeile 888 C++
Rebel 15.1 23-08-2022.exe!NetworkForward(POSITIONDATA * pos, int move, net_data * data, int us, int nply) Zeile 914 C++
Rebel 15.1 23-08-2022.exe!NnueEvaluate(POSITIONDATA * pos, int us, int nply) Zeile 1258 C++
Rebel 15.1 23-08-2022.exe!eval(board_t * board, int alpha, int beta, int ThreadId, int height) Zeile 407 C++
Rebel 15.1 23-08-2022.exe!full_quiescence(board_t * board, int alpha, int beta, int depth, int height, unsigned short * pv, int ThreadId) Zeile 1099 C++
Rebel 15.1 23-08-2022.exe!full_search(board_t * board, int alpha, int beta, int depth, int height, unsigned short * pv, int node_type, bool extended, int ThreadId) Zeile 485 C++
Rebel 15.1 23-08-2022.exe!full_root(list_t * list, board_t * board, int alpha, int beta, int depth, int height, int search_type, int ThreadId) Zeile 374 C++
Rebel 15.1 23-08-2022.exe!search_full_root(list_t * list, board_t * board, int a, int b, int depth, int search_type, int ThreadId) Zeile 286 C++
Rebel 15.1 23-08-2022.exe!search_smp(int ThreadId) Zeile 434 C++
Rebel 15.1 23-08-2022.exe!search() Zeile 311 C++
Rebel 15.1 23-08-2022.exe!parse_go(char * string) Zeile 485 C++
Rebel 15.1 23-08-2022.exe!loop_step() Zeile 180 C++
Rebel 15.1 23-08-2022.exe!loop() Zeile 102 C++
Rebel 15.1 23-08-2022.exe!main(int argc, char * * argv) Zeile 73 C++
[Externer Code]