mattjj / pyhsmm

MIT License
546 stars 173 forks source link

pyhsmm on windows #27

Closed pawarrick closed 9 years ago

pawarrick commented 9 years ago

Hi, After a few days of various combinations of python environments and difficulties with the pyhsmm install, I thought I would check in to see if I there was something I could do that would be more successful. Here's the steps I've taken:

2) Install Anaconda-2.0.1-Windows-x86_64 3) Download pyhsmm 4) Install pyhsmm: python setup.py build_ext --inplace 5) Errors during compile of first cpp file: hmm_messages_interface.cpp: "::hypot not defined" 6) From http://bugs.python.org/issue11566: add #include cmath earlier than python.h, i.e., at the top of hmm_messages_interface.cpp 7) "::hypot" error no longer appears, but the next one remains: "error: invalid conversion from '__pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive]"

I don't see a quick fix to that one in the searches that I've done.

Below is the full install console output. You will notice that I am using the gcc that comes with Anaconda (4.7.0). You do suggest using 4.8 and a quick check of using that instead gave the same errors.

Any thoughts would be most appreciated, Phil

running build_ext building 'internals.hmm_messages_interface' extension D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c internals\hmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DTEMPS_ON_STACK In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1761:0, from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17, from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4, from internals\hmm_messages_interface.cpp:351: D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:13:79: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION In file included from d:\anaconda\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/complex:46:0, from deps/Eigen3/Eigen/Core:56, from internals\hmm_messages.h:4, from internals\hmm_messages_interface.cpp:359: d:\anaconda\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/cmath:1096:11: error: '::hypot' has not been declared internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_68sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:10987:865: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_70sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:11265:874: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_72sample_forwardslog(PyObject, Pyx_memviewslice, __Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:11543:865: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_74sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:11821:874: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_76sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:12099:865: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_78sample_forwardslog(PyObject, Pyx_memviewslice, __Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:12377:874: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_80sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:12655:865: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_82sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:12933:874: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_84sample_forwardslog(PyObject, Pyx_memviewslice, __Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:13211:865: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_86sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:13489:874: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_88sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:13767:865: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_90sample_forwardslog(PyObject, Pyx_memviewslice, __Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:14045:874: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_92sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:14323:865: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_94sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:14601:874: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_96sample_forwardslog(PyObject, Pyx_memviewslice, __Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:14879:865: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_98sample_forwardslog(PyObject, Pyx_memviewslice, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:15157:874: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:267:17: error: initializing argument 7 of 'static void hmmc<FloatType, IntType>::sample_forwardslog(int, int, FloatType, FloatType, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_266sample_backwardsnormalized(PyObject, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:44761:645: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:277:17: error: initializing argument 5 of 'static void hmmc<FloatType, IntType>::sample_backwardsnormalized(int, int, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_268sample_backwardsnormalized(PyObject, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:45004:650: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:277:17: error: initializing argument 5 of 'static void hmmc<FloatType, IntType>::sample_backwardsnormalized(int, int, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_270sample_backwardsnormalized(PyObject, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:45247:645: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:277:17: error: initializing argument 5 of 'static void hmmc<FloatType, IntType>::sample_backwardsnormalized(int, int, FloatType, FloatType, IntType, FloatType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface_272sample_backwardsnormalized(PyObject, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:45490:650: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmm_messages.h:277:17: error: initializing argument 5 of 'static void hmmc<FloatType, IntType>::sample_backwardsnormalized(int, int, FloatType, FloatType, IntType, FloatType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface286viterbi(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:50903:602: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmmmessages.h:282:17: error: initializing argument 6 of 'static void hmmc<FloatType, IntType>::viterbi(int, int, FloatType, FloatType, FloatType, IntType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface288viterbi(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:51099:608: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmmmessages.h:282:17: error: initializing argument 6 of 'static void hmmc<FloatType, IntType>::viterbi(int, int, FloatType, FloatType, FloatType, IntType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface290viterbi(PyObject, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:51295:602: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmmmessages.h:282:17: error: initializing argument 6 of 'static void hmmc<FloatType, IntType>::viterbi(int, int, FloatType, FloatType, FloatType, IntType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface292viterbi(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:51491:608: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmmmessages.h:282:17: error: initializing argument 6 of 'static void hmmc<FloatType, IntType>::viterbi(int, int, FloatType, FloatType, FloatType, IntType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface294viterbi(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:51687:602: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmmmessages.h:282:17: error: initializing argument 6 of 'static void hmmc<FloatType, IntType>::viterbi(int, int, FloatType, FloatType, FloatType, IntType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface296viterbi(PyObject, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:51883:608: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmmmessages.h:282:17: error: initializing argument 6 of 'static void hmmc<FloatType, IntType>::viterbi(int, int, FloatType, FloatType, FloatType, IntType_) [with FloatType = double; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface298viterbi(PyObject, Pyx_memviewslice, Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:52079:602: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmmmessages.h:282:17: error: initializing argument 6 of 'static void hmmc<FloatType, IntType>::viterbi(int, int, FloatType, FloatType, FloatType, IntType_) [with FloatType = float; IntType = int]' [-fpermissive] internals\hmm_messages_interface.cpp: In function 'PyObject* pyx_pf_6pyhsmm_9internals_22hmm_messages_interface300viterbi(PyObject, Pyx_memviewslice, __Pyx_memviewslice, Pyxmemviewslice, PyArrayObject)': internals\hmm_messages_interface.cpp:52275:608: error: invalid conversion from 'pyx_t_5numpy_int32t* {aka long int}' to 'int_' [-fpermissive] In file included from internals\hmm_messages_interface.cpp:359:0: internals\hmmmessages.h:282:17: error: initializing argument 6 of 'static void hmmc<FloatType, IntType>::viterbi(int, int, FloatType, FloatType, FloatType, IntType_) [with FloatType = double; IntType = int]' [-fpermissive] error: command 'D:\Anaconda\Scripts\gcc.bat' failed with exit status 1

mattjj commented 9 years ago

(Warning: I don't have any Windows machines I can try things on.)

It looks like there's at least one other error with hypot:

In file included from d:\anaconda\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/complex:46:0,
from deps/Eigen3/Eigen/Core:56,
from internals\hmm_messages.h:4,
from internals\hmm_messages_interface.cpp:359:
d:\anaconda\mingw\bin../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/cmath:1096:11: error: '::hypot' has not been declared

Not sure what to do about that. This code doesn't use that function, but it looks like it's being used inside Eigen.

As for the type error, it looks like np.int32_t thinks it's a long int*, which seems like a strange thing for it to be. What versions of numpy and cython are you using?

One thing to try is to avoid referring to that type at all and only rely on stdint.h. In a minute I'll push a branch with that change.

mattjj commented 9 years ago

Can you try the branch windows-weirdness and see if the int type errors go away?

pawarrick commented 9 years ago

Hello Matthew,

Thanks for your speedy response-I needed the weekend to re-respond...

Your changed fixed the invalid pointer conversion, so the first file hmm.messages_interface.cpp now compiles (again also with the addition of the include cmath at the top of the cpp file).

So now the second file hsmm_messages_interface.cpp has the same error messages (full output below), so it looks like applying the changes there too will get to the next step (which is hopefully a successful compile).

How is that best managed codewise?

By the way, the Anaconda Python 2.7 distribution has the following package versions (full list here http://docs.continuum.io/anaconda/pkg-docs.html)

cython 0.20.1 (Apache 2.0) numpy 1.8.1 (BSD)

Many thanks,

Phil

running build_ext
building 'internals.hmm_messages_interface' extension
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c internals\hmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DTEMPS_ON_STACK
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                 from internals\hmm_messages_interface.cpp:349:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:13:79: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
writing build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.def
D:\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\pyhsmm\internals\hmm_messages_interface.pyd
building 'internals.hsmm_messages_interface' extension
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c internals\hsmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\internals\hsmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DTEMPS_ON_STACK
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                 from internals\hsmm_messages_interface.cpp:346:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:13:79: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
In file included from d:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/complex:46:0,
                 from deps/Eigen3/Eigen/Core:56,
                 from internals\hsmm_messages.h:4,
                 from internals\hsmm_messages_interface.cpp:354:
d:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/c++/4.7.0/cmath:1096:11: error: '::hypot' has not been declared
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_136sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:24170:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_138sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:24486:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_140sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:24802:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_142sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:25118:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_144sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:25434:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_146sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:25750:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_148sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:26066:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_150sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:26382:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_152sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:26698:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_154sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:27014:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_156sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:27330:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_158sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:27646:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_160sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:27962:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_162sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:28278:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_164sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:28594:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_166sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:28910:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_168sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:29226:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_170sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:29542:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_172sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:29858:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_174sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:30174:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_176sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:30490:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_178sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:30806:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_180sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:31122:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_182sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:31438:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_184sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:31754:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_186sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:32070:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_188sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:32386:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_190sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:32702:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_192sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:33018:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_194sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:33334:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_196sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:33650:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_198sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:33966:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_200sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:34282:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_202sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:34598:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_204sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:34914:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_206sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:35230:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_208sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:35546:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_210sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:35862:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_212sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:36178:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_214sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:36494:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_216sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:36810:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_218sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:37126:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_220sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:37442:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_222sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:37758:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_224sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:38074:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_226sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:38390:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_228sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:38706:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_230sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:39022:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_232sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:39338:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_234sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:39654:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_236sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:39970:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_238sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:40286:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_240sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:40602:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_242sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:40918:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_244sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:41234:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_246sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:41550:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_248sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:41866:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_250sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:42182:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_252sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:42498:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_254sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:42814:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_256sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:43130:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_258sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:43446:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_260sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:43762:1172: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = float; IntType = int]' [-fpermissive]
internals\hsmm_messages_interface.cpp: In function 'PyObject* __pyx_pf_6pyhsmm_9internals_23hsmm_messages_interface_262sample_forwards_log(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, PyArrayObject*)':
internals\hsmm_messages_interface.cpp:44078:1185: error: invalid conversion from '__pyx_t_5numpy_int32_t* {aka long int*}' to 'int*' [-fpermissive]
In file included from internals\hsmm_messages_interface.cpp:354:0:
internals\hsmm_messages.h:186:17: error:   initializing argument 9 of 'static void hsmmc<FloatType, IntType>::sample_forwards_log(int, int, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, FloatType*, IntType*, FloatType*) [with FloatType = double; IntType = int]' [-fpermissive]
error: command 'D:\\Anaconda\\Scripts\\gcc.bat' failed with exit status 1
mattjj commented 9 years ago

I applied the same to the hsmm code. Let me know if that works for you.

I'll probably merge these commits into master if they work.

My Anaconda (on Arch Linux) is on numpy 1.9.0 and cython 0.21. Maybe I set something to do ambitious upgrades, or maybe the web listing is slightly outdated. I'm also testing on a Mac with numpy 1.8.1 and cython 0.21 (not using Anaconda).

The cmath include hack is really unfortunate. Let me know if you find a better way to do that.

mattjj commented 9 years ago

Looks like the cmath thing can at least be done with a compiler directive instead of requiring an edit to the generated code. An alternative is to include the generated code (with the fix) in git, which I think is the recommended practice anyway.

pawarrick commented 9 years ago

Matthew,

Got through compiling hsmm_messages_interface, but now there in a problem exporting symbols during the link of util/cstats (see below):

Do you have a suggestion on where to put the compiler directive for including cmath? I tried putting it in the list of compile arguments in setup.py like this

extra_compile_args = ['-DHMM_TEMPS_ON_HEAP','-DTEMPS_ON_STACK', '-include cmath ']

but that didn't work:

Thanks, Phil

running build_ext
building 'internals.hmm_messages_interface' extension
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c internals\hmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DTEMPS_ON_STACK
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                 from internals\hmm_messages_interface.cpp:348:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:13:79: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
writing build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.def
D:\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\pyhsmm\internals\hmm_messages_interface.pyd
building 'internals.hsmm_messages_interface' extension
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c internals\hsmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\internals\hsmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DTEMPS_ON_STACK
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                 from internals\hsmm_messages_interface.cpp:348:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:13:79: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
writing build\temp.win-amd64-2.7\Release\internals\hsmm_messages_interface.def
D:\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\internals\hsmm_messages_interface.o build\temp.win-amd64-2.7\Release\internals\hsmm_messages_interface.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\pyhsmm\internals\hsmm_messages_interface.pyd
building 'util\cstats' extension
creating build\temp.win-amd64-2.7\Release\util
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c util\cstats.c -o build\temp.win-amd64-2.7\Release\util\cstats.o -O3 -w -DHMM_TEMPS_ON_HEAP -DTEMPS_ON_STACK
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                 from util\cstats.c:346:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:12:9: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
writing build\temp.win-amd64-2.7\Release\util\cstats.def
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\util\cstats.o build\temp.win-amd64-2.7\Release\util\cstats.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\pyhsmm\util\cstats.pyd
Cannot export cstats: symbol not defined
Cannot export initutil: symbol not defined
collect2.exe: error: ld returned 1 exit status
error: command 'D:\\Anaconda\\Scripts\\gcc.bat' failed with exit status 1
mattjj commented 9 years ago

I don't have any good ideas on that one. Neither "cstats" nor "initutil" occur as strings in cstats.pyx, so they must be in the code that either cython or the compilation process is generating on your platform. The step of writing a .def file seems to be Windows-specific as well, and I don't know anything about those.

Here are three ideas that are probably unhelpful:

  1. check if the cstats.so (or .dll or whatever) file was built anyway even though you got an error
  2. clean and rebuild
  3. upgrade both mingw/gcc and cython and try again
  4. try using the cstats.c file generated on my laptop, which you might be able to build with the commands
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c util\cstats.c -o build\temp.win-amd64-2.7\Release\util\cstats.o -O3 -w
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\util\cstats.o build\temp.win-amd64-2.7\Release\util\cstats.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\pyhsmm\util\cstats.pyd
pawarrick commented 9 years ago

Matthew,

cstats.o and cstats.def are the only files generated in prefix\pyhsmm\build\temp.win-amd64-2.7\Release\util (no .dll or .so)

Using the cstats.c file you generated produced the same export symbol errors during linking.

Upgrading to mingw/gcc 4.8.1 and cython 0.21 created new problems with undefined python references in the first compilation file hmm_messages_interface (see below). Maybe other python packages have to be upgraded as well to be compatible?

Thanks for your help,

Phil

running build_ext
building 'internals.hmm_messages_interface' extension
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c internals\hmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DTEMPS_ON_STACK
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                 from internals\hmm_messages_interface.cpp:234:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:13:79: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
                          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION")
                                                                               ^
writing build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.def
D:\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\pyhsmm\internals\hmm_messages_interface.pyd
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x21): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x11f): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x195): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x1e8): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x329): undefined reference to `_imp___PyThreadState_Current'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x3c9): undefined reference to `_imp___PyThreadState_Current'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x474): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x4cc): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x4f1): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x50c): undefined reference to `_imp___Py_NoneStruct'

... (MANY MORE Py_* undefined references)

build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o:hmm_messages_interface.cpp:(.text+0x4f234): undefined reference to `_imp__PyDict_GetItem'
d:/program files (x86)/mingw-w64/i686-4.8.1-win32-dwarf-rt_v3-rev2/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.1/../../../../i686-w64-mingw32/bin/ld.exe: build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.o: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
error: command 'D:\\Anaconda\\Scripts\\g++.bat' failed with exit status 1
mattjj commented 9 years ago

Did you clean before rebuilding? Make sure the build directory is removed.

If that doesn't help, I'm afraid I'm at a loss. I don't think these issues are specific to pyhsmm, but instead have more to do with the state of cython and/or python extension modules on Windows.

pawarrick commented 9 years ago

I began each test install with a fresh unpack of pyhsmm zip file which should be as clean as possible...

Unfortunately this is my first foray into Python scientific computing (many years with Matlab...) so I don't have many insights on this windows-specific problem.

Phil

pawarrick commented 9 years ago

Cast the net a bit wider here: http://stackoverflow.com/questions/26124546/problems-installing-python2-7-package-pyhsmm-on-64-bit-windows

mattjj commented 9 years ago

They are going to make fun of me for lacking a proper setup.py file! I just use it to build the cython, but I've never gotten to making it install properly into site-packages. This is just research code after all.

Let me know if you get any useful hints.

Sent from my phone

pawarrick commented 9 years ago

If anyone makes fun of you about that, I'll refer them to your JMLR article whose elegance got me into this mess in the first place...

mattjj commented 9 years ago

Btw my thesis has a cleaned up version of that work (and more): http://www.mit.edu/~mattjj/thesis.pdf

pawarrick commented 9 years ago

Excellent thanks. My area is fetal surveillance during labour and delivery. There are many observable in this problem (fECG, heart rate, uterine pressure), but they are quite indirectly linked to the hidden state, that is the fetal state (ie.degree of oxygenation/acidosis of the fetal circulation). So inference approaches are very relevant. More here: https://www.researchgate.net/profile/Philip_Warrick

pawarrick commented 9 years ago

Matthew:

Some steps forward:

After familiarizing myself with the basics of Cython here: http://docs.cython.org/src/tutorial/cython_tutorial.html# Managed to produce the util\cstats.pyd.

From the util directory, I ran

python setup.py build_ext --inplace

but in util/setup.py I bypassed your cyutil version of cythonize and used the default:

from distutils.core import setup
import numpy as np
from Cython.Build import cythonize

setup(
    ext_modules=cythonize("*.pyx"),
    include_dirs=[np.get_include(), 'D:\Python\packages\pyhsmm\pyhsmm\deps\Eigen3'],
)

This generated the cstats.pyd. Generation of temp.pyd failed first because it couldn't find the Eigen header (for that reason I kludged it into the include_dirs and I think you have a nicer way to do that) but then because it couldn't find the Open MP header omp.h

Don't see an official python Open MP package so not sure what your assumed dependency was with that parallel functionality.

Full console output below.

Phil

D:\Python\packages\pyhsmm\pyhsmm\util>python setup.py build_ext --inplace
Compiling cstats.pyx because it changed.
Compiling temp.pyx because it changed.
Cythonizing cstats.pyx
Cythonizing temp.pyx
running build_ext
building 'pyhsmm.util.cstats' extension
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -ID:\Anaconda\lib\site-pac
kages\numpy\core\include -ID:\Python\packages\pyhsmm\pyhsmm\deps\Eigen3 -ID:\Ana
conda\include -ID:\Anaconda\PC -c cstats.c -o build\temp.win-amd64-2.7\Release\c
stats.o -O3 -w
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/nda
rraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/nda
rrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arr
ayobject.h:4,
                 from cstats.c:232:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:
12:9: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/nu
mpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disa
ble it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
writing build\temp.win-amd64-2.7\Release\cstats.def
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Relea
se\cstats.o build\temp.win-amd64-2.7\Release\cstats.def -LD:\Anaconda\libs -LD:\
Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\pyhsmm\
util\pyhsmm\util\cstats.pyd
building 'pyhsmm.util.temp' extension
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -Iinternals
/ -ID:\Anaconda\lib\site-packages\numpy\core\include -ID:\Python\packages\pyhsmm
\pyhsmm\deps\Eigen3 -ID:\Anaconda\include -ID:\Anaconda\PC -c temp.cpp -o build\
temp.win-amd64-2.7\Release\temp.o -O3 -w -DEIGEN_DONT_PARALLELIZE -DNDEBUG -fope
nmp -std=c++11
In file included from temp.cpp:240:0:
temp.h:3:60: fatal error: omp.h: No such file or directory
compilation terminated.
writing build\temp.win-amd64-2.7\Release\temp.def
D:\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Relea
se\temp.o build\temp.win-amd64-2.7\Release\temp.def -LD:\Anaconda\libs -LD:\Anac
onda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\pyhsmm\util
\pyhsmm\util\temp.pyd -fopenmp
g++.exe: error: build\temp.win-amd64-2.7\Release\temp.o: No such file or directo
ry
pawarrick commented 9 years ago

notice that the successful line

building 'pyhsmm.util.cstats' extension

is different than the one that failed (I think . vs slash is something you address in your version of cython?)

building 'util\cstats' extension
mattjj commented 9 years ago

OpenMP isn't a python-level thing; it's all in the low-level code and python doesn't have to know about it. OpenMP requires compiler support and GNU compilers have it (they ship with the headers and the runtime), but I don't know about mingw versions.

You probably don't need that temp.pyx file at all, so you can probably just delete it. I'll push a commit to master to do that.

Oh interesting that my cython hack might be the thing breaking the build! I kind of forgot about that. I should see if I can fix it and/or check if it's still necessary.

pawarrick commented 9 years ago

Used the latest windows-weirdness including the cyutil clean up, and explicitly adding #include cmath as above, to compile everything successfully. And so, the demos examples\hmm.py and examples\hsmm.py worked!

Did one last search for explicitly including the cmath on the command line, and everything pointed to this change to setup.py solving it:

extra_compile_args = ['-DHMM_TEMPS_ON_HEAP', '-include cmath ']

but this problem locating the cmath header occurred:

D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anacon
da\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -
c internals\hmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\inter
nals\hmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP "-i
nclude cmath "
cc1plus.exe: fatal error:  cmath : No such file or directory
mattjj commented 9 years ago

Glad the demos are working now!

It looks like it's keeping the trailing space and parsing it as a single string. Can you try this instead?

extra_compile_args = ['-DHMM_TEMPS_ON_HEAP', '-include', 'cmath']

I realized I should have mentioned this in the readme and in this thread: it's not completely necessary to build any of the low-level code because pyhsmm also includes pure-python model classes (though their performance is not so good).

pawarrick commented 9 years ago

OK, verified that your above suggestion worked, so that could be included in the windows-weirdness too.

Following your last comment, I tried again to run an all-python demo from a fresh copy of the master pyhsmm without doing any other installation:

python pyhsmm/examples/hmm.py

and got a problem with a reference to the non-compiled cstats (should it use the stats version instead?)

D:\Python\packages\pyhsmm\test>python pyhsmm/examples/hmm.py
Traceback (most recent call last):
  File "pyhsmm/examples/hmm.py", line 9, in <module>
    import pyhsmm
  File "D:\Python\packages\pyhsmm\test\pyhsmm\__init__.py", line 2, in <module>
    import models
  File "D:\Python\packages\pyhsmm\test\pyhsmm\models.py", line 9, in <module>
    from basic.abstractions import Model, ModelGibbsSampling, \
  File "D:\Python\packages\pyhsmm\test\pyhsmm\basic\__init__.py", line 1, in <mo
dule>
    import models
  File "D:\Python\packages\pyhsmm\test\pyhsmm\basic\models.py", line 1, in <modu
le>
    from pybasicbayes.models import *
  File "D:\Python\packages\pyhsmm\test\pyhsmm\basic\pybasicbayes\__init__.py", l
ine 1, in <module>
    import abstractions, distributions, models, util
  File "D:\Python\packages\pyhsmm\test\pyhsmm\basic\pybasicbayes\distributions.p
y", line 21, in <module>
    from util.cstats import sample_crp_tablecounts
ImportError: No module named cstats
mattjj commented 9 years ago

Good find! That is a C dependency. I think I fixed it in the new commits on master (of pybasicbayes and pyhsmm) and on windows-weirdness, but I haven't tested it much.

I added --with-cmath as a flag in setup.py.

So are all the compiling issues sorted out now?

pawarrick commented 9 years ago

Very close... Looks like a bit fine tuning on when to add the -include cmath is required. It seems that if cmath is not required, like for

basic\pybasicbayes\util\cstats and
util.cstats

then there is a problem (I've separated the single build into sections below):

D:\Python\packages\pyhsmm\ClosedIssue27\pyhsmm>python setup.py build_ext --inpla
ce --with-cmath
Compiling basic\pybasicbayes\util\cstats.pyx because it changed.
Compiling internals\hmm_messages_interface.pyx because it changed.
Compiling internals\hsmm_messages_interface.pyx because it changed.
Compiling util\cstats.pyx because it changed.
Cythonizing basic\pybasicbayes\util\cstats.pyx
Cythonizing internals\hmm_messages_interface.pyx
Cythonizing internals\hsmm_messages_interface.pyx
Cythonizing util\cstats.pyx
running build_ext
building 'basic.pybasicbayes.util.cstats' extension
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\basic
creating build\temp.win-amd64-2.7\Release\basic\pybasicbayes
creating build\temp.win-amd64-2.7\Release\basic\pybasicbayes\util
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -ID:\Anaconda\lib\site-pac
kages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c basic\pybasic
bayes\util\cstats.c -o build\temp.win-amd64-2.7\Release\basic\pybasicbayes\util\
cstats.o -O3 -w -DHMM_TEMPS_ON_HEAP -include cmath
cc1.exe: fatal error: cmath: No such file or directory
compilation terminated.
writing build\temp.win-amd64-2.7\Release\basic\pybasicbayes\util\cstats.def
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Relea
se\basic\pybasicbayes\util\cstats.o build\temp.win-amd64-2.7\Release\basic\pybas
icbayes\util\cstats.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lpython2
7 -lmsvcr90 -o D:\Python\packages\pyhsmm\ClosedIssue27\pyhsmm\basic\pybasicbayes
\util\cstats.pyd
gcc.exe: error: build\temp.win-amd64-2.7\Release\basic\pybasicbayes\util\cstats.
o: No such file or directory

but the h?mm_messages_interface build fine:

building 'internals.hmm_messages_interface' extension
creating build\temp.win-amd64-2.7\Release\internals
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anacon
da\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -
c internals\hmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\inter
nals\hmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -in
clude cmath
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/nda
rraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/nda
rrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arr
ayobject.h:4,
                 from internals\hmm_messages_interface.cpp:232:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:
13:79: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/n
umpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, dis
able it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
writing build\temp.win-amd64-2.7\Release\internals\hmm_messages_interface.def
D:\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Relea
se\internals\hmm_messages_interface.o build\temp.win-amd64-2.7\Release\internals
\hmm_messages_interface.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lpyt
hon27 -lmsvcr90 -o D:\Python\packages\pyhsmm\ClosedIssue27\pyhsmm\internals\hmm_
messages_interface.pyd
building 'internals.hsmm_messages_interface' extension
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Ideps/Eigen3/ -ID:\Anacon
da\lib\site-packages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -
c internals\hsmm_messages_interface.cpp -o build\temp.win-amd64-2.7\Release\inte
rnals\hsmm_messages_interface.o -O3 -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -
include cmath
In file included from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/nda
rraytypes.h:1761:0,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/nda
rrayobject.h:17,
                 from D:\Anaconda\lib\site-packages\numpy\core\include/numpy/arr
ayobject.h:4,
                 from internals\hsmm_messages_interface.cpp:232:
D:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:
13:79: note: #pragma message: D:\Anaconda\lib\site-packages\numpy\core\include/n
umpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, dis
able it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
writing build\temp.win-amd64-2.7\Release\internals\hsmm_messages_interface.def
D:\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Relea
se\internals\hsmm_messages_interface.o build\temp.win-amd64-2.7\Release\internal
s\hsmm_messages_interface.def -LD:\Anaconda\libs -LD:\Anaconda\PCbuild\amd64 -lp
ython27 -lmsvcr90 -o D:\Python\packages\pyhsmm\ClosedIssue27\pyhsmm\internals\hs
mm_messages_interface.pyd

and then util.cstats fails:

building 'util.cstats' extension
creating build\temp.win-amd64-2.7\Release\util
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -ID:\Anaconda\lib\site-pac
kages\numpy\core\include -ID:\Anaconda\include -ID:\Anaconda\PC -c util\cstats.c
 -o build\temp.win-amd64-2.7\Release\util\cstats.o -O3 -w -DHMM_TEMPS_ON_HEAP -i
nclude cmath
cc1.exe: fatal error: cmath: No such file or directory
compilation terminated.
writing build\temp.win-amd64-2.7\Release\util\cstats.def
D:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Relea
se\util\cstats.o build\temp.win-amd64-2.7\Release\util\cstats.def -LD:\Anaconda\
libs -LD:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o D:\Python\packages\pyhs
mm\ClosedIssue27\pyhsmm\util\cstats.pyd
gcc.exe: error: build\temp.win-amd64-2.7\Release\util\cstats.o: No such file or
directory
mattjj commented 9 years ago

So only the manual include works? If that's the case, I think I'll just add a note to the readme.

pawarrick commented 9 years ago

No, the -include cmath is useful for the files that need it. If I follow the initial install command

python setup.py build_ext --inplace --with-cmath

with

python setup.py build_ext --inplace

the two cstats files do build fine and everything is built correctly.

mattjj commented 9 years ago

I think we got through most of these issues. Making the build easier and making a nice setup.py can be moved to #28.

allista commented 8 years ago

I've just encounterd the same problem with pointer casting and had to change h(s)mm_messages_interface.pyx files as you explained here (defining stateseq as _int32t array and returning it using np.asarray) to be able to build and install from git. The installation from PyPI has failed with the same bug. My environment is:

Linux 3.13.0-74-generic #118-Ubuntu SMP i686 athlon GNU/Linux Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2 Cython (0.23.4) numpy (1.10.2) scipy (0.16.1)

mattjj commented 8 years ago

@allista Thanks for pointing that out. Maybe that diff should be applied to master; can you spell out exactly what you changed (or make a PR)?