{"action":"created","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/3693","labels_url":"https://api.github.com/repos/Theano/Theano/issues/3693/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/3693/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/3693/events","html_url":"https://github.com/Theano/Theano/issues/3693","id":118978607,"number":3693,"title":"segfault with dot, C linker","user":{"login":"gophercg","id":14814073,"avatar_url":"https://avatars.githubusercontent.com/u/14814073?v=3","gravatar_id":"","url":"https://api.github.com/users/gophercg","html_url":"https://github.com/gophercg","followers_url":"https://api.github.com/users/gophercg/followers","following_url":"https://api.github.com/users/gophercg/following{/other_user}","gists_url":"https://api.github.com/users/gophercg/gists{/gist_id}","starred_url":"https://api.github.com/users/gophercg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gophercg/subscriptions","organizations_url":"https://api.github.com/users/gophercg/orgs","repos_url":"https://api.github.com/users/gophercg/repos","events_url":"https://api.github.com/users/gophercg/events{/privacy}","received_events_url":"https://api.github.com/users/gophercg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-26T06:16:43Z","updated_at":"2015-12-04T13:55:07Z","closed_at":"2015-12-01T02:02:03Z","body":"Particular combo makes test fail. Comments explain variations I tried.\r\n\r\n```\r\nimport theano\r\nimport theano.tensor as T\r\nfrom theano.ifelse import ifelse\r\nimport theano.tensor.nlinalg as nlinalg\r\nfrom theano import function, config, shared, sandbox, Out, In, pp\r\nfloatX = config.floatX\r\n\r\nimport numpy as np\r\nfrom numpy import *\r\nimport sys\r\n\r\nconfig.mode = 'Mode'\r\nconfig.optimizer = 'fast_run'\r\nconfig.linker = 'c'\r\n  #'cvm_nogc' #works on all variants\r\n\r\ninput0 = T.matrix()\r\ninput1 = T.vector()\r\nA = input0\r\n\r\n#out1 = A - input1[0]*identity(3)  #c linker fails\r\n#out1 = A.dot(4.0 * identity(3))  #c linker works\r\nout1 = input1[0] * identity(3) #c linker fails\r\nout1 = A.dot(A) #c linker works\r\n\r\nbenchmark = function(\r\ninputs=[input0, input1],\r\noutputs=[out1],\r\non_unused_input='ignore')\r\n\r\nnormal_svd = array([[  5.93627687e+01  ,-4.66400725e-07  ,-2.56265154e-06],\r\n [ -4.66400725e-07   ,9.46869131e-01  ,-3.18862544e-02],\r\n [ -2.56265154e-06  ,-3.18862544e-02   ,1.05226779e+00]], dtype=floatX)\r\n\r\norientationi = array([ 59.36276866   ,1.06116353   ,0.93797339], dtype=floatX)\r\n\r\nout1 = benchmark(normal_svd, orientationi)\r\n```\r\n\r\nWorks on c:\r\n```\r\nout1 = 59.36*identity(3)\r\nout1 = out1.dot(out1)\r\n```\r\nFails on c:\r\n```\r\nout1 = input1[0]*identity(3)\r\nout1 = out1.dot(out1)\r\n```\r\n\r\nErrors the same \"Segmentation fault\" and no line number etc. It seems like input1 & dot() combo fails, otherwise it runs.\r\n\r\nQ2: Whenever 'c' does compile, I confirmed the cache files show 1 folder generated vs ~9 folders for 'cvm_nogc'. But the 'c' runtime is consistently slightly slower than 'cvm_nogc'. Does it have extra overheads to merge all the code into 1 file? I assumed 'c' avoids ping-ponging to numpy/py to save some overhead."},"comment":{"url":"https://api.github.com/repos/Theano/Theano/issues/comments/161973275","html_url":"https://github.com/Theano/Theano/issues/3693#issuecomment-161973275","issue_url":"https://api.github.com/repos/Theano/Theano/issues/3693","id":161973275,"user":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T13:55:07Z","updated_at":"2015-12-04T13:55:07Z","body":"I think this is a problem with mixed THeano version. Can you be sure to\nupdate Theano and delete your cache?\n\nOn Fri, Dec 4, 2015 at 2:59 AM, gophercg <notifications@github.com> wrote:\n\n> Thanks for the fast fix!\n> Replacing cc.py: I'm getting \"Apply object has no attribute 'run_params'\"\n> errors. Seems my Theano's older, so I'll update at a later time. Thanks.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/Theano/Theano/issues/3693#issuecomment-161903460>.\n>\n"}}