Unable to build magma with commit 7d81943 (free cuSPARSE matrix descriptors)

Issue #37 resolved
Daniel Bonner created an issue

My system:
ubuntu 20.10, cuda 11.2.1 (11.2 update 1), cudnn 8.1

The logs for my make and sudo make install scripts are attached (i.e. logs for failed build).

When I delete the lines added in commit 7d81943:


(free cuSPARSE matrix descriptors), I can build magma fine (from the latest source code).

i.e. Deleted these lines from sparse/blas/magma_z_blaswrapper.cpp (twice in the commit):

+        cusparseDestroySpMat(descrA);                                                           \
+        cusparseDestroyDnVec(descrX);                                                           \
+        cusparseDestroyDnVec(descrY);       

All the best,


Comments (7)

  1. Daniel Bonner reporter

    I delete these lines in sparse/blas/magma_z_blaswrapper.cpp (i.e. I undo commit 7d81943) so that I can successfully build Magma:

    Delete lines 51-53 and 85-87 (the lines with pluses below):

    48 descrY, CUDA_C_64F, CUSPARSE_CSRMV_ALG1, buf);
    49 if (bufsize > 0)
    50 magma_free(buf);
    51 + cusparseDestroySpMat(descrA);
    52 + cusparseDestroyDnVec(descrX);
    53 + cusparseDestroyDnVec(descrY);
    54 }
    55 #else
    56 #define cusparseZcsrmv(handle, op, rows, cols, nnz, alpha, descr, dval, drow, dcol, x, beta, y)
    82 CUSPARSE_CSRMM_ALG1, buf);
    83 if (bufsize > 0)
    84 magma_free(buf);
    85 + cusparseDestroySpMat(descrA);
    86 + cusparseDestroyDnVec(descrX);
    87 + cusparseDestroyDnVec(descrY);
    88 }
    89 #endif

  2. Stan Tomov

    Thanks for this report.
    Looks like the descrX and descrY had to be DnMat (i.e., cusparseDnMatDescr_t) in cusparseZcsrmminstead of DnVec like in the cusparseZcsrmv routine. This is committed now and hopefully fixes this issue.

  3. Daniel Bonner reporter

    Thanks Stan,

    I have tested the latest source and I built Magma successfully.

    The latest commit fixes the issue.

    All the best,


  4. Log in to comment