Questions tagged [cusp-library]

A library for sparse linear algebra and graph computations on CUDA.

The Cusp library is a library for sparse linear algebra and graph computations on . Cusp provides a flexible, high-level interface for manipulating sparse matrices and solving sparse linear systems.

38 questions
5
votes
0 answers

Sparse matrix operations on CUDA

I work on converting a large Matlab code to C++ and CUDA. I have problems converting some sparse matrix operations like: 1. full_Matrix * sparse_Matrix 2. sparse_Matrix * full_Matrix 3. sparse_Matrix * sparse_Matrix (SOLVED WITH CUSP) 4.…
mmisu
  • 383
  • 2
  • 8
2
votes
1 answer

Solve linear equation of AX=B

I currently solve Ax=b equation two times. where A is sparse matrix NxN x, b are vectors of size N. (I have b1 and b2) I want to reduce times by solving both of them in one shot using cusparse functions. so what I though is to build from the 2 b's I…
2
votes
1 answer

How to properly construct CUSP coo matrix from passed arrays

I am trying to integrate CUSP into an existing Fortran code. Right now I am just trying to get the basic set up for thrust / CUSP to feed in arrays from Fortran and use them to construct a CUSP matrix (coo format right now). I have been able to get…
wmsmith
  • 502
  • 4
  • 15
2
votes
1 answer

Impossible to create thrust::host_vector of cusp::coo_matrix within device_memory?

I am trying to make a vector of cusp::coo_matrix and it seems one cannot use thrust::host_vector in this manner. Consider this code: int main(void) { typedef typename cusp::coo_matrix maintype; maintype B; …
gsarret
  • 120
  • 6
2
votes
1 answer

cusp sparse matrix to be used in struct in C

I am using the cusp library with CUDA to use sparse matrix. Can't I use it in a struct in C like: #include #include #include #include struct Cat{ int id; …
parallel
  • 193
  • 1
  • 1
  • 9
1
vote
1 answer

Converting from COO to Compressed sparse matrix

I wanted CSR files preferably from matrix market for my OpenCL library, I searched a lot for CSR generators in C but didn't get any. I find matrix market formats comfortable since they have defined the functions for read and write. I'm also curious…
Jayavanth
  • 40
  • 4
1
vote
1 answer

Generating CUSP coo_matrix from passed FORTRAN arrays

I am working on integrating CUSP solvers into an existing FORTRAN code. As a first step, I am simply trying to pass in a pair of integer arrays and a float (real*4 in FORTRAN) from FORTRAN which will be used to construct and then print a COO format…
wmsmith
  • 502
  • 4
  • 15
1
vote
0 answers

CUSP library called from Fortran not working

I want to repetitively solve the CG/BicGSTAB using CUSP solver, called from Fortran. To avoid transfers I am passing the Fortran data directly to CUSP. The code compiles but breaks at the run time flagging: terminate called after throwing an…
1
vote
0 answers

CUSP GMRES error with complex number

I am trying to use CUSP to solve a complex matrix using the GMRES method. When compiling, I get a error that says: "no suitable conversion function from "cusp::complex" to "float" exists" and if I go see where the error comes from it gives me…
user3812584
  • 73
  • 1
  • 5
1
vote
1 answer

CUSP function to generate a matrix with random values

I was wondering if CUSP library provides a function that creates a matrix with a specific number of columns, rows, and any random values? I found poisson5pt function but it doesn't return back a matrix with the dimensions I specify! Thanks in…
The Hiary
  • 109
  • 1
  • 13
1
vote
2 answers

cusp::io::write_matrix_market_file() gives Access Violation Exception

I am trying to read a 272 x 544 double matrix from Matlab into an ELLPACK format sparse matrix using CUSP. The only way I can find so far is to read the data into mxArray, read the mxArray into a double* array (using mxGetPr()), then copy the values…
1
vote
1 answer

Sparse Cholesky factorizations in CUDA

As the CUDA programming model matures, I wonder if anyone is aware of any available research code or open-source libraries that implement sparse Cholesky factorizations on NVIDIA GPUs. On May 2012, I 've been pointed to the following literature by…
Nikolaos Giotis
  • 271
  • 2
  • 22
1
vote
1 answer

Convert a matrix A in a sparse formats CSR, COO, etc

I have a little problem, I would like to convert a matrix 10*10 in a CSR or COO sparse matrix/format. The matrix is: 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -0.45 0.10 -0.45 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -0.45 …
Ivan
  • 109
  • 1
  • 8
1
vote
1 answer

Reading mxArray in CUSP or in cuSPARSE

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…
Recker
  • 1,815
  • 23
  • 47
0
votes
1 answer

CUDA Cusp in Windows7

I have trouble getting the CUSP (version 0.2) library running under windows7 x64 and visual studio 2008. When including for example: #include i get the following error: error C2039: 'hypotf' : is not a member of '`global…
scigor
  • 1,505
  • 5
  • 22
  • 37
1
2 3