PGO compile on VS2019 not working

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Cardoso
Posts: 293
Joined: Thu Mar 16, 2006 6:39 pm

Re: PGO compile on VS2019 not working

Post by Cardoso » Sun Aug 25, 2019 10:24 pm

Joost Buijs wrote:
Sun Aug 25, 2019 12: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: 293
Joined: Thu Mar 16, 2006 6:39 pm

Re: PGO compile on VS2019 not working

Post by Cardoso » Mon Sep 02, 2019 4:15 pm

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: 986
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: PGO compile on VS2019 not working

Post by Joost Buijs » Mon Sep 02, 2019 6:20 pm

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: 10096
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: PGO compile on VS2019 not working

Post by Dann Corbit » Mon Sep 02, 2019 8:37 pm

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.

Look
Posts: 238
Joined: Thu Jun 05, 2014 12:14 pm
Location: Iran
Full name: Mehdi Amini
Contact:

Re: PGO compile on VS2019 not working

Post by Look » Tue Sep 03, 2019 3:40 pm

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.

Dann Corbit
Posts: 10096
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: PGO compile on VS2019 not working

Post by Dann Corbit » Tue Sep 03, 2019 7:02 pm

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: 293
Joined: Thu Mar 16, 2006 6:39 pm

Re: PGO compile on VS2019 not working

Post by Cardoso » Thu Sep 05, 2019 10:55 pm

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

Post Reply