{"id":4123,"date":"2014-03-30T07:58:23","date_gmt":"2014-03-30T07:58:23","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/reading-mxarray-in-cusp-or-in-cusparse-collection-of-common-programming-errors\/"},"modified":"2014-03-30T07:58:23","modified_gmt":"2014-03-30T07:58:23","slug":"reading-mxarray-in-cusp-or-in-cusparse-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/reading-mxarray-in-cusp-or-in-cusparse-collection-of-common-programming-errors\/","title":{"rendered":"Reading mxArray in CUSP or in cuSPARSE-Collection of common programming errors"},"content":{"rendered":"<p>I am trying to read mxArray from matlab into my custom made .cu file. I have two sparse matrices to operate on. How do I read them inside cusp sparse matrices say A and B ( or in cuSPARSE matrices), so that I can perform operations and return them back to matlab. One idea that I could come up with is to write mxArrays in .mtx file and then read from it. But again, are there any alternatives?<\/p>\n<p>Further, I am trying understand the various CUSP mechanisms using the examples posted on its website.But every I try to compile and run the examples, I am getting the following error.<\/p>\n<pre><code>terminate called after throwing an instance of\n'thrust::system::detail::bad_alloc'\n  what():  N6thrust6system6detail9bad_allocE: CUDA driver version is\ninsufficient for CUDA runtime version\nAbort\n<\/code><\/pre>\n<p>Here are the stuff that is installed on the machine that I am using.<\/p>\n<pre><code>CUDA   v4.2\nThrust v1.6\nCusp   v0.3\n<\/code><\/pre>\n<p>I am using GTX 480 with Linux x86_64 on my machine. Strangely enough, code for device query is also returning this output.<\/p>\n<pre><code>CUDA Device Query...\nThere are 0 CUDA devices.\n\nPress any key to exit...\n<\/code><\/pre>\n<p>I updated my drivers and SDK few days. Not sure whats wrong.<\/p>\n<p>I know, I am asking a lot in one questions but I am facing this problem from quite a while and upgrading and downgrading the drivers doesn&#8217;t seem to solve.<\/p>\n<p>Cheers<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am trying to read mxArray from matlab into my custom made .cu file. I have two sparse matrices to operate on. How do I read them inside cusp sparse matrices say A and B ( or in cuSPARSE matrices), so that I can perform operations and return them back to matlab. One idea that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4123","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4123"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4123\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}