Scorpio Egbb Thread

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Scorpio Egbb Thread

Post by jshriver »

Has anyone been able to get the generator to compile and run under Linux?

If so any tips are appreciate, interested in generating and testing this egbb out.

For others trying it one tip I've found, (at least for gcc-4.6 in Ubuntu) there is a bug with -ldl, but it compiled cleanly after installing and setting the Makefile to point to g++-4.4

Fresh out of the box here is where I'm standing: segfault on probe.cpp line 73.

jshriver@quadbox:~/t/generator$ ./generate
EgbbProbe not Loaded!
./egbb/KQk.w
1 462 62
28644 62 1
Size 28644
Allocating 0 MB
Memory reserved
Slice 1/1 of size 28644
Thread 1/1: start 0 end 28644
Segmentation fault (core dumped)


Since this uses openmpi, I've tried running under mpirun as well, with the same results.

Is OpenMPI needed if you plan to use a single cpu or single multicore machine?
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Scorpio Egbb Thread

Post by lucasart »

I cannot compile the Scorpio EGBB generator on Linux too:

Code: Select all

$ make
g++ -O3 -fopenmp  -c generate.cpp
generate.cpp: In function ‘int main(int, char**)’:
generate.cpp:854:70: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
generate.cpp: In member function ‘void ENUMERATOR::compress()’:
generate.cpp:772:17: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
g++ -O3 -fopenmp  -c index.cpp
g++ -O3 -fopenmp  -c moves.cpp
g++ -O3 -fopenmp  -c probe.cpp
g++  -fopenmp -lm -lpthread -ldl generate.o index.o moves.o probe.o -o generate
probe.o: In function `LoadEgbbLibrary(char*, int)':
probe.cpp:(.text+0x7d): undefined reference to `dlopen'
probe.cpp:(.text+0x96): undefined reference to `dlsym'
probe.cpp:(.text+0xa6): undefined reference to `dlsym'
probe.cpp:(.text+0xba): undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
make: *** [generate] Error 1
I'm using GCC 4.7.3 (recent).
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Scorpio Egbb Thread

Post by jshriver »

That was my issue too...

apt-get install g++4-4, and change the Makefile so g++ is g++4-4

Recompile and it'll work. After reading various other forum posts this seems like a bug in -ldl and g++ 4.6 or higher in Ubuntu.

-Josh
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Scorpio Egbb Thread

Post by jshriver »

Out of curiosity I installed the free trial of Visual Studio Desktop aka C++ to compile it. Outside a single line which was only a printf for debugging (ended up commenting out), it compiled cleanly.

But the same error is happening with it, in regards to being:

"EgbbProbe unable to load"

Wondering if the generator requires the probing code? But tried that in linux with no luck, and was able to build cleanly in VS for windows and move the .dll to the same folder as generate.

Hrm at an impasse
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Scorpio Egbb Thread

Post by Daniel Shawul »

Joshua,
I tried to warn you that code was not finished yet because I was experimenting with slicing of egbbs for generation, and parallelization with openmp, reverse indexing etc. For the generator to work you need to compile the latest egbbdll probes (v4.0) because generation of larger piece egbbs uses it to probe to smaller ones like a regular chess engine does. Those have to be in the same directory as the egbbs being generated. I will let you know if and when 6 men are ready.

I see that the 5 men you host aren't even the most recent so I put up a download link for v3.0 which are 200mb. Let me know when you are done downloading them so that I can remove it. This is not going to work for 6 men generation so you will have to wait until I complete 6-men generation code, which I don't find all that exciting because they loose all of the good properties of bitbases ( bulky and slow ).
Thanks
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Scorpio Egbb Thread

Post by jshriver »

Thank you very much and sorry for the confusion.

The download should be done in 11minutes, so by the time you read this it should be good to remove the link.

I'll keep my eyes and ears open for news updates on your egbb :)

-Josh
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Scorpio Egbb Thread

Post by Daniel Shawul »

Err...I felt pressured to do something about this :) I squeezed in egbb generation into my super-busy schedule and produced 100 pawn-less 6-man egbbs. They seem to work fine from the few positions that I tested it.

One minor change I introduced has increased size of egbbs from 220mb to 320mb for 5 men, and I can not seem to find the old format that produced the 220mb size! The 6 men are being generated with this new format so they will probably be unnecessarily bigger by that much. But I don't plan to change it because the current streaming order of pieces from the lowest mobile piece pawn to the highest mobile piece queen seems to be much better during caching for both in RAM and disk. So whatever is gained from better compression will be lost during access. I plan to use the 6-men during search as well so the increased size is ok I guess.

So how do you share this after they are generated? I wouldn't want anyone to try and generate himself since it is about 5x times slower than other fast generators. Anyway I will let you know once at least all the 214 pawn-less 6-man are finished.

Daniel
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Scorpio Egbb Thread

Post by jshriver »

Daniel Shawul wrote: So how do you share this after they are generated?

Daniel
Once you release a full 6man with pawns generator... I have an a couple high end rigs that can generate them :) Given it's in near/equal or semi-equal time to the last ones.

Anyway, I have the bandwidth, web, and CPU. Just need the code good sir, so I can make and share with everyone else.

If you really want to push the 6men pawnless... I could setup a ftp account for you on my server to upload them, and I can do the rest from there. Just let me know! Truly greatful for whatever you do.

-Josh


P.S. If you saw my previous scorpio offering, any idea what "version" that was for? It matters for my next project, else I can label them Scorpio 2.0minus.

Edit: maybe it's the Facebook influence but I wish there was a "like" function here lol
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Scorpio Egbb Thread

Post by Daniel Shawul »

I am glad you seem to be more excited about it than I am :) Well I will definitely finish the pawnless but I am not sure about the others because I don't have the patience. Unfortunately my generator is not competitive interms of speed but it has an advantage that it can generate 6 men pawn-full with 4GB ram so you can generate them in parallel on a cluster of 'small' machines with out the need for a big SMP machine. The pawn-less also require about 4.4GB which is Ok but you have to ask for 5GB RAM machine. Anyway once I am done, and verify that everything is ok, I will start pushing to your ftp. I will let you know when I start to do that. But before that I want to make sure the format is optimal to avoid all those past hassles I had with format,versions etc. I will try to post-process them and see if there is a significant gain in compression otherwise that will be the format forever.
Daniel
P.S: Old version was 2.0, then 3.3 I think.