{"action":"created","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/4001","repository_url":"https://api.github.com/repos/Theano/Theano","labels_url":"https://api.github.com/repos/Theano/Theano/issues/4001/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/4001/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/4001/events","html_url":"https://github.com/Theano/Theano/issues/4001","id":131706238,"number":4001,"title":"Assembly level instructions for debugging are not helping","user":{"login":"prateekpg2455","id":6943817,"avatar_url":"https://avatars.githubusercontent.com/u/6943817?v=3","gravatar_id":"","url":"https://api.github.com/users/prateekpg2455","html_url":"https://github.com/prateekpg2455","followers_url":"https://api.github.com/users/prateekpg2455/followers","following_url":"https://api.github.com/users/prateekpg2455/following{/other_user}","gists_url":"https://api.github.com/users/prateekpg2455/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekpg2455/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekpg2455/subscriptions","organizations_url":"https://api.github.com/users/prateekpg2455/orgs","repos_url":"https://api.github.com/users/prateekpg2455/repos","events_url":"https://api.github.com/users/prateekpg2455/events{/privacy}","received_events_url":"https://api.github.com/users/prateekpg2455/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-05T17:41:20Z","updated_at":"2016-02-09T15:21:45Z","closed_at":"2016-02-05T17:45:48Z","body":"I am running PyMC3 examples which is highly dependent on Theano. Unfortunately, there are some compiling issues and the output it is generating are assembly level. I am not familiar with assembly level language so i am posting the error log here. \r\n\r\nIt will be really helpful if you can tell me what is going wrong in it. I have tried reinstalling Numpy, Scipy and Theano. Numpy and Scipy are properly linked to OpenBLAS libraries. \r\n\r\nI am running this example :-  https://github.com/pymc-devs/pymc3/blob/master/pymc3/examples/normal.py\r\n\r\n\r\n```\r\nINFO (theano.gof.compilelock): Waiting for existing lock by process '52735' (I am process '53368')\r\nINFO (theano.gof.compilelock): To manually release the lock, delete /home/pgupta/.theano/compiledir_Linux-3.2--virtual-x86_64-with-Ubuntu-12.04-precise-x86_64-2.7.3-64/lock_dir\r\n===============================\r\n00001\t#include <Python.h>\r\n00002\t#include <iostream>\r\n00003\t#include <math.h>\r\n00004\t#include <numpy/arrayobject.h>\r\n00005\t#include <numpy/arrayscalars.h>\r\n00006\t#include <vector>\r\n00007\t#include <algorithm>\r\n00008\t//////////////////////\r\n00009\t////  Support Code\r\n00010\t//////////////////////\r\n00011\r\n00012\r\n00013\t    namespace {\r\n00014\t    struct __struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163 {\r\n00015\t        PyObject* __ERROR;\r\n00016\r\n00017\t        PyObject* storage_V3;\r\n00018\tPyObject* storage_V5;\r\n00019\tPyObject* storage_V1;\r\n00020\r\n00021\r\n00022\t        __struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163() {}\r\n00023\t        ~__struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163(void) {\r\n00024\t            cleanup();\r\n00025\t        }\r\n00026\r\n00027\t        int init(PyObject* __ERROR, PyObject* storage_V3, PyObject* storage_V5, PyObject* storage_V1) {\r\n00028\t            Py_XINCREF(storage_V3);\r\n00029\tPy_XINCREF(storage_V5);\r\n00030\tPy_XINCREF(storage_V1);\r\n00031\t            this->storage_V3 = storage_V3;\r\n00032\tthis->storage_V5 = storage_V5;\r\n00033\tthis->storage_V1 = storage_V1;\r\n00034\r\n00035\r\n00036\r\n00037\r\n00038\r\n00039\t            this->__ERROR = __ERROR;\r\n00040\t            return 0;\r\n00041\t        }\r\n00042\t        void cleanup(void) {\r\n00043\t            __label_1:\r\n00044\r\n00045\tdouble __DUMMY_1;\r\n00046\t__label_3:\r\n00047\r\n00048\tdouble __DUMMY_3;\r\n00049\t__label_5:\r\n00050\r\n00051\tdouble __DUMMY_5;\r\n00052\t__label_8:\r\n00053\r\n00054\tdouble __DUMMY_8;\r\n00055\r\n00056\t            Py_XDECREF(this->storage_V3);\r\n00057\tPy_XDECREF(this->storage_V5);\r\n00058\tPy_XDECREF(this->storage_V1);\r\n00059\t        }\r\n00060\t        int run(void) {\r\n00061\t            int __failure = 0;\r\n00062\r\n00063\t    PyObject* py_V1;\r\n00064\r\n00065\t        PyArrayObject* V1;\r\n00066\r\n00067\t            typedef npy_float64 dtype_V1;\r\n00068\r\n00069\t    PyObject* py_V3;\r\n00070\r\n00071\t        PyArrayObject* V3;\r\n00072\r\n00073\t            typedef npy_float64 dtype_V3;\r\n00074\r\n00075\t    PyObject* py_V5;\r\n00076\r\n00077\t        PyArrayObject* V5;\r\n00078\r\n00079\t            typedef npy_float64 dtype_V5;\r\n00080\r\n00081\t{\r\n00082\r\n00083\t    py_V1 = PyList_GET_ITEM(storage_V1, 0);\r\n00084\t    {Py_XINCREF(py_V1);}\r\n00085\r\n00086\t        if (py_V1 == Py_None)\r\n00087\t        {\r\n00088\r\n00089\t        V1 = NULL;\r\n00090\r\n00091\t        }\r\n00092\t        else\r\n00093\t        {\r\n00094\r\n00095\t            V1 = NULL;\r\n00096\t            if (py_V1 == Py_None) {\r\n00097\t                // We can either fail here or set V1 to NULL and rely on Ops\r\n00098\t                // using tensors to handle the NULL case, but if they fail to do so\r\n00099\t                // they'll end up with nasty segfaults, so this is public service.\r\n00100\t                PyErr_SetString(PyExc_ValueError, \"expected an ndarray, not None\");\r\n00101\t                {\r\n00102\t        __failure = 2;\r\n00103\t        if (!PyErr_Occurred()) {\r\n00104\t            PyErr_SetString(PyExc_RuntimeError,\r\n00105\t                \"Unexpected error in an Op's C code. \"\r\n00106\t                \"No Python exception was set.\");\r\n00107\t            }\r\n00108\t        goto __label_2;}\r\n00109\t            }\r\n00110\t            if (!PyArray_Check(py_V1)) {\r\n00111\t                PyErr_SetString(PyExc_ValueError, \"expected an ndarray\");\r\n00112\t                {\r\n00113\t        __failure = 2;\r\n00114\t        if (!PyErr_Occurred()) {\r\n00115\t            PyErr_SetString(PyExc_RuntimeError,\r\n00116\t                \"Unexpected error in an Op's C code. \"\r\n00117\t                \"No Python exception was set.\");\r\n00118\t            }\r\n00119\t        goto __label_2;}\r\n00120\t            }\r\n00121\t            // We expect NPY_FLOAT64\r\n00122\t            if (!PyArray_ISALIGNED((PyArrayObject*) py_V1)) {\r\n00123\t                PyArrayObject * tmp = (PyArrayObject*) py_V1;\r\n00124\t                PyErr_Format(PyExc_NotImplementedError,\r\n00125\t                             \"expected an aligned array of type %ld \"\r\n00126\t                             \"(NPY_FLOAT64), got non-aligned array of type %ld\"\r\n00127\t                             \" with %ld dimensions, with 3 last dims \"\r\n00128\t                             \"%ld, %ld, %ld\"\r\n00129\t                             \" and 3 last strides %ld %ld, %ld.\",\r\n00130\t                             (long int) NPY_FLOAT64,\r\n00131\t                             (long int) PyArray_TYPE((PyArrayObject*) py_V1),\r\n00132\t                             (long int) PyArray_NDIM(tmp),\r\n00133\t                             (long int) PyArray_NDIM(tmp) >= 3 ?\r\n00134\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-3] : -1,\r\n00135\t                             (long int) PyArray_NDIM(tmp) >= 2 ?\r\n00136\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-2] : -1,\r\n00137\t                             (long int) PyArray_NDIM(tmp) >= 1 ?\r\n00138\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-1] : -1,\r\n00139\t                             (long int) PyArray_NDIM(tmp) >= 3 ?\r\n00140\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-3] : -1,\r\n00141\t                             (long int) PyArray_NDIM(tmp) >= 2 ?\r\n00142\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-2] : -1,\r\n00143\t                             (long int) PyArray_NDIM(tmp) >= 1 ?\r\n00144\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-1] : -1\r\n00145\t            );\r\n00146\t                {\r\n00147\t        __failure = 2;\r\n00148\t        if (!PyErr_Occurred()) {\r\n00149\t            PyErr_SetString(PyExc_RuntimeError,\r\n00150\t                \"Unexpected error in an Op's C code. \"\r\n00151\t                \"No Python exception was set.\");\r\n00152\t            }\r\n00153\t        goto __label_2;}\r\n00154\t            }\r\n00155\t            // This is a TypeError to be consistent with DEBUG_MODE\r\n00156\t            // Note: DEBUG_MODE also tells the name of the container\r\n00157\t            if (PyArray_TYPE((PyArrayObject*) py_V1) != NPY_FLOAT64) {\r\n00158\t                PyErr_Format(PyExc_TypeError,\r\n00159\t                             \"expected type_num %d (NPY_FLOAT64) got %d\",\r\n00160\t                             NPY_FLOAT64, PyArray_TYPE((PyArrayObject*) py_V1));\r\n00161\t                {\r\n00162\t        __failure = 2;\r\n00163\t        if (!PyErr_Occurred()) {\r\n00164\t            PyErr_SetString(PyExc_RuntimeError,\r\n00165\t                \"Unexpected error in an Op's C code. \"\r\n00166\t                \"No Python exception was set.\");\r\n00167\t            }\r\n00168\t        goto __label_2;}\r\n00169\t            }\r\n00170\r\n00171\t        V1 = (PyArrayObject*)(py_V1);\r\n00172\t        Py_XINCREF(V1);\r\n00173\r\n00174\t        }\r\n00175\r\n00176\t{\r\n00177\r\n00178\t    py_V3 = PyList_GET_ITEM(storage_V3, 0);\r\n00179\t    {Py_XINCREF(py_V3);}\r\n00180\r\n00181\t            V3 = NULL;\r\n00182\t            if (py_V3 == Py_None) {\r\n00183\t                // We can either fail here or set V3 to NULL and rely on Ops\r\n00184\t                // using tensors to handle the NULL case, but if they fail to do so\r\n00185\t                // they'll end up with nasty segfaults, so this is public service.\r\n00186\t                PyErr_SetString(PyExc_ValueError, \"expected an ndarray, not None\");\r\n00187\t                {\r\n00188\t        __failure = 4;\r\n00189\t        if (!PyErr_Occurred()) {\r\n00190\t            PyErr_SetString(PyExc_RuntimeError,\r\n00191\t                \"Unexpected error in an Op's C code. \"\r\n00192\t                \"No Python exception was set.\");\r\n00193\t            }\r\n00194\t        goto __label_4;}\r\n00195\t            }\r\n00196\t            if (!PyArray_Check(py_V3)) {\r\n00197\t                PyErr_SetString(PyExc_ValueError, \"expected an ndarray\");\r\n00198\t                {\r\n00199\t        __failure = 4;\r\n00200\t        if (!PyErr_Occurred()) {\r\n00201\t            PyErr_SetString(PyExc_RuntimeError,\r\n00202\t                \"Unexpected error in an Op's C code. \"\r\n00203\t                \"No Python exception was set.\");\r\n00204\t            }\r\n00205\t        goto __label_4;}\r\n00206\t            }\r\n00207\t            // We expect NPY_FLOAT64\r\n00208\t            if (!PyArray_ISALIGNED((PyArrayObject*) py_V3)) {\r\n00209\t                PyArrayObject * tmp = (PyArrayObject*) py_V3;\r\n00210\t                PyErr_Format(PyExc_NotImplementedError,\r\n00211\t                             \"expected an aligned array of type %ld \"\r\n00212\t                             \"(NPY_FLOAT64), got non-aligned array of type %ld\"\r\n00213\t                             \" with %ld dimensions, with 3 last dims \"\r\n00214\t                             \"%ld, %ld, %ld\"\r\n00215\t                             \" and 3 last strides %ld %ld, %ld.\",\r\n00216\t                             (long int) NPY_FLOAT64,\r\n00217\t                             (long int) PyArray_TYPE((PyArrayObject*) py_V3),\r\n00218\t                             (long int) PyArray_NDIM(tmp),\r\n00219\t                             (long int) PyArray_NDIM(tmp) >= 3 ?\r\n00220\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-3] : -1,\r\n00221\t                             (long int) PyArray_NDIM(tmp) >= 2 ?\r\n00222\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-2] : -1,\r\n00223\t                             (long int) PyArray_NDIM(tmp) >= 1 ?\r\n00224\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-1] : -1,\r\n00225\t                             (long int) PyArray_NDIM(tmp) >= 3 ?\r\n00226\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-3] : -1,\r\n00227\t                             (long int) PyArray_NDIM(tmp) >= 2 ?\r\n00228\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-2] : -1,\r\n00229\t                             (long int) PyArray_NDIM(tmp) >= 1 ?\r\n00230\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-1] : -1\r\n00231\t            );\r\n00232\t                {\r\n00233\t        __failure = 4;\r\n00234\t        if (!PyErr_Occurred()) {\r\n00235\t            PyErr_SetString(PyExc_RuntimeError,\r\n00236\t                \"Unexpected error in an Op's C code. \"\r\n00237\t                \"No Python exception was set.\");\r\n00238\t            }\r\n00239\t        goto __label_4;}\r\n00240\t            }\r\n00241\t            // This is a TypeError to be consistent with DEBUG_MODE\r\n00242\t            // Note: DEBUG_MODE also tells the name of the container\r\n00243\t            if (PyArray_TYPE((PyArrayObject*) py_V3) != NPY_FLOAT64) {\r\n00244\t                PyErr_Format(PyExc_TypeError,\r\n00245\t                             \"expected type_num %d (NPY_FLOAT64) got %d\",\r\n00246\t                             NPY_FLOAT64, PyArray_TYPE((PyArrayObject*) py_V3));\r\n00247\t                {\r\n00248\t        __failure = 4;\r\n00249\t        if (!PyErr_Occurred()) {\r\n00250\t            PyErr_SetString(PyExc_RuntimeError,\r\n00251\t                \"Unexpected error in an Op's C code. \"\r\n00252\t                \"No Python exception was set.\");\r\n00253\t            }\r\n00254\t        goto __label_4;}\r\n00255\t            }\r\n00256\r\n00257\t        V3 = (PyArrayObject*)(py_V3);\r\n00258\t        Py_XINCREF(V3);\r\n00259\r\n00260\t{\r\n00261\r\n00262\t    py_V5 = PyList_GET_ITEM(storage_V5, 0);\r\n00263\t    {Py_XINCREF(py_V5);}\r\n00264\r\n00265\t            V5 = NULL;\r\n00266\t            if (py_V5 == Py_None) {\r\n00267\t                // We can either fail here or set V5 to NULL and rely on Ops\r\n00268\t                // using tensors to handle the NULL case, but if they fail to do so\r\n00269\t                // they'll end up with nasty segfaults, so this is public service.\r\n00270\t                PyErr_SetString(PyExc_ValueError, \"expected an ndarray, not None\");\r\n00271\t                {\r\n00272\t        __failure = 6;\r\n00273\t        if (!PyErr_Occurred()) {\r\n00274\t            PyErr_SetString(PyExc_RuntimeError,\r\n00275\t                \"Unexpected error in an Op's C code. \"\r\n00276\t                \"No Python exception was set.\");\r\n00277\t            }\r\n00278\t        goto __label_6;}\r\n00279\t            }\r\n00280\t            if (!PyArray_Check(py_V5)) {\r\n00281\t                PyErr_SetString(PyExc_ValueError, \"expected an ndarray\");\r\n00282\t                {\r\n00283\t        __failure = 6;\r\n00284\t        if (!PyErr_Occurred()) {\r\n00285\t            PyErr_SetString(PyExc_RuntimeError,\r\n00286\t                \"Unexpected error in an Op's C code. \"\r\n00287\t                \"No Python exception was set.\");\r\n00288\t            }\r\n00289\t        goto __label_6;}\r\n00290\t            }\r\n00291\t            // We expect NPY_FLOAT64\r\n00292\t            if (!PyArray_ISALIGNED((PyArrayObject*) py_V5)) {\r\n00293\t                PyArrayObject * tmp = (PyArrayObject*) py_V5;\r\n00294\t                PyErr_Format(PyExc_NotImplementedError,\r\n00295\t                             \"expected an aligned array of type %ld \"\r\n00296\t                             \"(NPY_FLOAT64), got non-aligned array of type %ld\"\r\n00297\t                             \" with %ld dimensions, with 3 last dims \"\r\n00298\t                             \"%ld, %ld, %ld\"\r\n00299\t                             \" and 3 last strides %ld %ld, %ld.\",\r\n00300\t                             (long int) NPY_FLOAT64,\r\n00301\t                             (long int) PyArray_TYPE((PyArrayObject*) py_V5),\r\n00302\t                             (long int) PyArray_NDIM(tmp),\r\n00303\t                             (long int) PyArray_NDIM(tmp) >= 3 ?\r\n00304\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-3] : -1,\r\n00305\t                             (long int) PyArray_NDIM(tmp) >= 2 ?\r\n00306\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-2] : -1,\r\n00307\t                             (long int) PyArray_NDIM(tmp) >= 1 ?\r\n00308\t            PyArray_DIMS(tmp)[PyArray_NDIM(tmp)-1] : -1,\r\n00309\t                             (long int) PyArray_NDIM(tmp) >= 3 ?\r\n00310\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-3] : -1,\r\n00311\t                             (long int) PyArray_NDIM(tmp) >= 2 ?\r\n00312\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-2] : -1,\r\n00313\t                             (long int) PyArray_NDIM(tmp) >= 1 ?\r\n00314\t            PyArray_STRIDES(tmp)[PyArray_NDIM(tmp)-1] : -1\r\n00315\t            );\r\n00316\t                {\r\n00317\t        __failure = 6;\r\n00318\t        if (!PyErr_Occurred()) {\r\n00319\t            PyErr_SetString(PyExc_RuntimeError,\r\n00320\t                \"Unexpected error in an Op's C code. \"\r\n00321\t                \"No Python exception was set.\");\r\n00322\t            }\r\n00323\t        goto __label_6;}\r\n00324\t            }\r\n00325\t            // This is a TypeError to be consistent with DEBUG_MODE\r\n00326\t            // Note: DEBUG_MODE also tells the name of the container\r\n00327\t            if (PyArray_TYPE((PyArrayObject*) py_V5) != NPY_FLOAT64) {\r\n00328\t                PyErr_Format(PyExc_TypeError,\r\n00329\t                             \"expected type_num %d (NPY_FLOAT64) got %d\",\r\n00330\t                             NPY_FLOAT64, PyArray_TYPE((PyArrayObject*) py_V5));\r\n00331\t                {\r\n00332\t        __failure = 6;\r\n00333\t        if (!PyErr_Occurred()) {\r\n00334\t            PyErr_SetString(PyExc_RuntimeError,\r\n00335\t                \"Unexpected error in an Op's C code. \"\r\n00336\t                \"No Python exception was set.\");\r\n00337\t            }\r\n00338\t        goto __label_6;}\r\n00339\t            }\r\n00340\r\n00341\t        V5 = (PyArrayObject*)(py_V5);\r\n00342\t        Py_XINCREF(V5);\r\n00343\r\n00344\t{\r\n00345\t// Op class Elemwise\r\n00346\r\n00347\t        npy_float64* V3_iter;\r\n00348\r\n00349\t                int V3_jumpx_0;\r\n00350\r\n00351\t        npy_float64* V5_iter;\r\n00352\r\n00353\t                npy_intp V5_n0;\r\n00354\t                ssize_t V5_stride0;\r\n00355\t                int V5_jump0_0;\r\n00356\r\n00357\r\n00358\t                V3_jumpx_0 = -(0);\r\n00359\t                //printf(\"V3_jumpx_0 is:\");\r\n00360\t                //std::cout << V3_jumpx_0 << std::endl;\r\n00361\r\n00362\t            if (PyArray_NDIM(V5) < 1) {\r\n00363\t                PyErr_SetString(PyExc_ValueError, \"Not enough dimensions on input.\");\r\n00364\t                {\r\n00365\t        __failure = 7;\r\n00366\t        if (!PyErr_Occurred()) {\r\n00367\t            PyErr_SetString(PyExc_RuntimeError,\r\n00368\t                \"Unexpected error in an Op's C code. \"\r\n00369\t                \"No Python exception was set.\");\r\n00370\t            }\r\n00371\t        goto __label_7;}\r\n00372\t            }\r\n00373\r\n00374\t                V5_n0 = PyArray_DIMS(V5)[0];\r\n00375\t                V5_stride0 = PyArray_STRIDES(V5)[0] / sizeof(npy_float64);\r\n00376\t                V5_jump0_0 = (V5_stride0) - (0);\r\n00377\t                //printf(\"V5_jump0_0 is:\");\r\n00378\t                //std::cout << V5_jump0_0 << std::endl;\r\n00379\r\n00380\r\n00381\t        npy_float64* V1_iter;\r\n00382\r\n00383\t                npy_intp V1_n0;\r\n00384\t                ssize_t V1_stride0;\r\n00385\t                int V1_jump0_0;\r\n00386\r\n00387\t    {\r\n00388\t        npy_intp dims[1];\r\n00389\t        //npy_intp* dims = (npy_intp*)malloc(1 * sizeof(npy_intp));\r\n00390\t        dims[0] = V5_n0;\r\n00391\r\n00392\t        if (!V1) {\r\n00393\t            V1 = (PyArrayObject*)PyArray_EMPTY(1, dims,\r\n00394\t                                                    NPY_FLOAT64,\r\n00395\t                                                    PyArray_ISFORTRAN(V5));\r\n00396\t        }\r\n00397\t        else {\r\n00398\t            PyArray_Dims new_dims;\r\n00399\t            new_dims.len = 1;\r\n00400\t            new_dims.ptr = dims;\r\n00401\t            PyObject* success = PyArray_Resize(V1, &new_dims, 0, NPY_CORDER);\r\n00402\t            if (!success) {\r\n00403\t                // If we can't resize the ndarray we have we can allocate a new one.\r\n00404\t                PyErr_Clear();\r\n00405\t                Py_XDECREF(V1);\r\n00406\t                V1 = (PyArrayObject*)PyArray_EMPTY(1, dims, NPY_FLOAT64, 0);\r\n00407\t            }\r\n00408\t        }\r\n00409\t        if (!V1) {\r\n00410\t            {\r\n00411\t        __failure = 7;\r\n00412\t        if (!PyErr_Occurred()) {\r\n00413\t            PyErr_SetString(PyExc_RuntimeError,\r\n00414\t                \"Unexpected error in an Op's C code. \"\r\n00415\t                \"No Python exception was set.\");\r\n00416\t            }\r\n00417\t        goto __label_7;}\r\n00418\t        }\r\n00419\t    }\r\n00420\r\n00421\t            if (PyArray_NDIM(V1) < 1) {\r\n00422\t                PyErr_SetString(PyExc_ValueError, \"Not enough dimensions on input.\");\r\n00423\t                {\r\n00424\t        __failure = 7;\r\n00425\t        if (!PyErr_Occurred()) {\r\n00426\t            PyErr_SetString(PyExc_RuntimeError,\r\n00427\t                \"Unexpected error in an Op's C code. \"\r\n00428\t                \"No Python exception was set.\");\r\n00429\t            }\r\n00430\t        goto __label_7;}\r\n00431\t            }\r\n00432\r\n00433\t                V1_n0 = PyArray_DIMS(V1)[0];\r\n00434\t                V1_stride0 = PyArray_STRIDES(V1)[0] / sizeof(npy_float64);\r\n00435\t                V1_jump0_0 = (V1_stride0) - (0);\r\n00436\t                //printf(\"V1_jump0_0 is:\");\r\n00437\t                //std::cout << V1_jump0_0 << std::endl;\r\n00438\r\n00439\r\n00440\t            if((PyArray_ISCONTIGUOUS(V5) && PyArray_ISCONTIGUOUS(V1)) || (PyArray_ISFORTRAN(V5) && PyArray_ISFORTRAN(V1))){\r\n00441\r\n00442\t                    // All output have the same size\r\n00443\t                    npy_intp n = PyArray_SIZE(V1);\r\n00444\r\n00445\t            dtype_V3& V3_i = ((dtype_V3*) PyArray_DATA(V3))[0];\r\n00446\r\n00447\t            dtype_V5 * V5_ptr = (dtype_V5*) PyArray_DATA(V5);\r\n00448\r\n00449\t            dtype_V1 * V1_ptr = (dtype_V1*) PyArray_DATA(V1);\r\n00450\r\n00451\t                    for(int i=0; i<n; i++){\r\n00452\r\n00453\t            dtype_V5& V5_i = V5_ptr[i];\r\n00454\r\n00455\t            dtype_V1& V1_i = V1_ptr[i];\r\n00456\r\n00457\t                        {\r\n00458\tnpy_float64 V7_tmp1;\r\n00459\tV7_tmp1 = V5_i * V5_i;\r\n00460\tnpy_float64 V7_tmp2;\r\n00461\tV7_tmp2 = -V7_tmp1;\r\n00462\tV1_i = V3_i + V7_tmp2;\r\n00463\t}\r\n00464\t;\r\n00465\t                    }\r\n00466\r\n00467\t            }else{\r\n00468\t                {\r\n00469\t        V3_iter = (npy_float64*)(PyArray_DATA(V3));\r\n00470\tV5_iter = (npy_float64*)(PyArray_DATA(V5));\r\n00471\tV1_iter = (npy_float64*)(PyArray_DATA(V1));\r\n00472\r\n00473\t        for (int ITER_0 = 0; ITER_0<V1_n0; ITER_0++) {\r\n00474\t            npy_float64 &V3_i = * ( V3_iter + ITER_0 * V3_jumpx_0 );\r\n00475\tnpy_float64 &V5_i = * ( V5_iter + ITER_0 * V5_jump0_0 );\r\n00476\tnpy_float64 &V1_i = * ( V1_iter + ITER_0 * V1_jump0_0 );\r\n00477\r\n00478\r\n00479\t        {\r\n00480\r\n00481\t            {\r\n00482\tnpy_float64 V7_tmp1;\r\n00483\tV7_tmp1 = V5_i * V5_i;\r\n00484\tnpy_float64 V7_tmp2;\r\n00485\tV7_tmp2 = -V7_tmp1;\r\n00486\tV1_i = V3_i + V7_tmp2;\r\n00487\t}\r\n00488\r\n00489\r\n00490\t        }\r\n00491\r\n00492\t        }\r\n00493\t        }\r\n00494\t            }\r\n00495\t            __label_7:\r\n00496\r\n00497\tdouble __DUMMY_7;\r\n00498\r\n00499\t}\r\n00500\t__label_6:\r\n00501\r\n00502\t        if (V5) {\r\n00503\t            Py_XDECREF(V5);\r\n00504\t        }\r\n00505\r\n00506\t    {Py_XDECREF(py_V5);}\r\n00507\r\n00508\tdouble __DUMMY_6;\r\n00509\r\n00510\t}\r\n00511\t__label_4:\r\n00512\r\n00513\t        if (V3) {\r\n00514\t            Py_XDECREF(V3);\r\n00515\t        }\r\n00516\r\n00517\t    {Py_XDECREF(py_V3);}\r\n00518\r\n00519\tdouble __DUMMY_4;\r\n00520\r\n00521\t}\r\n00522\t__label_2:\r\n00523\r\n00524\t    if (!__failure) {\r\n00525\r\n00526\t        {Py_XDECREF(py_V1);}\r\n00527\t        if (!V1) {\r\n00528\t            Py_INCREF(Py_None);\r\n00529\t            py_V1 = Py_None;\r\n00530\t        }\r\n00531\t        else if ((void*)py_V1 != (void*)V1) {\r\n00532\t            py_V1 = (PyObject*)V1;\r\n00533\t        }\r\n00534\r\n00535\t        {Py_XINCREF(py_V1);}\r\n00536\r\n00537\t        if (V1 && !PyArray_ISALIGNED((PyArrayObject*) py_V1)) {\r\n00538\t            PyErr_Format(PyExc_NotImplementedError,\r\n00539\t                         \"c_sync: expected an aligned array, got non-aligned array of type %ld\"\r\n00540\t                         \" with %ld dimensions, with 3 last dims \"\r\n00541\t                         \"%ld, %ld, %ld\"\r\n00542\t                         \" and 3 last strides %ld %ld, %ld.\",\r\n00543\t                         (long int) PyArray_TYPE((PyArrayObject*) py_V1),\r\n00544\t                         (long int) PyArray_NDIM(V1),\r\n00545\t                         (long int) PyArray_NDIM(V1) >= 3 ?\r\n00546\t        PyArray_DIMS(V1)[PyArray_NDIM(V1)-3] : -1,\r\n00547\t                         (long int) PyArray_NDIM(V1) >= 2 ?\r\n00548\t        PyArray_DIMS(V1)[PyArray_NDIM(V1)-2] : -1,\r\n00549\t                         (long int) PyArray_NDIM(V1) >= 1 ?\r\n00550\t        PyArray_DIMS(V1)[PyArray_NDIM(V1)-1] : -1,\r\n00551\t                         (long int) PyArray_NDIM(V1) >= 3 ?\r\n00552\t        PyArray_STRIDES(V1)[PyArray_NDIM(V1)-3] : -1,\r\n00553\t                         (long int) PyArray_NDIM(V1) >= 2 ?\r\n00554\t        PyArray_STRIDES(V1)[PyArray_NDIM(V1)-2] : -1,\r\n00555\t                         (long int) PyArray_NDIM(V1) >= 1 ?\r\n00556\t        PyArray_STRIDES(V1)[PyArray_NDIM(V1)-1] : -1\r\n00557\t        );\r\n00558\t            {\r\n00559\t        __failure = 2;\r\n00560\t        if (!PyErr_Occurred()) {\r\n00561\t            PyErr_SetString(PyExc_RuntimeError,\r\n00562\t                \"Unexpected error in an Op's C code. \"\r\n00563\t                \"No Python exception was set.\");\r\n00564\t            }\r\n00565\t        goto __label_2;}\r\n00566\t        }\r\n00567\r\n00568\t      PyObject* old = PyList_GET_ITEM(storage_V1, 0);\r\n00569\t      {Py_XINCREF(py_V1);}\r\n00570\t      PyList_SET_ITEM(storage_V1, 0, py_V1);\r\n00571\t      {Py_XDECREF(old);}\r\n00572\t    }\r\n00573\r\n00574\t        if (V1) {\r\n00575\t            Py_XDECREF(V1);\r\n00576\t        }\r\n00577\r\n00578\t    {Py_XDECREF(py_V1);}\r\n00579\r\n00580\tdouble __DUMMY_2;\r\n00581\r\n00582\t}\r\n00583\r\n00584\r\n00585\t        if (__failure) {\r\n00586\t            // When there is a failure, this code puts the exception\r\n00587\t            // in __ERROR.\r\n00588\t            PyObject* err_type = NULL;\r\n00589\t            PyObject* err_msg = NULL;\r\n00590\t            PyObject* err_traceback = NULL;\r\n00591\t            PyErr_Fetch(&err_type, &err_msg, &err_traceback);\r\n00592\t            if (!err_type) {err_type = Py_None;Py_INCREF(Py_None);}\r\n00593\t            if (!err_msg) {err_msg = Py_None; Py_INCREF(Py_None);}\r\n00594\t            if (!err_traceback) {err_traceback = Py_None; Py_INCREF(Py_None);}\r\n00595\t            PyObject* old_err_type = PyList_GET_ITEM(__ERROR, 0);\r\n00596\t            PyObject* old_err_msg = PyList_GET_ITEM(__ERROR, 1);\r\n00597\t            PyObject* old_err_traceback = PyList_GET_ITEM(__ERROR, 2);\r\n00598\t            PyList_SET_ITEM(__ERROR, 0, err_type);\r\n00599\t            PyList_SET_ITEM(__ERROR, 1, err_msg);\r\n00600\t            PyList_SET_ITEM(__ERROR, 2, err_traceback);\r\n00601\t            {Py_XDECREF(old_err_type);}\r\n00602\t            {Py_XDECREF(old_err_msg);}\r\n00603\t            {Py_XDECREF(old_err_traceback);}\r\n00604\t        }\r\n00605\t        // The failure code is returned to index what code block failed.\r\n00606\t        return __failure;\r\n00607\r\n00608\t        }\r\n00609\t    };\r\n00610\t    }\r\n00611\r\n00612\r\n00613\t        static int __struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163_executor(__struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163* self) {\r\n00614\t            return self->run();\r\n00615\t        }\r\n00616\r\n00617\t        static void __struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163_destructor(void* executor, void* self) {\r\n00618\t            delete ((__struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163*)self);\r\n00619\t        }\r\n00620\r\n00621\t//////////////////////\r\n00622\t////  Functions\r\n00623\t//////////////////////\r\n00624\tstatic PyObject * instantiate(PyObject * self, PyObject *argtuple) {\r\n00625\t  assert(PyTuple_Check(argtuple));\r\n00626\t  if (4 != PyTuple_Size(argtuple)){\r\n00627\t     PyErr_Format(PyExc_TypeError, \"Wrong number of arguments, expected 4, got %i\", (int)PyTuple_Size(argtuple));\r\n00628\t     return NULL;\r\n00629\t  }\r\n00630\t  __struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163* struct_ptr = new __struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163();\r\n00631\t  if (struct_ptr->init( PyTuple_GET_ITEM(argtuple, 0),PyTuple_GET_ITEM(argtuple, 1),PyTuple_GET_ITEM(argtuple, 2),PyTuple_GET_ITEM(argtuple, 3) ) != 0) {\r\n00632\t    delete struct_ptr;\r\n00633\t    return NULL;\r\n00634\t  }\r\n00635\t  PyObject* thunk = PyCObject_FromVoidPtrAndDesc((void*)(&__struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163_executor), struct_ptr, __struct_compiled_op_d56db4aca7d1d5b51427fe9c71787163_destructor);\r\n00636\t  return thunk; }\r\n00637\r\n00638\t//////////////////////\r\n00639\t////  Module init\r\n00640\t//////////////////////\r\n00641\tstatic PyMethodDef MyMethods[] = {\r\n00642\t\t{\"instantiate\", instantiate, METH_VARARGS, \"undocumented\"} ,\r\n00643\t\t{NULL, NULL, 0, NULL}\r\n00644\t};\r\n00645\tPyMODINIT_FUNC initd56db4aca7d1d5b51427fe9c71787163(void){\r\n00646\t   import_array();\r\n00647\t   (void) Py_InitModule(\"d56db4aca7d1d5b51427fe9c71787163\", MyMethods);\r\n00648\t}\r\n00649\r\n===============================\r\nProblem occurred during compilation with the command line below:\r\n/usr/bin/g++ -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -march=corei7-avx -mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-tbm -mavx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=25600 -mtune=generic -D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy-1.12.0.dev0+1436ec3-py2.7-linux-x86_64.egg/numpy/core/include -I/usr/include/python2.7 -o /home/pgupta/.theano/compiledir_Linux-3.2--virtual-x86_64-with-Ubuntu-12.04-precise-x86_64-2.7.3-64/tmps6ZX_o/d56db4aca7d1d5b51427fe9c71787163.so /home/pgupta/.theano/compiledir_Linux-3.2--virtual-x86_64-with-Ubuntu-12.04-precise-x86_64-2.7.3-64/tmps6ZX_o/mod.cpp -L/usr/lib -lpython2.7\r\n/tmp/ccmvN69j.s: Assembler messages:\r\n/tmp/ccmvN69j.s:1565: Error: no such instruction: `vfnmadd312sd (%rsi),%xmm0,%xmm0'\r\n/tmp/ccmvN69j.s:1742: Error: no such instruction: `vfnmadd312sd (%rcx),%xmm0,%xmm0'\r\n\r\nTraceback (most recent call last):\r\n  File \"normal.py\", line 16, in <module>\r\n    start = find_MAP()\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymc3/tuning/starting.py\", line 69, in find_MAP\r\n    logp = bij.mapf(model.fastlogp)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymc3/model.py\", line 145, in fastlogp\r\n    return self.model.fastfn(self.logpt)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymc3/model.py\", line 311, in fastfn\r\n    f = self.makefn(outs, mode, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymc3/memoize.py\", line 14, in memoizer\r\n    cache[key] = obj(*args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymc3/model.py\", line 283, in makefn\r\n    mode=mode, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/compile/function.py\", line 266, in function\r\n    profile=profile)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/compile/pfunc.py\", line 511, in pfunc\r\n    on_unused_input=on_unused_input)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py\", line 1466, in orig_function\r\n    defaults)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py\", line 1324, in create\r\n    input_storage=input_storage_lists)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/link.py\", line 519, in make_thunk\r\n    output_storage=output_storage)[:3]\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/vm.py\", line 897, in make_all\r\n    no_recycling))\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/op.py\", line 1002, in make_thunk\r\n    compute_map, no_recycling)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/op.py\", line 739, in make_thunk\r\n    output_storage=node_output_storage)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py\", line 1073, in make_thunk\r\n    keep_lock=keep_lock)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py\", line 1015, in __compile__\r\n    keep_lock=keep_lock)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py\", line 1442, in cthunk_factory\r\n    key=key, lnk=self, keep_lock=keep_lock)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/cmodule.py\", line 1076, in module_from_key\r\n    module = lnk.compile_cmodule(location)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py\", line 1354, in compile_cmodule\r\n    preargs=preargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/theano/gof/cmodule.py\", line 2010, in compile_str\r\n    (status, compile_stderr.replace('\\n', '. ')))\r\nException: ('The following error happened while compiling the node', Elemwise{Composite{(i0 + (-sqr(i1)))}}(TensorConstant{(1,) of -1..3787706641}, x), '\\n', \"Compilation failed (return status=1): /tmp/ccmvN69j.s: Assembler messages:. /tmp/ccmvN69j.s:1565: Error: no such instruction: `vfnmadd312sd (%rsi),%xmm0,%xmm0'. /tmp/ccmvN69j.s:1742: Error: no such instruction: `vfnmadd312sd (%rcx),%xmm0,%xmm0'. \", '[Elemwise{Composite{(i0 + (-sqr(i1)))}}(TensorConstant{(1,) of -1..3787706641}, x)]')\r\n```"},"comment":{"url":"https://api.github.com/repos/Theano/Theano/issues/comments/181912075","html_url":"https://github.com/Theano/Theano/issues/4001#issuecomment-181912075","issue_url":"https://api.github.com/repos/Theano/Theano/issues/4001","id":181912075,"user":{"login":"prateekpg2455","id":6943817,"avatar_url":"https://avatars.githubusercontent.com/u/6943817?v=3","gravatar_id":"","url":"https://api.github.com/users/prateekpg2455","html_url":"https://github.com/prateekpg2455","followers_url":"https://api.github.com/users/prateekpg2455/followers","following_url":"https://api.github.com/users/prateekpg2455/following{/other_user}","gists_url":"https://api.github.com/users/prateekpg2455/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekpg2455/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekpg2455/subscriptions","organizations_url":"https://api.github.com/users/prateekpg2455/orgs","repos_url":"https://api.github.com/users/prateekpg2455/repos","events_url":"https://api.github.com/users/prateekpg2455/events{/privacy}","received_events_url":"https://api.github.com/users/prateekpg2455/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T15:21:45Z","updated_at":"2016-02-09T15:21:45Z","body":"By the way it is very unstable. I ran it again with same flags and gave me the above error. Bad thing is that error instructions are not helping. "}}