PGO compile on VS2019 not working

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Cardoso
Posts: 362
Joined: Thu Mar 16, 2006 7:39 pm
Location: Portugal
Full name: Alvaro Cardoso

Re: PGO compile on VS2019 not working

Post by Cardoso »

Joost Buijs wrote: Sun Aug 25, 2019 2:17 pm So this is a whopping 13.5% improvement for the move-generator/do-undo-move logic. A strange thing is that when I specify 'std:c++17' for language instead of the default this gives me about 2% improvement, you would expect that this has influence on the parser only, but it seems to change something in the code-generator/optimizer as well.
With the VS-2017 compiler I get on average 150 mps with the same positions and source code, so the code-generator improved quite a bit.
That's amazing, I'm drooling already :)
But unfortunately I haven't been able to make it work for me.
I tried to make a new project, but after adding the files I'm starting to get compilation errors on code that is disabled by defines.
I'll try again tomorrow, I'm too tired now.
Thanks again for the input.

Alvaro
Cardoso
Posts: 362
Joined: Thu Mar 16, 2006 7:39 pm
Location: Portugal
Full name: Alvaro Cardoso

Re: PGO compile on VS2019 not working

Post by Cardoso »

I created a fresh project from scratch in VS2019, but the problem continues, no .pgc file is created.
I don't know what to do anymore.
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: PGO compile on VS2019 not working

Post by Joost Buijs »

This is really strange, with my chess engine it works without any problem. The only thing I can think off is that something in your code is crashing the instrumented executable and that this is the reason no .pgc file is generated.

I assume your are working on a checkers program, I'm certain that my compiler setup is working, so if you wish I can try to compile your program over here to rule out any problems with the compiler setup at your end.
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: PGO compile on VS2019 not working

Post by Dann Corbit »

I noticed that you copied the engine to a new path after building it. You have to copy the dll to the same folder as the engine unless the dll is in the current system path
I think that's true even if you link statically.
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.
User avatar
Look
Posts: 364
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

Re: PGO compile on VS2019 not working

Post by Look »

As a general response to the thread, If PGO runs just in debug (not release) mode, I would not rely on it. One of the issues is the NPS of an engine in both modes, which is way better for release mode.
Farewell.
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: PGO compile on VS2019 not working

Post by Dann Corbit »

You should never run PGO in debug mode. It would just be wasted time.
PGO is only for release mode.
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.
Cardoso
Posts: 362
Joined: Thu Mar 16, 2006 7:39 pm
Location: Portugal
Full name: Alvaro Cardoso

Re: PGO compile on VS2019 not working

Post by Cardoso »

Sorry for the late reply, I'm having some health problems that are limiting my work with a computer screen.
Thanks Joost for your kind offer. Ed Gilbert also was having exactly this same problem with VS2019 and he gave me a tip that I will try as soon as I get better. And it doesn't look there is a crashing bug in my engine because after I do all the memory cleaning I print one last statement on log.txt right before I close the log file handle, just to make sure there is no crashing happening.
Answering Dann, yes I have to copy pgort140.dll to C:\Profound\ otherwise it will crash instantly.
And I can confirm pgort140.dll is loaded into engine.exe by using process explorer.
Anyway thanks again for your support.

best regards,
Alvaro