<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I was trying to use the function MatLoad to read an mpi dense
(square) matrix from a binary file.<br>
I got an error related to a memory problem (in parallel).<br>
I tried to locate the problem using gdb and I think it is in the
function <i>MatLoad_MPIDense_DenseInFile</i><i>.<br>
</i>The master cannot execute the line <i><br>
</i>
<blockquote><i> ierr = PetscFree(vals);CHKERRQ(ierr);</i><br>
</blockquote>
without an error. The other processors can.<br>
<br>
For me, the error is in the allocation of the <i>vals</i> array:
each processor allocates it with m*N number of elements, where N is
the same for all of the procs and m is the local number of rows,
which in my case is already given in the matrix.<br>
<br>
The master uses the array vals to read its own data, but also the
other processors' data. The problem is that, in my case, one
processor has a higher number of rows than the master and therefore
vals is too short to store those values. For me the master should
allocate it with size m_max*N , where m_max is the maximum number of
local rows between all procs.<br>
<br>
Thanks,<br>
Best,<br>
Matteo<br>
</body>
</html>