{"action":"created","issue":{"url":"https://api.github.com/repos/cBio/cbio-cluster/issues/377","repository_url":"https://api.github.com/repos/cBio/cbio-cluster","labels_url":"https://api.github.com/repos/cBio/cbio-cluster/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/cBio/cbio-cluster/issues/377/comments","events_url":"https://api.github.com/repos/cBio/cbio-cluster/issues/377/events","html_url":"https://github.com/cBio/cbio-cluster/issues/377","id":136194562,"number":377,"title":"[theano] Intel MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so","user":{"login":"corcra","id":4471845,"avatar_url":"https://avatars.githubusercontent.com/u/4471845?v=3","gravatar_id":"","url":"https://api.github.com/users/corcra","html_url":"https://github.com/corcra","followers_url":"https://api.github.com/users/corcra/followers","following_url":"https://api.github.com/users/corcra/following{/other_user}","gists_url":"https://api.github.com/users/corcra/gists{/gist_id}","starred_url":"https://api.github.com/users/corcra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corcra/subscriptions","organizations_url":"https://api.github.com/users/corcra/orgs","repos_url":"https://api.github.com/users/corcra/repos","events_url":"https://api.github.com/users/corcra/events{/privacy}","received_events_url":"https://api.github.com/users/corcra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-24T21:41:44Z","updated_at":"2016-02-24T22:19:57Z","closed_at":null,"body":"I am getting the above error when I go to compile (some) theano functions, it looks like theano is failing to link with MKL somehow? Sometimes?\r\n\r\nHere is code to produce the error (for me):\r\n```\r\n#!/usr/bin/env ipython\r\n\r\nimport theano\r\nimport theano.tensor as T\r\n\r\n# define theano symbolic variables\r\nv = T.vector('v')\r\nM = T.matrix('M')\r\nMv = T.dot(M, v)\r\n\r\nprint 'Compiling function to dot product M and v...'\r\nbad_function = theano.function([M, v], Mv)\r\n# (failure!)\r\n```\r\n\r\nIt doesn't fail on all theano functions, I think it's specific to those requiring linear algebra libraries. for example this works: (no dot products)\r\n```\r\ni = T.iscalar('i')\r\nMi = M[i]\r\n\r\nprint 'Compiling function to get row i of M...'\r\ngood_function = theano.function([M, i], Mi)\r\n# (success!)\r\n```\r\n\r\nAmusingly it sems like Lee had this problem some time ago:\r\nhttps://groups.google.com/a/continuum.io/forum/#!topic/anaconda/T0Z41hFkPds\r\nbut the fix there (adding `ldflags = -lmkl_rt` to my `theanorc`) didn't work for me.\r\n\r\nI might be missing something in my `LD_LIBRARY_PATH`? Somewhat out of ideas. Not sure how any of my code is running any more."},"comment":{"url":"https://api.github.com/repos/cBio/cbio-cluster/issues/comments/188480411","html_url":"https://github.com/cBio/cbio-cluster/issues/377#issuecomment-188480411","issue_url":"https://api.github.com/repos/cBio/cbio-cluster/issues/377","id":188480411,"user":{"login":"corcra","id":4471845,"avatar_url":"https://avatars.githubusercontent.com/u/4471845?v=3","gravatar_id":"","url":"https://api.github.com/users/corcra","html_url":"https://github.com/corcra","followers_url":"https://api.github.com/users/corcra/followers","following_url":"https://api.github.com/users/corcra/following{/other_user}","gists_url":"https://api.github.com/users/corcra/gists{/gist_id}","starred_url":"https://api.github.com/users/corcra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corcra/subscriptions","organizations_url":"https://api.github.com/users/corcra/orgs","repos_url":"https://api.github.com/users/corcra/repos","events_url":"https://api.github.com/users/corcra/events{/privacy}","received_events_url":"https://api.github.com/users/corcra/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T22:19:57Z","updated_at":"2016-02-24T22:19:57Z","body":"I don't entirely understand the question, but what I get is this:\r\n```\r\n> ipython minimal_example.py\r\nCompiling function to dot product M and v...\r\n\r\nIntel MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so.\r\n```\r\nNo further information from ipython, and it kills the whole interpreter (if I'm running it from inside ipython)."}}