ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Andscacs - New version 0.921 with source
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: General Topics Flat
View previous topic :: View next topic  
Author Message
Michael B



Joined: 09 Mar 2006
Posts: 2295
Location: Pen Argyl, Pennsylvania

PostPost subject: Updated MacOS built with clang ( includes updated source)    Posted: Sat Nov 11, 2017 6:08 am Reply to topic Reply with quote

cdani wrote:
Thanks!!


As promised , a clang complied version that is a tad faster than the previous macOS exe's. But the most important aspect of this is thattehse should run all Mac with popcnt machines and better.

I dropped the original makefile from SF and went with Fabein Letouzey's Senpai 2 Makefile as the base, It was just easier for me to work with.

Here's the secret to building a PGO version. First let me just describe my system, I do not use Apple's macOS clang . Instead I use use Macports to install clang 5.0:

Code:
Mac-Pro:~ michaelbyrne$ clang --version
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-5.0/bin


In te makefile, you find these 4 lines:

Code:
CXXFLAGS += -Os -msse3 -Ofast -O3 -mtune=native -mpopcnt -fprofile-instr-use=andscacs.profdata #-mbmi2 -DBMI
LDFLAGS  += -O3 -fprofile-use  (2nd RUN)


#CXXFLAGS += -Os -msse3 -Ofast -O3 -mtune=native -mpopcnt -fprofile-instr-generate #-mbmi2 -DBMI  1st RUN
#LDFLAGS  += -O3 -fprofile-instr-generate


use the bottom two ( uncomment) to build the instrumented exe
from the terminal (must be from terminal) :

FIRST:
Code:
make clean
make-j


THEN
Code:
andscacs
go depth 20


you really don't have to much more , this will get about 99% of the potential optimIzations

NEXT:
Code:


llvm-profdata merge -output=andscacs.profdata *.profraw ( you will see this line in the makefile just a reminder of what the command is)
rm *.o


THEN:
comment out the two bottom lines and uncomment the two top lines above

followed by:

Code:
make -j


there you go , you have a PGO version of Andscacs

source, updated makefile and macOS exe's included - adjust debug.h as appropriate for OS

https://www.dropbox.com/s/d0vwitxzt2cqgl2/andscacs-921a_src_distro_111117.zip?dl=1

the only line of code of the changes that I made which might be macOS specific only is line 85 of hash.cpp :
Code:
   memhash = calloc(sizeof(unahash), xx);  // for macOS
   //   memhash = aligned_alloc(sizeof(unahash), xx); for Linux


All the other changes were to fix the clang errors related to the "goto jump that bypassed variable initialization" , the simple solution was to split the definition+initialisation into a definition + assignment and the error message goes away.

I will be working on a makefile that does the entire pgo build with one command - for both Senpai and Andscacs - two of my favorite engines 👍
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 10:31 am
      Re: Andscacs - New version 0.921 with source Jon Fredrik Ĺsvang Sat Nov 04, 2017 10:41 am
            Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 10:58 am
      Re: Andscacs - New version 0.921 with source Guenther Simon Sat Nov 04, 2017 10:54 am
      Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 11:20 am
      Re: Andscacs - New version 0.921 with source Damir Desevac Sat Nov 04, 2017 11:41 am
            Re: Andscacs - New version 0.921 with source Damir Desevac Sat Nov 04, 2017 11:58 am
      Re: Andscacs - New version 0.921 with source Vael Jean-Paul Sat Nov 04, 2017 1:06 pm
            Re: Andscacs - New version 0.921 with source Antonio Arias Orzanco Sat Nov 04, 2017 2:29 pm
      Re: Andscacs - New version 0.921 with source Volker Pittlik Sat Nov 04, 2017 4:04 pm
            Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 4:11 pm
                  Re: Andscacs - New version 0.921 with source Volker Pittlik Sat Nov 04, 2017 4:27 pm
      Re: Andscacs - New version 0.921 with source Tony Soares Sat Nov 04, 2017 4:11 pm
            Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 4:31 pm
                  Re: Andscacs - New version 0.921 with source Damir Desevac Sat Nov 04, 2017 4:57 pm
                        Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 4:59 pm
                  Re: Andscacs - New version 0.921 with source Damir Desevac Mon Nov 06, 2017 4:39 pm
                        Re: Andscacs - New version 0.921 with source daniel jose Tue Nov 07, 2017 8:56 pm
            Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 8:56 pm
                  Re: Andscacs - New version 0.921 with source Marco Belli Sat Nov 04, 2017 9:13 pm
                        Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 9:18 pm
                  Re: Andscacs - New version 0.921 with source Tony Soares Sat Nov 04, 2017 9:25 pm
                  Re: Andscacs - New version 0.921 with source daniel jose Sun Nov 05, 2017 10:30 pm
                        Re: Andscacs - New version 0.921 with source Leo Anger Sun Nov 05, 2017 10:52 pm
      Re: Andscacs - New version 0.921 with source Michael B Sat Nov 04, 2017 4:17 pm
            Re: Andscacs - New version 0.921 with source Michael B Sat Nov 04, 2017 4:40 pm
                  Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 4:43 pm
                        Re: Andscacs - New version 0.921 with source Michael B Sat Nov 04, 2017 4:45 pm
                              Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 5:03 pm
            Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 4:40 pm
                  Re: Andscacs - New version 0.921 with source Volker Pittlik Sat Nov 04, 2017 5:09 pm
                        Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 5:36 pm
                              Re: Andscacs - New version 0.921 with source Damir Desevac Sat Nov 04, 2017 5:39 pm
                                    Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 8:58 pm
                                          Re: Andscacs - New version 0.921 with source Damir Desevac Sun Nov 05, 2017 8:34 am
                                                Re: Andscacs - New version 0.921 with source Antonio Arias Orzanco Sun Nov 05, 2017 9:26 am
                                                      Re: Andscacs - New version 0.921 with source Volker Pittlik Sun Nov 05, 2017 9:45 am
                                                      Re: Andscacs - New version 0.921 with source daniel jose Sun Nov 05, 2017 9:57 am
                              Re: Andscacs - New version 0.921 with source Volker Pittlik Sat Nov 04, 2017 5:46 pm
      Re: Andscacs - New version 0.921 with source Hermann Krause Sat Nov 04, 2017 9:16 pm
            Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 04, 2017 9:26 pm
                  Re: Andscacs - New version 0.921 with source Hermann Krause Tue Nov 07, 2017 1:45 pm
                        Re: Andscacs - New version 0.921 with source daniel jose Tue Nov 07, 2017 9:06 pm
                              Re: Andscacs - New version 0.921 with source Hermann Krause Wed Nov 08, 2017 2:56 pm
                                    Re: Andscacs - New version 0.921 with source daniel jose Wed Nov 08, 2017 6:27 pm
                                          Re: Andscacs - New version 0.921 with source Carlos Pagador Thu Nov 09, 2017 11:30 am
                                                Re: Andscacs - New version 0.921 with source Leo Anger Thu Nov 09, 2017 11:37 am
                                                      Re: Andscacs - New version 0.921 with source Guenther Simon Thu Nov 09, 2017 11:57 am
                                                            Re: Andscacs - New version 0.921 with source Jouni Uski Thu Nov 09, 2017 12:14 pm
                                                Re: Andscacs - New version 0.921 with source daniel jose Thu Nov 09, 2017 12:40 pm
                                                      Re: Andscacs - New version 0.921 with source Dann Corbit Thu Nov 09, 2017 6:09 pm
                                                      Re: Andscacs - New version 0.921 with source Ernest Bonnem Thu Nov 09, 2017 11:49 pm
                                                            Re: Andscacs - New version 0.921 with source Tony Soares Fri Nov 10, 2017 12:39 am
                                                                  Re: Andscacs - New version 0.921 with source Ernest Bonnem Fri Nov 10, 2017 12:49 am
                                                                        Re: Andscacs - New version 0.921 with source Tony Soares Fri Nov 10, 2017 1:28 am
                                                            Re: Andscacs - New version 0.921 with source daniel jose Fri Nov 10, 2017 5:58 am
                                                                  Re: Andscacs - New version 0.921 with source Ronald de Man Sat Nov 11, 2017 5:52 pm
                                                                        Re: Andscacs - New version 0.921 with source Ronald de Man Sat Nov 11, 2017 6:26 pm
                                                                              Re: Andscacs - New version 0.921 with source Ronald de Man Sat Nov 11, 2017 6:36 pm
                                                                                    Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 11, 2017 7:05 pm
                                                                                          Re: Andscacs - New version 0.921 with source Ronald de Man Sat Nov 11, 2017 7:20 pm
                                                                                          Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 11, 2017 7:29 pm
                                                                                          Re: Andscacs - New version 0.921 with source Michael B Sat Nov 11, 2017 11:42 pm
                                                                                          Re: Andscacs - New version 0.921 with source Ronald de Man Sun Nov 12, 2017 11:55 am
                                                                                          Re: Andscacs - New version 0.921 with source Rasmus Althoff Sun Nov 12, 2017 12:07 pm
                                                                                          Re: Andscacs - New version 0.921 with source Ronald de Man Sun Nov 12, 2017 2:15 pm
                                                                        Re: Andscacs - New version 0.921 with source daniel jose Sat Nov 11, 2017 7:03 pm
                                                                        Re: Andscacs - New version 0.921 with source Ernest Bonnem Wed Nov 22, 2017 7:55 pm
                                                Re: Andscacs - New version 0.921 with source Juan Molina Mon Nov 20, 2017 3:55 pm
                                                      Re: Andscacs - New version 0.921 with source Carlos Pagador Mon Nov 20, 2017 9:15 pm
                                                            Re: Andscacs - New version 0.921 with source daniel jose Mon Nov 20, 2017 9:43 pm
                                                                  Re: Andscacs - New version 0.921 with source Henk van den Belt Tue Nov 21, 2017 10:29 pm
                                                                        Re: Andscacs - New version 0.921 with source Graham Banks Tue Nov 21, 2017 10:31 pm
                                                                              Re: Andscacs - New version 0.921 with source Henk van den Belt Wed Nov 22, 2017 2:31 pm
      Re: Andscacs - New version 0.921 with source Carl Langan Sat Nov 04, 2017 9:38 pm
      MacOS exe Michael B Sun Nov 05, 2017 12:16 am
            Re: MacOS exe daniel jose Sun Nov 05, 2017 12:25 am
            Re: MacOS exe daniel jose Sun Nov 05, 2017 5:57 pm
                  Re: MacOS exe Marco Belli Sun Nov 05, 2017 6:03 pm
                        Re: MacOS exe Michael B Sun Nov 05, 2017 7:58 pm
                              Re: MacOS exe daniel jose Sun Nov 05, 2017 8:02 pm
                  Re: MacOS exe Michael B Fri Nov 10, 2017 12:07 pm
                        Re: MacOS exe daniel jose Fri Nov 10, 2017 12:37 pm
                              Updated MacOS built with clang ( includes updated source) Michael B Sat Nov 11, 2017 6:08 am
                                    Re: Updated MacOS built with clang ( includes updated sourc Dariusz Domagala Sat Nov 11, 2017 9:37 am
                                    Re: Updated MacOS built with clang ( includes updated sourc daniel jose Sat Nov 11, 2017 2:52 pm
      Re: Andscacs - New version 0.921 with source Dann Corbit Sun Nov 05, 2017 10:15 am
            Re: Andscacs - New version 0.921 with source daniel jose Sun Nov 05, 2017 11:43 am
                  Re: Andscacs - New version 0.921 with source Daniel Anulliero Sun Nov 05, 2017 1:17 pm
                        Re: Andscacs - New version 0.921 with source Henk van den Belt Sun Nov 05, 2017 5:31 pm
      Re: Andscacs - New version 0.921 with source daniel jose Tue Nov 07, 2017 9:09 pm
            Re: Andscacs - New version 0.921 with source alexei chernakoff Fri Nov 10, 2017 4:29 am
                  Re: Andscacs - New version 0.921 with source daniel jose Fri Nov 10, 2017 5:59 am
      Re: Andscacs - New version 0.921 with source Tamás Kuzmics Thu Nov 09, 2017 2:14 pm
      Re: Andscacs - New version 0.921 with source Jon Dart Thu Nov 09, 2017 5:48 pm
            Re: Andscacs - New version 0.921 with source Uri Blass Fri Nov 10, 2017 1:30 pm
                  Re: Andscacs - New version 0.921 with source Jon Dart Fri Nov 10, 2017 5:13 pm
                        Re: Andscacs - New version 0.921 with source Uri Blass Fri Nov 10, 2017 9:22 pm
      Re: Andscacs - New version 0.921 with source Dmitri Gusev Sat Nov 25, 2017 10:16 pm
            Re: Andscacs - New version 0.921 with source T. Poppins Sun Nov 26, 2017 12:07 am
                  Re: Andscacs - New version 0.921 with source Guenther Simon Sun Nov 26, 2017 9:37 am
                        Re: Andscacs - New version 0.921 with source T. Poppins Sun Nov 26, 2017 11:51 am
                              Re: Andscacs - New version 0.921 with source Peter Kasinski Sun Nov 26, 2017 1:28 pm
                                    Re: Andscacs - New version 0.921 with source daniel jose Sun Nov 26, 2017 2:07 pm
                                          Re: Andscacs - New version 0.921 with source Peter Kasinski Sun Nov 26, 2017 2:25 pm
                                          Re: Andscacs - New version 0.921 with source John Smith Mon Nov 27, 2017 11:53 pm
                                                Re: Andscacs - New version 0.921 with source daniel jose Sat Dec 02, 2017 5:01 pm
                                    Re: Andscacs - New version 0.921 with source T. Poppins Thu Dec 07, 2017 3:03 pm
                              Re: Andscacs - New version 0.921 with source Guenther Simon Sun Nov 26, 2017 4:53 pm
      Re: Andscacs - New version 0.921 with source Al Cooper Mon Nov 27, 2017 1:57 pm
            Re: Andscacs - New version 0.921 with source daniel jose Mon Nov 27, 2017 2:07 pm
                  Re: Andscacs - New version 0.921 with source Al Cooper Mon Nov 27, 2017 2:49 pm
                        Re: Andscacs - New version 0.921 with source daniel jose Mon Nov 27, 2017 3:33 pm
                              Re: Andscacs - New version 0.921 with source Al Cooper Mon Nov 27, 2017 4:37 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: General Topics

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads