CFish

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

Moderators: hgm, Rebel, chrisw

Ras
Posts: 2488
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: CFish

Post by Ras »

Eelco de Groot wrote:Also no 32 bit compile, I am not sure Cfish supports that.
Any idea why that is?

I can only think of three reasons why a C software won't compile in 32 bit:
1) it is using several GB of RAM and unable to configure that to 3GB or less. That can only be the hashtables, and that should be configurable anyway.
2) it is using inline assembly or compiler builtins that rely on 64 bit instructions.
3) is is not written in a clean way and uses "magic numbers" for the data type widths. Like assuming a pointer is 8 bytes instead of using the appropriate C99 data types (e.g. uintptr_t) and sizeof.

Other stuff like processing 64 bit integers is perfectly possible on a 32 bit system, albeit slower because it will take several machine instructions instead of just one.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: CFish

Post by syzygy »

Or it just hasn't been tested.

For my own convenience I changed the Makefile to default to 64-bit.

I compiled a 32-bit binary and it crashed when trying to print out a size_t as a 64-bit number in a single place. So that will be fixed.

On windows there may be further problems with format specifiers. Somewhat annoyingly different mingw-w64 versions seem to complete contradict each other as to what should be accepted and/or warned about. (-Wno-format is probably the solution, but at least it does detect the size_t problem that was real.)
Ras
Posts: 2488
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: CFish

Post by Ras »

syzygy wrote:Or it just hasn't been tested.
Well, that of course makes sense.
On windows there may be further problems with format specifiers. Somewhat annoyingly different mingw-w64 versions seem to complete contradict each
Yes, MingW sucks in that regard because it tries to go with the Microsoft conventions.

What is the RAM consumption of CFish if you don't count the hash tables, but including static RAM usage and stack? Just asking for a potential successor of my embedded project.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: CFish

Post by syzygy »

Ras wrote:
syzygy wrote:Or it just hasn't been tested.
Well, that of course makes sense.
On windows there may be further problems with format specifiers. Somewhat annoyingly different mingw-w64 versions seem to complete contradict each
Yes, MingW sucks in that regard because it tries to go with the Microsoft conventions.
My MingW cross-compiler on Linux does that. So I "fix" it by using Microsoft conventions on Windows, but then my MingW-compiler on Windows starts to complain (but stills produces a functional binary).
What is the RAM consumption of CFish if you don't count the hash tables, but including static RAM usage and stack? Just asking for a potential successor of my embedded project.
Compared to Stockfish it statically allocates at the start what it might be needing throughout the game, whereas Stockfish allocates far more on the stack. Total memory requirements are not really different. Functionally it is Stockfish.
Gusev
Posts: 1476
Joined: Mon Jan 28, 2013 2:51 pm

Re: CFish

Post by Gusev »

Good news! My new Cfish compile, from the 2016-09-17 code, no longer plays Rxa3 in that problematic position. It makes a reasonable move. (The two old compiles continue to want to play Rxa3, so this is reproducible here.)
syzygy wrote:
syzygy wrote:
Jouni wrote:One note: 12.9. version gives in bench 6024713 at first run, then totally different values like 5122529 4862840 etc. :? .
Ah, it seems SF clears hash etc. between runs. Thanks :)
So did Cfish, but the counter move history tables were not correctly being cleared. Fixed now.
peter
Posts: 3186
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: CFish

Post by peter »

Hi Eelco!
Eelco de Groot wrote:
Thanks to the 8 downloaders so far :D!
Don't know if I'm counted within already, otherwise there should be at least 9 now.
:)
Thank you
:!:
Peter.
Jouni
Posts: 3292
Joined: Wed Mar 08, 2006 8:15 pm

Re: CFish

Post by Jouni »

If CFish is for speed where is bmi compile!?
Jouni
Damir
Posts: 2801
Joined: Mon Feb 11, 2008 3:53 pm
Location: Denmark
Full name: Damir Desevac

Re: CFish

Post by Damir »

You can find the bmi compile here. But you must register.

http://www.computerchess.info/tdbb/phpB ... 679&p=3939
APassionForCriminalJustic
Posts: 417
Joined: Sat May 24, 2014 9:16 am

Re: CFish

Post by APassionForCriminalJustic »

syzygy wrote:
Ras wrote:
syzygy wrote:Or it just hasn't been tested.
Well, that of course makes sense.
On windows there may be further problems with format specifiers. Somewhat annoyingly different mingw-w64 versions seem to complete contradict each
Yes, MingW sucks in that regard because it tries to go with the Microsoft conventions.
My MingW cross-compiler on Linux does that. So I "fix" it by using Microsoft conventions on Windows, but then my MingW-compiler on Windows starts to complain (but stills produces a functional binary).
What is the RAM consumption of CFish if you don't count the hash tables, but including static RAM usage and stack? Just asking for a potential successor of my embedded project.
Compared to Stockfish it statically allocates at the start what it might be needing throughout the game, whereas Stockfish allocates far more on the stack. Total memory requirements are not really different. Functionally it is Stockfish.
Hello Ronald,

Do you know how to make cfish as an LTO compile? I used to make Stockfish as LTO which forced me to include the three dlls to run the exe. It is faster though... non static. What change do I need to make to the makefile to create LTO?
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: CFish

Post by syzygy »

APassionForCriminalJustic wrote:Do you know how to make cfish as an LTO compile? I used to make Stockfish as LTO which forced me to include the three dlls to run the exe. It is faster though... non static. What change do I need to make to the makefile to create LTO?
In the Makefile, add -flto where the SF Makefile has -flto.

I think you just need to delete a few #'s (which now comment out the -flto). So "# -flto" becomes "-flto".