[petsc-users] Error with MatView on multiple processors
Paul Urbanczyk
gomer at stanford.edu
Sat May 28 11:44:20 CDT 2016
Matt,
Thank you for your response. I'm going to go back to an earlier version
of my code that worked to see if I may have changed something. If not,
then I'll come up with a sandbox case to fiddle with. I'll post back if
I get stuck again.
-Paul
On 05/27/2016 06:43 PM, Matthew Knepley wrote:
> On Fri, May 27, 2016 at 8:38 PM, Paul Urbanczyk <gomer at stanford.edu
> <mailto:gomer at stanford.edu>> wrote:
>
> On 05/27/2016 05:44 PM, Matthew Knepley wrote:
>
>> On Fri, May 27, 2016 at 6:34 PM, Paul Urbanczyk
>> <gomer at stanford.edu <mailto:gomer at stanford.edu>> wrote:
>>
>> Hello,
>>
>> I'm having trouble with the MatView function drawing the
>> matrix structure(s) when I execute my code on multiple
>> processors.
>>
>> When I run on a single processor, the code runs fine, and the
>> graphics window displays cleanly.
>>
>>
>> Lets start with an example. I do this
>>
>> cd $PETSC_DIR/src/snes/examples/tutorials
>> make ex19
>>
>> Make sure it runs
>>
>> ./ex19 -snes_monitor
>>
>> Make sure it runs in parallel (maybe you need
>> $PETSC_DIR/$PETSC_ARCH/bin/mpiexec)
>>
>> mpiexec -n 2 ./ex19 -snes_monitor
>>
>> Make sure it can draw
>>
>> mpiexec -n 2 ./ex19 -snes_monitor -mat_view draw -draw_pause 1
>>
>> This runs fine for me. Can you try it?
>>
>> Thanks,
>>
>> Matt
> Hello Matt,
>
> Yes, this example seems to run just fine. How should I proceed?
>
>
> I am not sure what you are doing in your code. Can you try and change
> one of these examples
> to do something like what you do? SNEX ex19 seems like it does things
> mostly the way you
> describe.
>
> Matt
>
>
> -Paul
>>
>> When I run with multiple processors, I get error messages
>> (see below).
>>
>> The matrices are constructed with DMCreateMatrix(da, &A_matrix).
>>
>> I then set the values with
>> MatSetValuesStencil(A_matrix,1,&row,2,col_A,value_A,INSERT_VALUES).
>>
>> Finally, I call MatAssemblyBegin(A_matrix,MAT_FINAL_ASSEMBLY)
>> and MatAssemblyEnd(A_matrix,MAT_FINAL_ASSEMBLY).
>>
>> I also test that the matrices are assembled with
>> MatAssembled(A_matrix, &is_assembled_bool), and it appears
>> they are successfully assembled.
>>
>> Any help/advice is greatly appreciated.
>>
>> Thanks in advance!
>>
>> -Paul Urbanczyk
>>
>> [0]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [0]PETSC ERROR: Invalid argument
>> [0]PETSC ERROR: Wrong type of object: Parameter # 1
>> [0]PETSC ERROR: See
>> http://www.mcs.anl.gov/petsc/documentation/faq.html for
>> trouble shooting.
>> [0]PETSC ERROR: Petsc Release Version 3.7.1, unknown
>> [0]PETSC ERROR: ./urbanSCFD on a arch-linux2-c-debug named
>> prometheus by gomer Fri May 27 16:29:01 2016
>> [0]PETSC ERROR: Configure options --with-cc=mpicc
>> --with-cxx=mpicxx --with-fc=mpif90
>> [0]PETSC ERROR: #1 AOApplicationToPetsc() line 267 in
>> /home/gomer/local/petsc/src/vec/is/ao/interface/ao.c
>> [0]PETSC ERROR: #2 MatView_MPI_DA() line 557 in
>> /home/gomer/local/petsc/src/dm/impls/da/fdda.c
>> [0]PETSC ERROR: #3 MatView() line 901 in
>> /home/gomer/local/petsc/src/mat/interface/matrix.c
>> [1]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [1]PETSC ERROR: Invalid argument
>> [1]PETSC ERROR: Wrong type of object: Parameter # 1
>> [1]PETSC ERROR: See
>> http://www.mcs.anl.gov/petsc/documentation/faq.html for
>> trouble shooting.
>> [1]PETSC ERROR: Petsc Release Version 3.7.1, unknown
>> [1]PETSC ERROR: ./urbanSCFD on a arch-linux2-c-debug named
>> prometheus by gomer Fri May 27 16:29:01 2016
>> [1]PETSC ERROR: Configure options --with-cc=mpicc
>> --with-cxx=mpicxx --with-fc=mpif90
>> [1]PETSC ERROR: #1 AOApplicationToPetsc() line 267 in
>> /home/gomer/local/petsc/src/vec/is/ao/interface/ao.c
>> [1]PETSC ERROR: #2 MatView_MPI_DA() line 557 in
>> /home/gomer/local/petsc/src/dm/impls/da/fdda.c
>> [1]PETSC ERROR: #3 MatView() line 901 in
>> /home/gomer/local/petsc/src/mat/interface/matrix.c
>> [0]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [0]PETSC ERROR: Invalid argument
>> [1]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [1]PETSC ERROR: Invalid argument
>> [1]PETSC ERROR: Wrong type of object: Parameter # 1
>> [1]PETSC ERROR: See
>> http://www.mcs.anl.gov/petsc/documentation/faq.html for
>> trouble shooting.
>> [1]PETSC ERROR: Petsc Release Version 3.7.1, unknown
>> [1]PETSC ERROR: ./urbanSCFD on a arch-linux2-c-debug named
>> prometheus by gomer Fri May 27 16:29:01 2016
>> [1]PETSC ERROR: Configure options --with-cc=mpicc
>> --with-cxx=mpicxx --with-fc=mpif90
>> [1]PETSC ERROR: #4 AOApplicationToPetsc() line 267 in
>> /home/gomer/local/petsc/src/vec/is/ao/interface/ao.c
>> [1]PETSC ERROR: #5 MatView_MPI_DA() line 557 in
>> /home/gomer/local/petsc/src/dm/impls/da/fdda.c
>> [1]PETSC ERROR: #6 MatView() line 901 in
>> /home/gomer/local/petsc/src/mat/interface/matrix.c
>> [0]PETSC ERROR: Wrong type of object: Parameter # 1
>> [0]PETSC ERROR: See
>> http://www.mcs.anl.gov/petsc/documentation/faq.html for
>> trouble shooting.
>> [0]PETSC ERROR: Petsc Release Version 3.7.1, unknown
>> [0]PETSC ERROR: ./urbanSCFD on a arch-linux2-c-debug named
>> prometheus by gomer Fri May 27 16:29:01 2016
>> [0]PETSC ERROR: Configure options --with-cc=mpicc
>> --with-cxx=mpicxx --with-fc=mpif90
>> [0]PETSC ERROR: #4 AOApplicationToPetsc() line 267 in
>> /home/gomer/local/petsc/src/vec/is/ao/interface/ao.c
>> [0]PETSC ERROR: #5 MatView_MPI_DA() line 557 in
>> /home/gomer/local/petsc/src/dm/impls/da/fdda.c
>> [0]PETSC ERROR: #6 MatView() line 901 in
>> /home/gomer/local/petsc/src/mat/interface/matrix.c
>>
>>
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to
>> which their experiments lead.
>> -- Norbert Wiener
>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which
> their experiments lead.
> -- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160528/43ff645e/attachment.html>
More information about the petsc-users
mailing list