Matrix export to matrix market file contains only header

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Matrix export to matrix market file contains only header

Postby Klausb » Thu Oct 19, 2017 10:20 am

Hello,

I tried to export the matrices from my application using the MAGMA export function:

Code: Select all
 magma_dwrite_csr_mtx(A, MagmaRowMajor, "sym_matrix_p.mtx", queue);


In any case, a file containing only the header information was created.

File content:

Code: Select all
%%MatrixMarket matrix coordinate real general
40800 40800 203400


What's wrong with my attempt?

Klaus
Klausb
 
Posts: 18
Joined: Thu Oct 05, 2017 3:04 pm

Re: Matrix export to matrix market file contains only header

Postby hartwig anzt » Thu Oct 19, 2017 10:44 am

Klaus,
please always provide the complete code - this makes the analysis much easier.
Thanks, Hartwig
hartwig anzt
 
Posts: 79
Joined: Tue Sep 02, 2014 5:44 pm

Re: Matrix export to matrix market file contains only header

Postby Klausb » Thu Oct 19, 2017 3:18 pm

Here the code section:

Code: Select all
    // Initialize MAGMA and create some LA structures.
    magma_init();
    magma_dopts opts;
    magma_queue_t queue;
    magma_queue_create( 0, &queue );
   
    magma_d_matrix A={Magma_CSR}, dA={Magma_CSR};
    magma_d_matrix b={Magma_CSR}, db={Magma_CSR};
    magma_d_matrix x={Magma_CSR}, dx={Magma_CSR};

    // get vector size
    magma_int_t n = matrix.diag().size();
    magma_int_t one = 1; // magma vector number of columns
   
    // Pass the system to MAGMA.
    // import rhs
    mFoam::import_vector(source, b, queue);

    // convert matrix and fill matrix A based on magma_dcsrset( m, m, row, col, val, &A, queue );
    mFoam::CSR2MAGMA(matrix, A, queue);

    // save the matrix for p or U etc.
    if (matrix.symmetric()) {
        magma_dwrite_csr_mtx(A, MagmaRowMajor, "sym_matrix_p.mtx", queue); // p
    } else {
           magma_dwrite_csr_mtx(A, MagmaRowMajor, "asym_matrix_U.mtx", queue); // U etc.
    }
Klausb
 
Posts: 18
Joined: Thu Oct 05, 2017 3:04 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron