Author: Mike Byrne
Date: 01:20:19 02/19/05
Go up one level in this thread
On February 18, 2005 at 13:38:57, Peter Skinner wrote: >On February 18, 2005 at 13:34:35, Eugene Nalimov wrote: > >>On February 18, 2005 at 13:30:09, Peter Skinner wrote: >> >>>On February 18, 2005 at 12:43:20, Eugene Nalimov wrote: >>> >>>>2 remarks: >>>> >>>>(1) You mentioned /GL -- that is link-time code genration, not POGO. Did you >>>>really compiled with POGO, e.g. built instrumented version, trained it, and then >>>>built optimized one? >>>> >>>>(2) Output that you provided says "System is SMP, not NUMA". When I start Carfty >>>>of Windows Server on AMD64 it correctly recognizes it as NUMA. I am not sure who >>>>is guilty here -- Windows XP or BIOS settings. If later than there should be a >>>>way to turn NUMA support on. >>>> >>>>Thanks, >>>>Eugene >>> >>>In the help file it states you first have to use the /GL switch to enable the >>>possiblility of POGO compiles. >>> >>>If I read it right, you have to use the /GL switch first to compile the .c nodes >>>to objects, then use /LTCG:PGINSTRUMENT to generate the exe with the pgi file, >>>then train it, and then recompile using the trained info. >> >>Yes, exactly so. But you can also use /GL by itself -- usually it provides nice >>speedup over "plain" /O2 (or /Ox). >> >>Thanks, >>Eugene > >Interesting that I right... > >Then the question of why I can not get it to work. This is what I am doing: > >I first compile the .c nodes using this: > >cl /G6 /GL /Gs /GA /GF /GT /Gr /MT /arch:SSE /DSMP /DCPUS=4 /DNT_INTEREX >/DNT_i386 /DWIN32 /D_CONSOLE /DWINDOWS /DFAST /DEGTB6 /DEPD /DFUTILITY >/DVC_INLINE_ASM crafty.c egtb.cpp -c > >Then I use: > >cl /G6 /LTCG:PGINSTRUMENT /Gs /GA /GF /GT /Gr /MT /arch:SSE /DSMP /DCPUS=4 >/DNT_INTEREX /DNT_i386 /DWIN32 /D_CONSOLE /DWINDOWS /DFAST /DEGTB6 /DEPD >/DFUTILITY /DVC_INLINE_ASM crafty.obj egtb.obj > >Here is where I get stuck. There is no empty pgi file generated. > >Where exactly am I going wrong? > >Peter Peter do this: use this makefile, named "makefile.nt" # Base compiler flags needed for build: BFLAGS = /D_CONSOLE /DWIN32 # Compiler flags: # /O2 optimize for speed # /Oa assume no aliasing (no good for VC 6 without SP3) # /Gr fastcall calling convention # /G5 target Pentium (but will run on all x86 architectures) # /G6 target Pentium Pro (but will run on all x86 architectures) # /Ob2 inline function calls if suitable # # For debugging use these flags instead: # CFLAGS = /Od /Zi # LDFLAGS = /DEBUG /DEBUGTYPE:CV # CFLAGS = /GL /O2 /Ox /Ot /Gr /Ob2 /w #/GL #CFLAGS = /Od /Zi #CFLAGS = /Ox /G6 /Gr /Ob2 # Linker flags, normally not needed except for debug builds: #LDFLAGS = LDFLAGS =/ltcg:pgi /pgd:wcrafty.pgd #LDFLAGS = /ltcg:pgo /pgd:wcrafty.pgd #Nmake /A -f makefile.nt #Nmake -f makefile.nt #LDFLAGS = /DEBUG /DEBUGTYPE:CV # See the default crafty makefile for a description of the options below. # With VC++, defines like COMPACT_ATTACKS, etc, makes the code slower, so # those # options are disabled by default. FAST is normally not defined # so that hash statistics are reported -- for the fastest possible # executable, define FAST below. for 6 piece EGTB support, add /DEGTB6. #COPTS = /DFAST # For an SMP build use/add the following build options. # NT_INTEREX is defined if you want to use the built-in InterlockedExchange() # function for thread resource locking, instead of the inline asm routine. # (This shouldn't be needed, at least on Intel.) # /MT is a compiler flag needed for multithreaded builds. #COPTS = /MT /DSMP /DCPUS=4 /DNT_INTEREX /DNUMA /DFUTILITY COPTS = /MT /DSMP /DCPUS=2 /DFAST /D_M_AMD64 /DFUTILITY # If you are using any external assembler routines, put the name of the # object code file(s) here. Any such files will need to be generated # separately -- there is no assembler step defined in the makefile. asmobjs = # To enable assembly optimizations in vcinline.h, use /DVC_INLINE_ASM.DINLINE_AMD #AOPTS = /DVC_INLINE_ASM /DUSE_ASSEMBLY ALLOPTS = $(COPTS) $(AOPTS) /D$(TARGET) cobjs = analyze.obj annotate.obj attacks.obj bench.obj book.obj boolean.obj \ data.obj drawn.obj edit.obj epd.obj epdglue.obj evaluate.obj \ evtest.obj hash.obj history.obj init.obj input.obj interupt.obj \ iterate.obj learn.obj make.obj main.obj movgen.obj next.obj \ nexte.obj nextr.obj option.obj output.obj ponder.obj \ preeval.obj quiesce.obj repeat.obj resign.obj root.obj search.obj \ searchmp.obj searchr.obj setboard.obj swap.obj test.obj thread.obj \ time.obj unmake.obj utility.obj valid.obj validate.obj probe.obj xcobjs = x1.obj x2.obj allobjs = $(cobjs) $(asmobjs) egtb.obj xallobjs = $(xcobjs) $(asmobjs) egtb.obj includes = chess.h data.h epd.h epddefs.h epdglue.h vcinline.h wcrafty : $(allobjs) $(LD) $(LDFLAGS) $(allobjs) /out:wcrafty.exe wcraftyx : $(xallobjs) $(LD) $(LDFLAGS) $(xallobjs) /out:wcraftyx.exe $(cobjs) : $(includes) .c.obj : $(CC) $(BFLAGS) $(CFLAGS) $(ALLOPTS) /c $*.c .cpp.obj : $(CC) $(BFLAGS) $(CFLAGS) $(ALLOPTS) /Zm500 /c $*.cpp $(xcobjs): $(includes) x1.c: searchr.c search.c repeat.c next.c nextr.c history.c nexte.c \ quiesce.c evaluate.c movgen.c make.c unmake.c attacks.c swap.c \ boolean.c utility.c valid.c searchmp.c thread.c copy /b boolean.c+swap.c+attacks.c+evaluate.c+make.c+\ unmake.c+movgen.c+quiesce.c+search.c+next.c+searchr.c+repeat.c+\ nextr.c+history.c+nexte.c+utility.c+valid.c+searchmp.c+\ thread.c x1.c x2.c: book.c data.c drawn.c edit.c epd.c epdglue.c init.c \ input.c interupt.c iterate.c main.c option.c output.c \ ponder.c preeval.c resign.c root.c learn.c setboard.c test.c time.c \ validate.c annotate.c analyze.c evtest.c bench.c hash.c probe.c copy /b book.c+data.c+drawn.c+edit.c+epd.c+epdglue.c+\ init.c+input.c+interupt.c+iterate.c+main.c+option.c+output.c+\ phase.c+ponder.c+preeval.c+resign.c+root.c+learn.c+setboard.c+\ test.c+time.c+validate.c+annotate.c+analyze.c+evtest.c+bench.c+\ hash.c+probe.c x2.c clean: del /q $(cobjs) del /q egtb.obj del /q $(xcobjs) del /q log.* del /q game.** del /q *.bak del /q x1.c del /q x2.c =============================================== select your command compiler ->START>PROGRAMS>MICROSOFT VISUAL STUDIO 5 BETA>VISUAL STUDIO TOOLS><select command compiler> navigate through the "dos" window to where your crafty sources are and copy paste this into the window: Nmake craftyx /A -f makefile.nt start the wcrafty.exe and type bench - let it run ... quit wcraftyx type/copy this at the command prompt "link =/ltcg:pgi /pgd:wcrafty.pgd" Best, Mike
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.