amgcl icon indicating copy to clipboard operation
amgcl copied to clipboard

std::cerr << "Usage: " << argv[0] << " <matrix.bin> <rhs.bin>" << std::endl;

Open ztdepztdep opened this issue 2 years ago • 1 comments

how to obtain the <matrix.bin> <rhs.bin> , what is its format?

ztdepztdep avatar Apr 03 '22 10:04 ztdepztdep

There is examples/mm2bin.cpp that converts matrices from the MatrixMarket format into binary format:

$ mm2bin -i A.mtx -o A.bin
Wrote 32768 by 32768 sparse matrix, 223232 nonzeros

$ mm2bin -i b.mtx -o b.bin
Wrote 32768 by 1 dense matrix

The format should be obvious from the mm2bin code. Sparse matrix in CRS format:

https://github.com/ddemidov/amgcl/blob/5fc2ed80c0803279169f98a3f85a0bafc39beabf/examples/mm2bin.cpp#L28-L31

and dense matrix (the RHS vector):

https://github.com/ddemidov/amgcl/blob/5fc2ed80c0803279169f98a3f85a0bafc39beabf/examples/mm2bin.cpp#L42-L44

ddemidov avatar Apr 03 '22 10:04 ddemidov