Open allaffa opened 1 year ago
My guess is that reading a single file by many processes stresses your io subsystem. I prefer to convert the matrix and the rhs to a binary format, which significantly decreases the read times.
You can convert the system with
./build/examples/mm2bin -i A.mtx -o A.bin
./build/examples/mm2bin -i b.mtx -o b.bin
And the example of reading the matrix in this format may be found here: https://amgcl.readthedocs.io/en/latest/tutorial/poisson3DbMPI.html
Hello,
I am trying to read a matrix from a file with Matrix Market (MM) format within a distributed computing framework using MPI. I familiarized with the methodology explained in the following example: https://github.com/ddemidov/amgcl/blob/master/examples/mpi/mpi_solver.cpp
Following the example above, I implemented the following function that is supposed to read the matrix in parallel using MPI, distributing the matrix row-wise in chunks across the MPI processes:
and later on in the main script I call the function as follows:
However, I notice that the time spent to read the matrix from the MM increases with the number of processes instantiated, rather than decreasing. Am I doing something wrong? If you are interested, I can also share the entire
main.cpp
file with you.Thank you very much in advance for your attention to this issue.