<div class="gmail_quote">On Thu, May 19, 2011 at 12:00, Bartłomiej W <span dir="ltr">&lt;<a href="mailto:bartlomiej.wach@yahoo.pl">bartlomiej.wach@yahoo.pl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
This might be the problem, it occurs it is 32 bit, tried to compile with -m64 though  but got <br><br style="font-style:italic"><span style="font-style:italic">/usr/bin/ld: skipping incompatible .../petsc-3.1-p8/linux-gnu-c-debug/lib/libpetsc.a when searching for -lpetsc</span><div class="im">
</div></blockquote></div><br><div>You need to reconfigure PETSc using 64-bit compilers, then rebuild the library.</div><div><br></div><div>For a diagonal matrix, you can call MatSeqAIJSetPreallocation(Dinv,1,PETSC_NULL) immediately after MatSetFromOptions() and it will use much less memory.</div>