Open
Description
As outlined in pymc-devs/pymc#3140, I am having troubles to use PyMC3 under Windows with multiprocessing. I was suggested by @twiecki to open an issue also here, as the problem seems to be related to Theano---backend of PyMC3.
In short:
- the problem is limited to Windows;
- the graph compilation succeeds either by disabling multiprocessing or by setting
theano.config.mode = 'FAST_COMPILE'
; - the problem happens both when using Jupyter and when using the Python script only.
The traceback points to a compilation error:
You can find the C code in this temporary file: C:\Users\moran\AppData\Local\Temp\theano_compilation_error_jfoh7gz2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Miniconda3\envs\intro_to_pymc3\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\compile\function_module.py", line 1082, in _constructor_Function
f = maker.create(input_storage, trustme=True)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\compile\function_module.py", line 1715, in create
input_storage=input_storage_lists, storage_map=storage_map)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\link.py", line 699, in make_thunk
storage_map=storage_map)[:3]
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\compile\debugmode.py", line 1678, in make_all
no_recycling)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\op.py", line 858, in make_c_thunk
output_storage=node_output_storage)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\cc.py", line 1217, in make_thunk
keep_lock=keep_lock)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\cc.py", line 1157, in __compile__
keep_lock=keep_lock)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\cc.py", line 1620, in cthunk_factory
key=key, lnk=self, keep_lock=keep_lock)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\cmodule.py", line 1181, in module_from_key
module = lnk.compile_cmodule(location)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\cc.py", line 1523, in compile_cmodule
preargs=preargs)
File "C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\cmodule.py", line 2391, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: ('Compilation failed (return status=3): ', '[Elemwise{Composite{((-(i0 * i1)) / i2)}}(<TensorType(float64, matrix)>, <TensorType(float64, matrix)>, <TensorType(float64, row)>)]')
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFE107494C4 Unknown Unknown Unknown
KERNELBASE.dll 00007FFE79672763 Unknown Unknown Unknown
KERNEL32.DLL 00007FFE7ABD7E94 Unknown Unknown Unknown
ntdll.dll 00007FFE7D2CA251 Unknown Unknown Unknown
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFE107494C4 Unknown Unknown Unknown
KERNELBASE.dll 00007FFE79672763 Unknown Unknown Unknown
KERNEL32.DLL 00007FFE7ABD7E94 Unknown Unknown Unknown
ntdll.dll 00007FFE7D2CA251 Unknown Unknown Unknown
The temporary, compiled C code reports in the last line:
Problem occurred during compilation with the command line below:
"c:\miniconda3\envs\intro_to_pymc3\library\mingw-w64\bin\g++.exe" -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=haswell -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\numpy\core\include" -I"C:\Miniconda3\envs\intro_to_pymc3\include" -I"C:\Miniconda3\envs\intro_to_pymc3\lib\site-packages\theano\gof\c_code" -L"C:\Miniconda3\envs\intro_to_pymc3\libs" -L"C:\Miniconda3\envs\intro_to_pymc3" -o "C:\Users\moran\AppData\Local\Theano\compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_69_Stepping_1_GenuineIntel-3.6.6-64\tmp2h9a4y2s\mfbb242647a0afa02ea639375cc1adad8acf3db0451156e5a8136d7bd222ef702.pyd" "C:\Users\moran\AppData\Local\Theano\compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_69_Stepping_1_GenuineIntel-3.6.6-64\tmp2h9a4y2s\mod.cpp" -lpython36
I also noticed that the tmp folder ...\tmp2h9a4y2s\...
, which is references in the compilation command, does not exist.
I have updated both PyMC3 and Theano to master.
Please, let me know if you need further info to investigate the issue.
Metadata
Metadata
Assignees
Labels
No labels