<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks Matt, it's clear now<br>
<br>
On 6/19/12 6:49 PM, Matthew Knepley wrote:
<blockquote
cite="mid:CAMYG4GkHJvX5NQtJ=3Ps5ZHiMwFN+MfWvaO8wpg2s-sfkjRhHw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
On Tue, Jun 19, 2012 at 10:06 AM, Anton Popov <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:popov@uni-mainz.de"
target="_blank">popov@uni-mainz.de</a>></span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi petsc team!<br>
I've recently upgraded to 3.3, and currently experience
problems. One of them follows.<br>
If I compile this simple code:<br>
</blockquote>
<div><br>
</div>
<div>In 3.3, we now require that MatSetUp() is called before
messing with the storage scheme.</div>
<div>We should have been more specific in Changes. Moreover,
this should be a better error</div>
<div>message. Will fix, and see below.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
#include "petsc.h"<br>
#undef __FUNCT__<br>
#define __FUNCT__ "main"<br>
int main( int argc,char **argv )<br>
{<br>
Mat A;<br>
PetscErrorCode ierr;<br>
PetscInt n_rows_Local=100;<br>
PetscInt n_cols_Local=100;<br>
ierr = PetscInitialize(&argc, &argv, PETSC_NULL,
PETSC_NULL); CHKERRQ(ierr);<br>
ierr = MatCreate(PETSC_COMM_WORLD, &A); CHKERRQ(ierr);<br>
ierr = MatSetSizes(A, n_rows_Local, n_cols_Local,
PETSC_DETERMINE, PETSC_DETERMINE); CHKERRQ(ierr);<br>
ierr = MatSetType(A, MATAIJ); CHKERRQ(ierr);<br>
</blockquote>
<div><br>
</div>
<div>ierr = MatSetUp(A);CHKERRQ(ierr);</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"> ierr =
MatSetOption(A, MAT_KEEP_NONZERO_PATTERN, PETSC_TRUE);
CHKERRQ(ierr);<br>
ierr = PetscFinalize(); CHKERRQ(ierr);<br>
PetscFunctionReturn(0);<br>
}<br>
<br>
and run it in parallel (mpiexec -np 2 ./example) it gives me
errors like this:<br>
<br>
[0]PETSC ERROR: --------------------- Error Message
------------------------------------<br>
[0]PETSC ERROR: Null argument, when expecting valid pointer!<br>
[0]PETSC ERROR: Null Object: Parameter # 1!<br>
[0]PETSC ERROR: ------------------------------------------------------------------------<br>
<br>
Commenting the line with "MatSetOption" removes the error, but
doesn't solve the problem, because I actually need to
KEEP_NONZERO_PATTERN<br>
<br>
Running the code sequentially, also vanishes the error.<br>
<br>
Please check whether it's a bug in petsc-3.3, or I should set
this option in a different way.<br>
<br>
Thanks,<br>
<br>
Anton Popov<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to
which their experiments lead.<br>
-- Norbert Wiener<br>
</blockquote>
<br>
</body>
</html>