Questions regarding MatCreateMPIAIJWithArrays
Mads Fredrik Skoge Hoel
mfhoel at ifi.uio.no
Tue Apr 24 08:45:46 CDT 2007
Hi,
I am in a similar situation as Tim. I am starting out with a sequential
program using PETSc as a solver and this other library to discretisize.
Which hopefully will become a parallel program once run under mpirun.
But calling MatCreateMPIAIJWithArrays i get the error message:
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Object is in wrong state!
[0]PETSC ERROR: Must call MatSetSizes() first!
[0]PETSC ERROR:
------------------------------------------------------------------------
This is the call generating the error message:
MatCreateMPIAIJWithArrays(PETSC_COMM_WORLD, n, m, n, m, irow, jcol,
&dpA(1), &A);
I am probably using the MatCreateMPIAIJWithArrays function wrong or in a
wrong context.
Is it allowed to call MatCreateMPIAIJWithArrays when running as a
uniprocessor application? Or must I use in a multiprocessor context
calling MatCreateSeqAIJWithArrays on each processor? And how would a PETSc
solver know that local Mat A is part of a global matrix?
Any help is highly appreciated.
Regards,
Mads
More information about the petsc-users
mailing list