Request Cfish dev with BMI2 support

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

Moderators: hgm, Rebel, chrisw

main line
Posts: 60
Joined: Thu Jul 07, 2016 10:15 pm

Re: Request Cfish dev with BMI2 support

Post by main line »

Nordlandia wrote: Mon May 21, 2018 9:11 am The problem is present on my end. I reinstalled MSYS2 and updated packages, then pasting the script.

Is something else needed beside MSYS2?
How I understand, only requirements are:
1. you need installed Windows 10 (for Linux is different procedure )
2. you can make BMI 2 version only in PC which contains bmi2-processor. I tried to make popcnt version in non-popcnt PC without success. I tried to make BMI2 version in popcnt PC without success too. It means you can't make bmi2 version in other non-bmi2 PC and transport in the bmi-2 PC.
Ahhh I've just seen your "new" i7-5960X, this is non-bmi2. But I remember you had AMD Ryzen Threadripper 1950X, and it supports bmi2 instruction.
You can make bmi2-Cfish only in your AMD Ryzen Threadripper 1950X and you can use it in same PC.
3. Here is full video how to do everything for make non-popcnt, popcnt (and probably bmi2 Cfish):
https://www.youtube.com/watch?v=jQPq5wBhOSc

4. you need delete 3 files ( master-ZIP, Cfish master-folder and cfish_x64.exe ) in this folder C:\msys64\home\<your name> every time before you paste the script again.

5. you can simply paste next script and see what exes will be made (but link after "# download the Stockfish source code" must be full not short like below) :
#!/bin/bash
# makefish.sh

# install packages if not already installed
unzip -v &> /dev/null || pacman -S --noconfirm unzip
make -v &> /dev/null || pacman -S --noconfirm make
g++ -v &> /dev/null || pacman -S --noconfirm mingw-w64-x86_64-gcc

# download the Stockfish source code
wget https://github.com/official-stockfish/S ... master.zip
unzip master.zip
cd Stockfish-master/src

# build the stockfish executable
# to speedup the building process you can keep only the section that fits your CPU architecture

# build the binary for CPUs without popcnt and bmi2 instructions (e.g. older than Intel Sandy Bridge)
make profile-build ARCH=x86-64 COMP=mingw
strip stockfish.exe
mv stockfish.exe ../../stockfish_x64.exe
make clean

# build the binary for CPU with popcnt instruction (e.g. Intel Sandy Bridge)
if [ "$(g++ -Q -march=native --help=target | grep mpopcnt | grep enabled)" ] ; then
make profile-build ARCH=x86-64-modern COMP=mingw
strip stockfish.exe
mv stockfish.exe ../../stockfish_x64_modern.exe
make clean
fi

# build the binary for CPU with bmi2 instruction (e.g. Intel Haswell or newer)
if [ "$(g++ -Q -march=native --help=target | grep mbmi2 | grep enabled)" ] ; then
make profile-build ARCH=x86-64-bmi2 COMP=mingw
strip stockfish.exe
mv stockfish.exe ../../stockfish_x64_bmi2.exe
make clean
fi

cd
Full link is here
https://github.com/glinscott/fishtest/w ... on-Windows
main line
Posts: 60
Joined: Thu Jul 07, 2016 10:15 pm

Re: Request Cfish dev with BMI2 support

Post by main line »

Sorry, it seems i7-5960X supports bmi-2.
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: Request Cfish dev with BMI2 support

Post by Nordlandia »

Can't someone compile Cfish with BMI2 and case solved.

Once following patch is merged.

Date: Mon May 21 09:51:05 2018 +0200
Timestamp: 1526889065
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Request Cfish dev with BMI2 support

Post by Dann Corbit »

What exactly happens when you try to build it?
Can you copy the screen output and show us?

I guess it will be simple to fix it.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.