<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div> Did you get the matrix in the writer code using a DA or some other code that puts the vector from the 2d or 3d problem in the natural ordering on the binary file.<div><br></div><div> Barry</div><div><br><div><div>On Sep 1, 2010, at 9:55 AM, Leo van Kampenhout wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi all, <br><br>I'm having trouble with MatLoad on Petsc-Dev. Not sure if this problem also exists in the main PETSc 3.1 since my code won't compile on that. <br>The problematic calls are as follows: <br><br><span style="font-family: courier new,monospace;"> call PetscViewerBinaryOpen(PETSC_COMM_WORLD,file2,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> & FILE_MODE_READ,fd,ierr)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> call DAGetMatrix(da,MATMPIAIJ,A,ierr)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><span style="font-family: courier new,monospace;">call MatLoad(A,fd,ierr)</span><br><br>which supposedly will load a matrix A which is stored by the following commands:<br>
<br><span style="font-family: courier new,monospace;"> call PetscViewerBinaryOpen(PETSC_COMM_WORLD,file2,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> & FILE_MODE_WRITE,fd,ierr)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> call MatView(A,fd,ierr)</span><br><br>by another program (on a single core). The MatLoad() does work perfectly on a single core, however two or more cores make the program crash with the following error (see below)<br>
The programcall is <br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;"> mpirun -n 2 ./main</span><br></div><br>Is something broken with Petsc or do I need to set some extra parameters? <br>
Thanks in advance, <br><br>Leo van Kampenhout<br><br>PS. I'm using a build from last friday, since when I updated petsc-dev today using Mercurial I couldnt get it to configure or compile :S (which is another subject)<br>
<br><br>[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[0]PETSC ERROR: No support for this operation for this object type!<br>[0]PETSC ERROR: MatLoad is not supported for type: mpiaij!<br>
[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: Petsc Development HG revision: 84fec3ca75412473b06251029b58f2a68f1334f3 HG Date: Fri Aug 27 07:06:08 2010 +0200<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>[0]PETSC ERROR: See docs/index.html for manual pages.<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>
[0]PETSC ERROR: ./main on a arch-linu named wingtip72 by csg4035 Wed Sep 1 15:52:11 2010<br>[0]PETSC ERROR: Libraries linked from /net/users/csg/csg4035/install/petsc-dev/arch-linux-gnu-c-debug/lib<br>[0]PETSC ERROR: Configure run at Fri Aug 27 08:37:32 2010<br>
[0]PETSC ERROR: Configure options <br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: MatLoad() line 843 in src/mat/interface/matrix.c<br><br><br>
</blockquote></div><br></div></body></html>