Getting Compilation error

Hello,

It’s been a while since I could not get pymc3 to install. I finally got the git version to install and when trying to run the find map function, I got the following error. Does this look familiar to anyone? If so, is there a solution?

You can find the C code in this temporary file: C:\Users\JORDAN~1.GIT\AppData\Local\Temp\aesara_compilation_error_3ui49fcj
Traceback (most recent call last):

  File "<ipython-input-10-7232cd33518f>", line 1, in <module>
    map_estimate = pm.find_MAP(model=basic_model)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\pymc3\tuning\starting.py", line 114, in find_MAP
    dlogp_func = bij.mapf(model.fastdlogp_nojac(vars))

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\pymc3\model.py", line 465, in fastdlogp_nojac
    return self.model.fastfn(gradient(self.logp_nojact, vars))

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\pymc3\aesaraf.py", line 134, in gradient
    return at.concatenate([gradient1(f, v) for v in vars], axis=0)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\pymc3\aesaraf.py", line 134, in <listcomp>
    return at.concatenate([gradient1(f, v) for v in vars], axis=0)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\pymc3\aesaraf.py", line 123, in gradient1
    return at.flatten(grad(f, v, disconnected_inputs="warn"))

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\gradient.py", line 630, in grad
    rval = _populate_grad_dict(var_to_app_to_idx, grad_dict, wrt, cost_name)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\gradient.py", line 1441, in _populate_grad_dict
    rval = [access_grad_cache(elem) for elem in wrt]

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\gradient.py", line 1441, in <listcomp>
    rval = [access_grad_cache(elem) for elem in wrt]

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\gradient.py", line 1394, in access_grad_cache
    term = access_term_cache(node)[idx]

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\gradient.py", line 1059, in access_term_cache
    output_grads = [access_grad_cache(var) for var in node.outputs]

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\gradient.py", line 1059, in <listcomp>
    output_grads = [access_grad_cache(var) for var in node.outputs]

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\gradient.py", line 1394, in access_grad_cache
    term = access_term_cache(node)[idx]

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\gradient.py", line 1221, in access_term_cache
    input_grads = node.op.L_op(inputs, node.outputs, new_output_grads)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\tensor\elemwise.py", line 551, in L_op
    rval = self._bgrad(inputs, outs, ograds)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\tensor\elemwise.py", line 651, in _bgrad
    ret.append(transform(scalar_igrad))

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\tensor\elemwise.py", line 642, in transform
    new_r = Elemwise(node.op, {})(*[transform(ipt) for ipt in node.inputs])

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\tensor\elemwise.py", line 642, in <listcomp>
    new_r = Elemwise(node.op, {})(*[transform(ipt) for ipt in node.inputs])

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\tensor\elemwise.py", line 642, in transform
    new_r = Elemwise(node.op, {})(*[transform(ipt) for ipt in node.inputs])

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\graph\op.py", line 250, in __call__
    compute_test_value(node)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\graph\op.py", line 123, in compute_test_value
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\graph\op.py", line 631, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\graph\op.py", line 597, in make_c_thunk
    outputs = cl.make_thunk(

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\link\c\basic.py", line 1204, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\link\c\basic.py", line 1139, in __compile__
    thunk, module = self.cthunk_factory(

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\link\c\basic.py", line 1635, in cthunk_factory
    module = get_module_cache().module_from_key(key=key, lnk=self)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\link\c\cmodule.py", line 1192, in module_from_key
    module = lnk.compile_cmodule(location)

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\link\c\basic.py", line 1544, in compile_cmodule
    module = c_compiler.compile_str(

  File "c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\link\c\cmodule.py", line 2547, in compile_str
    raise CompileError(

CompileError: Compilation failed (return status=1):
"C:\Users\JORDAN.HOWELL.GITDIR\AppData\Local\Continuum\anaconda3\envs\pymc3_env\Library\mingw-w64\bin\g++.exe" -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -Wno-c++11-narrowing -march=knl -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 -mrtm -mhle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mavx512f -mno-avx512er -mavx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mavx512dq -mavx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mclwb -mno-pcommit -mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8448 -mtune=generic -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\numpy\core\include" -I"c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\include" -I"c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\lib\site-packages\aesara\link\c\c_code" -L"c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env\libs" -L"c:\users\jordan.howell.gitdir\appdata\local\continuum\anaconda3\envs\pymc3_env" -o "C:\Users\JORDAN.HOWELL.GITDIR\AppData\Local\Aesara\compiledir_Windows-10-10.0.19041-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.8.8-64\tmpt1mjiqhe\m93c48febd32b95300756472d90996449471a3c21976ec6807da4bf5124661b9f.pyd" "C:\Users\JORDAN.HOWELL.GITDIR\AppData\Local\Aesara\compiledir_Windows-10-10.0.19041-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.8.8-64\tmpt1mjiqhe\mod.cpp" -lpython38
C:\Users\JORDAN~1.GIT\AppData\Local\Temp\ccipNpOa.s: Assembler messages:
C:\Users\JORDAN~1.GIT\AppData\Local\Temp\ccipNpOa.s:101: Error: invalid register for .seh_savexmm

Did you follow the windows installation instructions and use conda? Installation Guide (Windows) · pymc-devs/pymc3 Wiki · GitHub

Yes

Jordan

I found this numpy issue: https://github.com/numpy/numpy/issues/14787 not sure if that’s helpful. Are you using cygwin?