M1 Apple Silicon for Chess?

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

Moderators: hgm, Rebel, chrisw

User avatar
AlexChess
Posts: 1493
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

acepoint_de wrote: Sun Sep 12, 2021 6:57 pm
AlexChess wrote: Sat Sep 11, 2021 11:42 am https://acepoint.de/seven-at-one-stroke/ is missing from July, 13
Pretty busy the last two months, but...

...some updates for the m1: berserk-4.5.1, lc0-0.28, mayhem-5.7, shashchess-18.1, stockfish-20210912, sugar-AI-2.4, sugar-AI-ICCF-2.4

https://acepoint.de/new-updates-for-the-m1/

Ciao

acepoint
Thank you!!!!! :D
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum TROLLS KINDERGARTEN
User avatar
AlexChess
Posts: 1493
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

acepoint_de wrote: Sun Sep 12, 2021 6:57 pm
AlexChess wrote: Sat Sep 11, 2021 11:42 am https://acepoint.de/seven-at-one-stroke/ is missing from July, 13
Pretty busy the last two months, but...

...some updates for the m1: berserk-4.5.1, lc0-0.28, mayhem-5.7, shashchess-18.1, stockfish-20210912, sugar-AI-2.4, sugar-AI-ICCF-2.4

https://acepoint.de/new-updates-for-the-m1/

Ciao

acepoint
Very happy that you are back, my skIlled chess friend! :D

List of other open sources updates available (eventually) :oops: to natively compile on mac M1 :

Winter 0.9.5 NNUE https://github.com/rosenthj/Winter
Minic 3.1.3 https://github.com/tryingsomestuff/Minic
Nemorino 6.0.5 https://bitbucket.org/christian_g_nther ... rc/master/ 6.0.0 patch 1 (6.0.5 is the nnue)
Seer 2.3.0 https://github.com/connormcmonigle/seer-nnue
Koivisto 6.90 https://github.com/Luecx/Koivisto
Fire 8.NN.MC.3 https://github.com/FireFather/fire
Fat Titz 1.1 310821 by Sopel (it's really strong, probably n.1!!!) https://github.com/Sopel97/FatTitz/releases/tag/v1.1
CorChess NN 2.0 100921 https://github.com/IIvec/Stockfish/tree/corchess
Combusken 1.4.0 https://github.com/mhib/combusken

Thank you!
Best regards, Alex
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum TROLLS KINDERGARTEN
User avatar
AlexChess
Posts: 1493
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

Open source engines still not available on Mac Silicon M1:

Demolito https://github.com/lucasart/Demolito
Drofa 2.3.0 https://github.com/justNo4b/Drofa
Wasp 4.5.0 http://www.amateurschach.de/main/_wasp-beta-test.htm

Best regards, Alex
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum TROLLS KINDERGARTEN
Luecx
Posts: 138
Joined: Thu Jun 18, 2020 9:20 pm
Full name: Finn Eggers

Re: M1 Apple Silicon for Chess?

Post by Luecx »

AlexChess wrote: Mon Sep 13, 2021 11:43 am
acepoint_de wrote: Sun Sep 12, 2021 6:57 pm
AlexChess wrote: Sat Sep 11, 2021 11:42 am https://acepoint.de/seven-at-one-stroke/ is missing from July, 13
Pretty busy the last two months, but...

...some updates for the m1: berserk-4.5.1, lc0-0.28, mayhem-5.7, shashchess-18.1, stockfish-20210912, sugar-AI-2.4, sugar-AI-ICCF-2.4

https://acepoint.de/new-updates-for-the-m1/

Ciao

acepoint
Very happy that you are back, my skIlled chess friend! :D

List of other open sources updates available (eventually) :oops: to natively compile on mac M1 :

Winter 0.9.5 NNUE https://github.com/rosenthj/Winter
Minic 3.1.3 https://github.com/tryingsomestuff/Minic
Nemorino 6.0.5 https://bitbucket.org/christian_g_nther ... rc/master/ 6.0.0 patch 1 (6.0.5 is the nnue)
Seer 2.3.0 https://github.com/connormcmonigle/seer-nnue
Koivisto 6.90 https://github.com/Luecx/Koivisto
Fire 8.NN.MC.3 https://github.com/FireFather/fire
Fat Titz 1.1 310821 by Sopel (it's really strong, probably n.1!!!) https://github.com/Sopel97/FatTitz/releases/tag/v1.1
CorChess NN 2.0 100921 https://github.com/IIvec/Stockfish/tree/corchess
Combusken 1.4.0 https://github.com/mhib/combusken

Thank you!
Best regards, Alex
I didnt know Koivisto 6.90 already exists. :) (I think you mean Koivisto 6.9)
The next version after that would be 6.10, 6.11, 6.12.
The ability to speak does not make you intelligent. https://github.com/Luecx/Koivisto

Image
User avatar
AlexChess
Posts: 1493
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

Luecx wrote: Tue Sep 14, 2021 9:39 am
AlexChess wrote: Mon Sep 13, 2021 11:43 am
acepoint_de wrote: Sun Sep 12, 2021 6:57 pm
AlexChess wrote: Sat Sep 11, 2021 11:42 am https://acepoint.de/seven-at-one-stroke/ is missing from July, 13
Pretty busy the last two months, but...

...some updates for the m1: berserk-4.5.1, lc0-0.28, mayhem-5.7, shashchess-18.1, stockfish-20210912, sugar-AI-2.4, sugar-AI-ICCF-2.4

https://acepoint.de/new-updates-for-the-m1/

Ciao

acepoint
Very happy that you are back, my skIlled chess friend! :D

List of other open sources updates available (eventually) :oops: to natively compile on mac M1 :

Winter 0.9.5 NNUE https://github.com/rosenthj/Winter
Minic 3.1.3 https://github.com/tryingsomestuff/Minic
Nemorino 6.0.5 https://bitbucket.org/christian_g_nther ... rc/master/ 6.0.0 patch 1 (6.0.5 is the nnue)
Seer 2.3.0 https://github.com/connormcmonigle/seer-nnue
Koivisto 6.90 https://github.com/Luecx/Koivisto
Fire 8.NN.MC.3 https://github.com/FireFather/fire
Fat Titz 1.1 310821 by Sopel (it's really strong, probably n.1!!!) https://github.com/Sopel97/FatTitz/releases/tag/v1.1
CorChess NN 2.0 100921 https://github.com/IIvec/Stockfish/tree/corchess
Combusken 1.4.0 https://github.com/mhib/combusken

Thank you!
Best regards, Alex
I didnt know Koivisto 6.90 already exists. :) (I think you mean Koivisto 6.9)
The next version after that would be 6.10, 6.11, 6.12.
Thank you Luecx for your comment!!! I have finally found Koivisto 6.15 compiled by someone also for Windows 10 x64 popcnt sse3. Already tested and I like it! All Koivisto PGN games 24 points / 57 very good :wink: https://onedrive.live.com/?cid=B0F79706 ... 69&o=OneUp

Best regards, Alex
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum TROLLS KINDERGARTEN
Luecx
Posts: 138
Joined: Thu Jun 18, 2020 9:20 pm
Full name: Finn Eggers

Re: M1 Apple Silicon for Chess?

Post by Luecx »

AlexChess wrote: Tue Sep 14, 2021 12:41 pm
Luecx wrote: Tue Sep 14, 2021 9:39 am
AlexChess wrote: Mon Sep 13, 2021 11:43 am
acepoint_de wrote: Sun Sep 12, 2021 6:57 pm
AlexChess wrote: Sat Sep 11, 2021 11:42 am https://acepoint.de/seven-at-one-stroke/ is missing from July, 13
Pretty busy the last two months, but...

...some updates for the m1: berserk-4.5.1, lc0-0.28, mayhem-5.7, shashchess-18.1, stockfish-20210912, sugar-AI-2.4, sugar-AI-ICCF-2.4

https://acepoint.de/new-updates-for-the-m1/

Ciao

acepoint
Very happy that you are back, my skIlled chess friend! :D

List of other open sources updates available (eventually) :oops: to natively compile on mac M1 :

Winter 0.9.5 NNUE https://github.com/rosenthj/Winter
Minic 3.1.3 https://github.com/tryingsomestuff/Minic
Nemorino 6.0.5 https://bitbucket.org/christian_g_nther ... rc/master/ 6.0.0 patch 1 (6.0.5 is the nnue)
Seer 2.3.0 https://github.com/connormcmonigle/seer-nnue
Koivisto 6.90 https://github.com/Luecx/Koivisto
Fire 8.NN.MC.3 https://github.com/FireFather/fire
Fat Titz 1.1 310821 by Sopel (it's really strong, probably n.1!!!) https://github.com/Sopel97/FatTitz/releases/tag/v1.1
CorChess NN 2.0 100921 https://github.com/IIvec/Stockfish/tree/corchess
Combusken 1.4.0 https://github.com/mhib/combusken

Thank you!
Best regards, Alex
I didnt know Koivisto 6.90 already exists. :) (I think you mean Koivisto 6.9)
The next version after that would be 6.10, 6.11, 6.12.
Thank you Luecx for your comment!!! I have finally found Koivisto 6.15 compiled by someone also for Windows 10 x64 popcnt sse3. Already tested and I like it! All Koivisto PGN games 24 points / 57 very good :wink: https://onedrive.live.com/?cid=B0F79706 ... 69&o=OneUp

Best regards, Alex
Latest release is 6.16. If you know Ipman, you can ask him. I sent him a makefile which he can use to compile koivisto for every type of architecture.

Code: Select all

CC       = g++
SRC      = *.cpp syzygy/tbprobe.c
LIBS     = -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
FOLDER   = bin/
ROOT     = ../
NAME     = Koivisto
EVALFILE = $(ROOT)networks/default.net
EXE      = $(ROOT)$(FOLDER)$(NAME)_$(MAJOR).$(MINOR)
MINOR    = 15
MAJOR    = 6
ifeq ($(OS),Windows_NT)
    PREFIX := windows
    SUFFIX := .exe
else
    PREFIX := linux
    SUFFIX := 
endif

WFLAGS = -std=c++17 -Wall -Wextra -Wshadow -DEVALFILE=\"$(EVALFILE)\"
CFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto -march=native
RFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto -static
PFLAGS = -O0 $(WFLAGS) -DNDEBUG -p -pg
DFLAGS = -O0 $(WFLAGS) -g


SSEFLAGS    = -msse
SSE2FLAGS   = $(SSEFLAGS) -msse2
SSE3FLAGS   = $(SSE2FLAGS) -msse3
SSE41FLAGS  = $(SSE3FLAGS) -msse4.1
SSE42FLAGS  = $(SSE41FLAGS) -msse4.2
POPFLAGS    = $(SSE42FLAGS) -DUSE_POPCNT -mpopcnt
AVXFLAGS    = $(POPFLAGS) -mavx 
AVX2FLAGS   = $(AVXFLAGS) -mavx2
AVX512FLAGS = $(AVX2FLAGS) -mavx512f -mavx512bw -mavx512dq


OPENMPFLAGS = -fopenmp
NATIVEFLAGS = -march=native

MAKROS      = -DMINOR_VERSION=$(MINOR) -DMAJOR_VERSION=$(MAJOR)


openbench: updateNetwork
	$(CC) $(CFLAGS) $(SRC) $(MAKROS) $(LIBS) $(NATIVEFLAGS) -o $(EXE)

native: updateNetwork
	mkdir -p $(ROOT)$(FOLDER)
	$(CC) $(CFLAGS) $(SRC) $(MAKROS) $(LIBS) $(NATIVEFLAGS) -o $(EXE)-x64-$(PREFIX)-native$(SUFFIX)
    
release: updateNetwork
	mkdir -p $(ROOT)$(FOLDER)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(AVX512FLAGS) -o $(EXE)-x64-$(PREFIX)-avx512$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(AVX2FLAGS) -o $(EXE)-x64-$(PREFIX)-avx2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(POPFLAGS) -o $(EXE)-x64-$(PREFIX)-popcnt$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE42FLAGS) -o $(EXE)-x64-$(PREFIX)-sse4.2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE41FLAGS) -o $(EXE)-x64-$(PREFIX)-sse4.1$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE3FLAGS) -o $(EXE)-x64-$(PREFIX)-sse3$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE2FLAGS) -o $(EXE)-x64-$(PREFIX)-sse2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSEFLAGS) -o $(EXE)-x64-$(PREFIX)-sse$(SUFFIX)

updateNetwork:
ifeq ($(EVALFILE),$(ROOT)networks/default.net)
	git -C .. submodule update --init
endif
If you want, you can copy that makefile into the Koivisto repository (replace the old one), and compile all of the versions with

Code: Select all

make release
. It should spit out all the versions you desire
The ability to speak does not make you intelligent. https://github.com/Luecx/Koivisto

Image
Luecx
Posts: 138
Joined: Thu Jun 18, 2020 9:20 pm
Full name: Finn Eggers

Re: M1 Apple Silicon for Chess?

Post by Luecx »

Luecx wrote: Wed Sep 15, 2021 2:03 pm
AlexChess wrote: Tue Sep 14, 2021 12:41 pm
Luecx wrote: Tue Sep 14, 2021 9:39 am
AlexChess wrote: Mon Sep 13, 2021 11:43 am
acepoint_de wrote: Sun Sep 12, 2021 6:57 pm
AlexChess wrote: Sat Sep 11, 2021 11:42 am https://acepoint.de/seven-at-one-stroke/ is missing from July, 13
Pretty busy the last two months, but...

...some updates for the m1: berserk-4.5.1, lc0-0.28, mayhem-5.7, shashchess-18.1, stockfish-20210912, sugar-AI-2.4, sugar-AI-ICCF-2.4

https://acepoint.de/new-updates-for-the-m1/

Ciao

acepoint
Very happy that you are back, my skIlled chess friend! :D

List of other open sources updates available (eventually) :oops: to natively compile on mac M1 :

Winter 0.9.5 NNUE https://github.com/rosenthj/Winter
Minic 3.1.3 https://github.com/tryingsomestuff/Minic
Nemorino 6.0.5 https://bitbucket.org/christian_g_nther ... rc/master/ 6.0.0 patch 1 (6.0.5 is the nnue)
Seer 2.3.0 https://github.com/connormcmonigle/seer-nnue
Koivisto 6.90 https://github.com/Luecx/Koivisto
Fire 8.NN.MC.3 https://github.com/FireFather/fire
Fat Titz 1.1 310821 by Sopel (it's really strong, probably n.1!!!) https://github.com/Sopel97/FatTitz/releases/tag/v1.1
CorChess NN 2.0 100921 https://github.com/IIvec/Stockfish/tree/corchess
Combusken 1.4.0 https://github.com/mhib/combusken

Thank you!
Best regards, Alex
I didnt know Koivisto 6.90 already exists. :) (I think you mean Koivisto 6.9)
The next version after that would be 6.10, 6.11, 6.12.
Thank you Luecx for your comment!!! I have finally found Koivisto 6.15 compiled by someone also for Windows 10 x64 popcnt sse3. Already tested and I like it! All Koivisto PGN games 24 points / 57 very good :wink: https://onedrive.live.com/?cid=B0F79706 ... 69&o=OneUp

Best regards, Alex
Latest release is 6.16. If you know Ipman, you can ask him. I sent him a makefile which he can use to compile koivisto for every type of architecture.

Code: Select all

CC       = g++
SRC      = *.cpp syzygy/tbprobe.c
LIBS     = -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
FOLDER   = bin/
ROOT     = ../
NAME     = Koivisto
EVALFILE = $(ROOT)networks/default.net
EXE      = $(ROOT)$(FOLDER)$(NAME)_$(MAJOR).$(MINOR)
MINOR    = 15
MAJOR    = 6
ifeq ($(OS),Windows_NT)
    PREFIX := windows
    SUFFIX := .exe
else
    PREFIX := linux
    SUFFIX := 
endif

WFLAGS = -std=c++17 -Wall -Wextra -Wshadow -DEVALFILE=\"$(EVALFILE)\"
CFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto -march=native
RFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto -static
PFLAGS = -O0 $(WFLAGS) -DNDEBUG -p -pg
DFLAGS = -O0 $(WFLAGS) -g


SSEFLAGS    = -msse
SSE2FLAGS   = $(SSEFLAGS) -msse2
SSE3FLAGS   = $(SSE2FLAGS) -msse3
SSE41FLAGS  = $(SSE3FLAGS) -msse4.1
SSE42FLAGS  = $(SSE41FLAGS) -msse4.2
POPFLAGS    = $(SSE42FLAGS) -DUSE_POPCNT -mpopcnt
AVXFLAGS    = $(POPFLAGS) -mavx 
AVX2FLAGS   = $(AVXFLAGS) -mavx2
AVX512FLAGS = $(AVX2FLAGS) -mavx512f -mavx512bw -mavx512dq


OPENMPFLAGS = -fopenmp
NATIVEFLAGS = -march=native

MAKROS      = -DMINOR_VERSION=$(MINOR) -DMAJOR_VERSION=$(MAJOR)


openbench: updateNetwork
	$(CC) $(CFLAGS) $(SRC) $(MAKROS) $(LIBS) $(NATIVEFLAGS) -o $(EXE)

native: updateNetwork
	mkdir -p $(ROOT)$(FOLDER)
	$(CC) $(CFLAGS) $(SRC) $(MAKROS) $(LIBS) $(NATIVEFLAGS) -o $(EXE)-x64-$(PREFIX)-native$(SUFFIX)
    
release: updateNetwork
	mkdir -p $(ROOT)$(FOLDER)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(AVX512FLAGS) -o $(EXE)-x64-$(PREFIX)-avx512$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(AVX2FLAGS) -o $(EXE)-x64-$(PREFIX)-avx2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(POPFLAGS) -o $(EXE)-x64-$(PREFIX)-popcnt$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE42FLAGS) -o $(EXE)-x64-$(PREFIX)-sse4.2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE41FLAGS) -o $(EXE)-x64-$(PREFIX)-sse4.1$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE3FLAGS) -o $(EXE)-x64-$(PREFIX)-sse3$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE2FLAGS) -o $(EXE)-x64-$(PREFIX)-sse2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSEFLAGS) -o $(EXE)-x64-$(PREFIX)-sse$(SUFFIX)

updateNetwork:
ifeq ($(EVALFILE),$(ROOT)networks/default.net)
	git -C .. submodule update --init
endif
If you want, you can copy that makefile into the Koivisto repository (replace the old one), and compile all of the versions with

Code: Select all

make release
. It should spit out all the versions you desire
in fact i assume he sent you the files already but neither of you checked the version number inside the makefile. so i sent him that script. it will display 6.15 although if its the latest source, it will be 6.16
The ability to speak does not make you intelligent. https://github.com/Luecx/Koivisto

Image
User avatar
AlexChess
Posts: 1493
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

Luecx wrote: Wed Sep 15, 2021 2:03 pm
AlexChess wrote: Tue Sep 14, 2021 12:41 pm
Luecx wrote: Tue Sep 14, 2021 9:39 am
AlexChess wrote: Mon Sep 13, 2021 11:43 am
acepoint_de wrote: Sun Sep 12, 2021 6:57 pm
AlexChess wrote: Sat Sep 11, 2021 11:42 am https://acepoint.de/seven-at-one-stroke/ is missing from July, 13
Pretty busy the last two months, but...

...some updates for the m1: berserk-4.5.1, lc0-0.28, mayhem-5.7, shashchess-18.1, stockfish-20210912, sugar-AI-2.4, sugar-AI-ICCF-2.4

https://acepoint.de/new-updates-for-the-m1/

Ciao

acepoint
Very happy that you are back, my skIlled chess friend! :D

List of other open sources updates available (eventually) :oops: to natively compile on mac M1 :

Winter 0.9.5 NNUE https://github.com/rosenthj/Winter
Minic 3.1.3 https://github.com/tryingsomestuff/Minic
Nemorino 6.0.5 https://bitbucket.org/christian_g_nther ... rc/master/ 6.0.0 patch 1 (6.0.5 is the nnue)
Seer 2.3.0 https://github.com/connormcmonigle/seer-nnue
Koivisto 6.90 https://github.com/Luecx/Koivisto
Fire 8.NN.MC.3 https://github.com/FireFather/fire
Fat Titz 1.1 310821 by Sopel (it's really strong, probably n.1!!!) https://github.com/Sopel97/FatTitz/releases/tag/v1.1
CorChess NN 2.0 100921 https://github.com/IIvec/Stockfish/tree/corchess
Combusken 1.4.0 https://github.com/mhib/combusken

Thank you!
Best regards, Alex
I didnt know Koivisto 6.90 already exists. :) (I think you mean Koivisto 6.9)
The next version after that would be 6.10, 6.11, 6.12.
Thank you Luecx for your comment!!! I have finally found Koivisto 6.15 compiled by someone also for Windows 10 x64 popcnt sse3. Already tested and I like it! All Koivisto PGN games 24 points / 57 very good :wink: https://onedrive.live.com/?cid=B0F79706 ... 69&o=OneUp

Best regards, Alex
Latest release is 6.16. If you know Ipman, you can ask him. I sent him a makefile which he can use to compile koivisto for every type of architecture.

Code: Select all

CC       = g++
SRC      = *.cpp syzygy/tbprobe.c
LIBS     = -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
FOLDER   = bin/
ROOT     = ../
NAME     = Koivisto
EVALFILE = $(ROOT)networks/default.net
EXE      = $(ROOT)$(FOLDER)$(NAME)_$(MAJOR).$(MINOR)
MINOR    = 15
MAJOR    = 6
ifeq ($(OS),Windows_NT)
    PREFIX := windows
    SUFFIX := .exe
else
    PREFIX := linux
    SUFFIX := 
endif

WFLAGS = -std=c++17 -Wall -Wextra -Wshadow -DEVALFILE=\"$(EVALFILE)\"
CFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto -march=native
RFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto -static
PFLAGS = -O0 $(WFLAGS) -DNDEBUG -p -pg
DFLAGS = -O0 $(WFLAGS) -g


SSEFLAGS    = -msse
SSE2FLAGS   = $(SSEFLAGS) -msse2
SSE3FLAGS   = $(SSE2FLAGS) -msse3
SSE41FLAGS  = $(SSE3FLAGS) -msse4.1
SSE42FLAGS  = $(SSE41FLAGS) -msse4.2
POPFLAGS    = $(SSE42FLAGS) -DUSE_POPCNT -mpopcnt
AVXFLAGS    = $(POPFLAGS) -mavx 
AVX2FLAGS   = $(AVXFLAGS) -mavx2
AVX512FLAGS = $(AVX2FLAGS) -mavx512f -mavx512bw -mavx512dq


OPENMPFLAGS = -fopenmp
NATIVEFLAGS = -march=native

MAKROS      = -DMINOR_VERSION=$(MINOR) -DMAJOR_VERSION=$(MAJOR)


openbench: updateNetwork
	$(CC) $(CFLAGS) $(SRC) $(MAKROS) $(LIBS) $(NATIVEFLAGS) -o $(EXE)

native: updateNetwork
	mkdir -p $(ROOT)$(FOLDER)
	$(CC) $(CFLAGS) $(SRC) $(MAKROS) $(LIBS) $(NATIVEFLAGS) -o $(EXE)-x64-$(PREFIX)-native$(SUFFIX)
    
release: updateNetwork
	mkdir -p $(ROOT)$(FOLDER)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(AVX512FLAGS) -o $(EXE)-x64-$(PREFIX)-avx512$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(AVX2FLAGS) -o $(EXE)-x64-$(PREFIX)-avx2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(POPFLAGS) -o $(EXE)-x64-$(PREFIX)-popcnt$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE42FLAGS) -o $(EXE)-x64-$(PREFIX)-sse4.2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE41FLAGS) -o $(EXE)-x64-$(PREFIX)-sse4.1$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE3FLAGS) -o $(EXE)-x64-$(PREFIX)-sse3$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE2FLAGS) -o $(EXE)-x64-$(PREFIX)-sse2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSEFLAGS) -o $(EXE)-x64-$(PREFIX)-sse$(SUFFIX)

updateNetwork:
ifeq ($(EVALFILE),$(ROOT)networks/default.net)
	git -C .. submodule update --init
endif
If you want, you can copy that makefile into the Koivisto repository (replace the old one), and compile all of the versions with

Code: Select all

make release
. It should spit out all the versions you desire
Thank you, you are very kind. Yes I know Ipman, a very nice person :)

Best regards, Alex
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum TROLLS KINDERGARTEN
User avatar
AlexChess
Posts: 1493
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

Luecx wrote: Wed Sep 15, 2021 2:03 pm
Latest release is 6.16. If you know Ipman, you can ask him. I sent him a makefile which he can use to compile koivisto for every type of architecture.

Code: Select all

CC       = g++
SRC      = *.cpp syzygy/tbprobe.c
LIBS     = -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
FOLDER   = bin/
ROOT     = ../
NAME     = Koivisto
EVALFILE = $(ROOT)networks/default.net
EXE      = $(ROOT)$(FOLDER)$(NAME)_$(MAJOR).$(MINOR)
MINOR    = 15
MAJOR    = 6
ifeq ($(OS),Windows_NT)
    PREFIX := windows
    SUFFIX := .exe
else
    PREFIX := linux
    SUFFIX := 
endif

WFLAGS = -std=c++17 -Wall -Wextra -Wshadow -DEVALFILE=\"$(EVALFILE)\"
CFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto -march=native
RFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto -static
PFLAGS = -O0 $(WFLAGS) -DNDEBUG -p -pg
DFLAGS = -O0 $(WFLAGS) -g


SSEFLAGS    = -msse
SSE2FLAGS   = $(SSEFLAGS) -msse2
SSE3FLAGS   = $(SSE2FLAGS) -msse3
SSE41FLAGS  = $(SSE3FLAGS) -msse4.1
SSE42FLAGS  = $(SSE41FLAGS) -msse4.2
POPFLAGS    = $(SSE42FLAGS) -DUSE_POPCNT -mpopcnt
AVXFLAGS    = $(POPFLAGS) -mavx 
AVX2FLAGS   = $(AVXFLAGS) -mavx2
AVX512FLAGS = $(AVX2FLAGS) -mavx512f -mavx512bw -mavx512dq


OPENMPFLAGS = -fopenmp
NATIVEFLAGS = -march=native

MAKROS      = -DMINOR_VERSION=$(MINOR) -DMAJOR_VERSION=$(MAJOR)


openbench: updateNetwork
	$(CC) $(CFLAGS) $(SRC) $(MAKROS) $(LIBS) $(NATIVEFLAGS) -o $(EXE)

native: updateNetwork
	mkdir -p $(ROOT)$(FOLDER)
	$(CC) $(CFLAGS) $(SRC) $(MAKROS) $(LIBS) $(NATIVEFLAGS) -o $(EXE)-x64-$(PREFIX)-native$(SUFFIX)
    
release: updateNetwork
	mkdir -p $(ROOT)$(FOLDER)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(AVX512FLAGS) -o $(EXE)-x64-$(PREFIX)-avx512$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(AVX2FLAGS) -o $(EXE)-x64-$(PREFIX)-avx2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(POPFLAGS) -o $(EXE)-x64-$(PREFIX)-popcnt$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE42FLAGS) -o $(EXE)-x64-$(PREFIX)-sse4.2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE41FLAGS) -o $(EXE)-x64-$(PREFIX)-sse4.1$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE3FLAGS) -o $(EXE)-x64-$(PREFIX)-sse3$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSE2FLAGS) -o $(EXE)-x64-$(PREFIX)-sse2$(SUFFIX)
	$(CC) $(RFLAGS) $(SRC) $(MAKROS) $(LIBS) $(SSEFLAGS) -o $(EXE)-x64-$(PREFIX)-sse$(SUFFIX)

updateNetwork:
ifeq ($(EVALFILE),$(ROOT)networks/default.net)
	git -C .. submodule update --init
endif
If you want, you can copy that makefile into the Koivisto repository (replace the old one), and compile all of the versions with

Code: Select all

make release
. It should spit out all the versions you desire
Thank you again Luecx! Trust me, I really don't want to troll nobody here, I'm only interested in your wonderful chess engines, trying to have them on all the operating systems I own :D

PS: I have created a new topic for all the most promising ORIGINAL not SF derivatives engines here: forum3/viewtopic.php?f=2&t=78182 (there also Koivisto, obviously :wink: )
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum TROLLS KINDERGARTEN
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: M1 Apple Silicon for Chess?

Post by Ras »

AlexChess wrote: Mon Sep 13, 2021 12:53 pm Open source engines still not available on Mac Silicon M1:
Wasp 4.5.0 http://www.amateurschach.de/main/_wasp-beta-test.htm
Unfortunately, Wasp is not open source.

What is open source is the CT800, and I expect that to easily compile natively on M1 if you have Clang installed, using the provided Mac build script. :)
Rasmus Althoff
https://www.ct800.net