Hi,
Just a quick question. Following
petsc-dev/src/ksp/ksp/examples/tutorials/ex2.c, it seems that I need to
call both MatMPIAIJSetPreallocation and MatSeqAIJSetPreallocation to be
able to preallocate for both MPI and Seq matrices. Does petsc automatically
chose the relevant function when the
On Mon, Apr 30, 2012 at 7:01 PM, Mohammad Mirzadeh mirzadeh at gmail.comwrote:
Hi,
Just a quick question. Following
petsc-dev/src/ksp/ksp/examples/tutorials/ex2.c, it seems that I need to
call both MatMPIAIJSetPreallocation and MatSeqAIJSetPreallocation to be
able to preallocate for both
On Apr 30, 2012, at 6:57 PM, Matthew Knepley wrote:
On Mon, Apr 30, 2012 at 7:01 PM, Mohammad Mirzadeh mirzadeh at gmail.com
wrote:
Hi,
Just a quick question. Following
petsc-dev/src/ksp/ksp/examples/tutorials/ex2.c, it seems that I need to call
both MatMPIAIJSetPreallocation and
Barry, Matt,
Thank you both.
Mohammad
On Mon, Apr 30, 2012 at 6:05 PM, Barry Smith bsmith at mcs.anl.gov wrote:
On Apr 30, 2012, at 6:57 PM, Matthew Knepley wrote:
On Mon, Apr 30, 2012 at 7:01 PM, Mohammad Mirzadeh mirzadeh at gmail.com
wrote:
Hi,
Just a quick question. Following
On Wed, Apr 25, 2012 at 00:53, Mohammad Mirzadeh mirzadeh at gmail.com wrote:
Even more than that, I get lots of errors apparently complaining that I
have not preallocated the matrix:
You are not checking error codes, otherwise you wouldn't see all the
subsequent errors.
I do not see these
Mohammad :
When I do not explicitly set the type in petsc-dev I get errors:
Did you follow same procedural call as petsc examples, e.g.,
petsc-dev/src/ksp/ksp/examples/tutorials/ex2.c:
ierr = MatCreate(PETSC_COMM_WORLD,A);CHKERRQ(ierr);
ierr =
Hong,
Did you follow same procedural call as petsc examples,
e.g., petsc-dev/src/ksp/ksp/examples/tutorials/ex2.c:
ierr = MatCreate(PETSC_COMM_WORLD,A);CHKERRQ(ierr);
ierr = MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,m*n,m*n);CHKERRQ(ierr);
ierr = MatSetFromOptions(A);CHKERRQ(ierr);
ierr =
On Wed, Apr 25, 2012 at 1:55 PM, Mohammad Mirzadeh mirzadeh at gmail.comwrote:
You are not checking error codes, otherwise you wouldn't see all the
subsequent errors.
That's correct. I don't quite remember, but I think at some point I had
trouble with function returns and CHKERRQ( and also
Mohammad:
MatCreate(comm, A);
MatSetSizes(A, localRowSize, localColumnSize, globalRowSize,
globalColumnSize);
MatSetType(A, MATMPIAIJ);
MatMPIAIJSetPreallocation(A, 0, d_nnz, 0, o_nnz);
MatSetFromOptions(A);
MatGetOwnershipRange(A, rStart, rEnd);
This (even without MatSetType(A,
Thanks Hong; that fixed the problem.
On Wed, Apr 25, 2012 at 11:31 AM, Hong Zhang hzhang at mcs.anl.gov wrote:
Mohammad:
MatCreate(comm, A);
MatSetSizes(A, localRowSize, localColumnSize, globalRowSize,
globalColumnSize);
MatSetType(A, MATMPIAIJ);
MatMPIAIJSetPreallocation(A, 0, d_nnz, 0,
Hi,
While trying to figure out a problem, I came across the following
situation. Consider the following code:
int main (int argc, char **argv){
PetscInitialize(argc, argv, (char*)0, help);
Mat m;
MatCreate(PETSC_COMM_WORLD, m);
MatSetSizes(m, 10, 10, PETSC_DECIDE,
See
http://www.mcs.anl.gov/petsc/documentation/changes/dev.html:
You MUST now call MatXXXSetPreallocation() or MatSetUp() on any matrix you
create directly (not using DMCreateMatrix()) before calling MatSetValues(),
MatSetValuesBlocked() etc.
On Tue, Apr 24, 2012 at 6:01 PM, Mohammad Mirzadeh
Thanks Hong.
On Tue, Apr 24, 2012 at 4:25 PM, Hong Zhang hzhang at mcs.anl.gov wrote:
See
http://www.mcs.anl.gov/petsc/documentation/changes/dev.html:
You MUST now call MatXXXSetPreallocation() or MatSetUp() on any matrix you
create directly (not using DMCreateMatrix()) before calling
Hong,
Is this also true with MatSetType()? petsc-dev seems to need it (3.2-p6
does not) but it's not listed in the changes link ...
On Tue, Apr 24, 2012 at 4:27 PM, Mohammad Mirzadeh mirzadeh at gmail.comwrote:
Thanks Hong.
On Tue, Apr 24, 2012 at 4:25 PM, Hong Zhang hzhang at mcs.anl.gov
Mohammad :
Is this also true with MatSetType()? petsc-dev seems to need it (3.2-p6
does not) but it's not listed in the changes link ...
There is no change on MatSetType(). The default type is aij.
You can check petsc examples,
e.g. petsc-dev/src/ksp/ksp/examples/tutorials/ex2.c
Hong
On
When I do not explicitly set the type in petsc-dev I get errors:
[0]PETSC ERROR: - Error Message
[0]PETSC ERROR: Object is in wrong state!
[0]PETSC ERROR: Mat object's type is not set: Argument # 1!
[0]PETSC ERROR:
16 matches
Mail list logo