<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div style="font-family: Helvetica, Arial, sans-serif; font-size: 13px;"><div id="ydpf850ea89yiv6462680913">
<div>
<p>Dear All,</p>
<p>My problem definition is as follows,</p>
<p>I have an MPI matrix with a random sparsity pattern i.e. I do
not know how many nonzeros there are on any row unless I call
MatGetRow to learn it. There are possibly unequal numbers of
nonzeros on every row. I want to write all the nonzero values of
this matrix onto a parallel vector. An example can be as follows.
<br>
</p>
<p>Imagine I have a 4x4 matrix (; denotes next row, . denotes sparse
"zeros") [3 . 2 . ; . 1 . . ; 4 5 3 2; . . . .]. I want to
obtain the vector [3 2 1 4 5 3 2]. I could not find any function
that does this. Any idea is appreciated.</p>
<p>My thought was to get the number of nonzeros on each process by
MatGetInfo, then broadcast this to all processes so all processes
know the nonzero number of each other. However, I could not find
the MPI command to do this either (this may because I did not know
how to look). Any help with this is also appreciated.</p>
<p>Best Regards,</p>
<div>Ali Berk Kahraman</div><div>M.Sc. Student, Mechanical Engineering</div><div>Boğaziçi University, Istanbul, Turkey<br>
</div></div>
</div></div></div></body></html>