Re: [Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()

2017-08-07 Thread Patrick Rutkowski
After much stumbling around in the dark I have the answer. The following table shows the results of tests which I performed pairing different build configurations of my WinMain() app with different python libraries. The terms "Release" and "Debug" refer to the configuration type in Visual Studio.

Re: [Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()

2017-08-07 Thread Patrick Rutkowski
On Mon, Aug 7, 2017 at 8:44 PM, Larry Hastings wrote: > > My one idea: the GIL isn't initialized until you create a new thread. > That didn't seem to be it. I put a CreateThread() call right after Py_Initialize(), and that didn't fix it. I also moved it around to before

Re: [Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()

2017-08-07 Thread Larry Hastings
On 08/07/2017 05:11 PM, Patrick Rutkowski wrote: Does anyone have any ideas here? My one idea: the GIL isn't initialized until you create a new thread. //arry/ ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()

2017-08-07 Thread Patrick Rutkowski
I'm working on Windows. I have the following dead simple embedding code that I'm using to test out the python interpreter: Py_SetProgramName(L"MyApp"); Py_SetPath(

Re: [Python-Dev] first post introduction and question regarding lto

2017-08-07 Thread Soldea, Octavian
Hi Gregory Thank you for your message. I will conduct several experiments and try to come back as soon as possible with a conclusion. Best regards, Octavian From: Gregory P. Smith [mailto:g...@krypto.org] Sent: Monday, August 7, 2017 5:13 PM To: Soldea, Octavian ;

[Python-Dev] first post introduction and question regarding lto

2017-08-07 Thread Soldea, Octavian
Hello This is my first post after I just have subscribed to the Python-Dev mailing list. In this context, the welcome confirmation message suggested to introduce myself. My name is Octavian Soldea and I am with the Python optimization team in DSLOT group in Intel, Santa Clara, California. In

Re: [Python-Dev] first post introduction and question regarding lto

2017-08-07 Thread Soldea, Octavian
Hello Thank you for your messages. I am not quite sure I understood, therefore, I would like to ask if you see beneficial to have the option of lto separately? Best regards, Octavian -Original Message- From: Wang, Peter Xihong Sent: Monday, August 7, 2017 5:00 PM To: Victor

Re: [Python-Dev] first post introduction and question regarding lto

2017-08-07 Thread Victor Stinner
I don't think that PGO compilation itself is slow. Basically, I expect that it only doubles the compilation time, but compiling Python takes less than 1 minute usually. The slow part is the profiling task: run the full Python test suite, which takes at least 20 minutes. The tests must be run

Re: [Python-Dev] first post introduction and question regarding lto

2017-08-07 Thread Soldea, Octavian
Hello Gregory: Thank you for your message. I really appreciate it. In my opinion the use of lto only compilation mode can be of benefit from two reasons at least: 1. Lto only can provide a platform for experimentations. Of course, it seems to be very application specific. 2. Lto

Re: [Python-Dev] first post introduction and question regarding lto

2017-08-07 Thread Wang, Peter Xihong
We evaluated different tests before setting down and proposing regrtest suite for PGO training, including using OpenStack benchmarks for OpenStack applications. The regrtest suite was found consistently giving the best in terms of performance across applications/workloads. So I would

Re: [Python-Dev] first post introduction and question regarding lto

2017-08-07 Thread Gregory P. Smith
I've personally never seen a situation where PGO is not desired yet some other fancier optimization such as LTO is. When do you encounter people wanting that? PGO always produces a 10-20% faster CPython interpreter. I have no problem with patches enabling an LTO only build for anyone who wants

Re: [Python-Dev] first post introduction and question regarding lto

2017-08-07 Thread Gregory P. Smith
I don't know whether it is beneficial or not - but having the capability to build LTO without PGO seems reasonable. I can review any pull requests altering configure.ac and Makefile.pre.in to make such a change. -@gpshead On Mon, Aug 7, 2017 at 5:08 PM Soldea, Octavian