amgcl
amgcl copied to clipboard
std::cerr << "Usage: " << argv[0] << " <matrix.bin> <rhs.bin>" << std::endl;
how to obtain the <matrix.bin> <rhs.bin> , what is its format?
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