{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/math/issues/122","labels_url":"https://api.github.com/repos/stan-dev/math/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/math/issues/122/comments","events_url":"https://api.github.com/repos/stan-dev/math/issues/122/events","html_url":"https://github.com/stan-dev/math/issues/122","id":95461305,"number":122,"title":"stan-math tests break with Intel MKL","user":{"login":"wds15","id":12070126,"avatar_url":"https://avatars.githubusercontent.com/u/12070126?v=3","gravatar_id":"","url":"https://api.github.com/users/wds15","html_url":"https://github.com/wds15","followers_url":"https://api.github.com/users/wds15/followers","following_url":"https://api.github.com/users/wds15/following{/other_user}","gists_url":"https://api.github.com/users/wds15/gists{/gist_id}","starred_url":"https://api.github.com/users/wds15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wds15/subscriptions","organizations_url":"https://api.github.com/users/wds15/orgs","repos_url":"https://api.github.com/users/wds15/repos","events_url":"https://api.github.com/users/wds15/events{/privacy}","received_events_url":"https://api.github.com/users/wds15/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-16T15:35:07Z","updated_at":"2015-07-16T18:37:48Z","closed_at":null,"body":"The test mdivide_left_grad_vv and mdivide_left_grad_vd do fail for small deviations from the expected precision (1.5e-12 > 1.0e-12) when I run the Stan-Math tests with -DEIGEN_USE_MKL_ALL (which is equal to EIGEN_USE_BLAS, EIGEN_USE_LAPACKE, and EIGEN_USE_MKL_VML). If possible, can the thresholds be relaxed to 1.0E-10 (given that this very high precision is not needed)?\r\n\r\nFor more information on Eigen+MKL, see\r\n\r\nhttp://beamteam.usask.ca/mark/acquaman/dd/d88/_topic_using_intel_m_k_l.html\r\n\r\nEven using the more \"strict\" EIGEN_USE_BLAS, EIGEN_USE_LAPACKE_STRICT and EIGEN_USE_MKL_VML triggers this test to fail. I can only get successfull Stan-Math tests iff I use\r\n\r\nEIGEN_USE_BLAS and EIGEN_USE_MKL_VML\r\n\r\nwhich is not optimal I guess, as the LAPACK routines from MKL would not be used.  This stuff may be included in the cmdstan documentation on MKL for other users.\r\n\r\nBest,\r\nSebastian\r\n\r\n[ RUN      ] AgradRevMatrix.mdivide_left_grad_vv\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:86: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.5916157281026244e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to -273.0000000000008,\r\ng[k] evaluates to -273.00000000000239, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:86: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.3073986337985843e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to 210.00000000000054,\r\ng[k] evaluates to 210.00000000000185, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:86: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.3073986337985843e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to -280.0000000000008,\r\ng[k] evaluates to -280.0000000000021, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:86: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.1084466677857563e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to 217.00000000000054,\r\ng[k] evaluates to 217.00000000000165, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:86: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.0516032489249483e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to 195.00000000000054,\r\ng[k] evaluates to 195.00000000000159, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\n\r\n\r\n[ RUN      ] AgradRevMatrix.mdivide_left_grad_vd\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:178: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.5916157281026244e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to -273.0000000000008,\r\ng[k] evaluates to -273.00000000000239, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:178: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.3073986337985843e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to 210.00000000000054,\r\ng[k] evaluates to 210.00000000000185, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:178: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.3073986337985843e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to -280.0000000000008,\r\ng[k] evaluates to -280.0000000000021, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:178: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.1084466677857563e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to 217.00000000000054,\r\ng[k] evaluates to 217.00000000000165, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\ntest/unit/math/rev/mat/fun/mdivide_left_test.cpp:178: Failure\r\nThe difference between Cd(i,j) and g[k] is 1.0800249583553523e-12, which exceeds 1.0E-12, where\r\nCd(i,j) evaluates to 195.00000000000054,\r\ng[k] evaluates to 195.00000000000162, and\r\n1.0E-12 evaluates to 9.9999999999999998e-13.\r\n[  FAILED  ] AgradRevMatrix.mdivide_left_grad_vd (1 ms)"},"comment":{"url":"https://api.github.com/repos/stan-dev/math/issues/comments/122045089","html_url":"https://github.com/stan-dev/math/issues/122#issuecomment-122045089","issue_url":"https://api.github.com/repos/stan-dev/math/issues/122","id":122045089,"user":{"login":"bob-carpenter","id":3383807,"avatar_url":"https://avatars.githubusercontent.com/u/3383807?v=3","gravatar_id":"","url":"https://api.github.com/users/bob-carpenter","html_url":"https://github.com/bob-carpenter","followers_url":"https://api.github.com/users/bob-carpenter/followers","following_url":"https://api.github.com/users/bob-carpenter/following{/other_user}","gists_url":"https://api.github.com/users/bob-carpenter/gists{/gist_id}","starred_url":"https://api.github.com/users/bob-carpenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bob-carpenter/subscriptions","organizations_url":"https://api.github.com/users/bob-carpenter/orgs","repos_url":"https://api.github.com/users/bob-carpenter/repos","events_url":"https://api.github.com/users/bob-carpenter/events{/privacy}","received_events_url":"https://api.github.com/users/bob-carpenter/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T18:37:48Z","updated_at":"2015-07-16T18:37:48Z","body":"I don't see any problem with lowering precision in the tests for Intel compatibility.   We can let Intel users make their own decision to sacrifice a couple decimal places of accuracy for speed."}}