[petsc-users] About MatView
Longyin Cui
cuilongyin at gmail.com
Fri Jun 19 22:42:51 CDT 2015
Hi dear whoever reads this:
I have a quick question:
After matrix assembly, suppouse I have matrix A. Assuming I used 16
processors, if I want each processor to print out their local contents of
the A, how do I proceed? (I simply want to know how the matrix is stored
from generating to communicating to solving, so I get to display all the
time to get better undersdtanding)
I read the examples, and I tried things like below and sooooo many
different codes from examples, it still is not working.
PetscViewer viewer;
PetscMPIInt my_rank;
MPI_Comm_rank(PETSC_COMM_WORLD,&my_rank);
PetscPrintf(MPI_COMM_SELF,"[%d] rank\n",my_rank);
PetscViewerASCIIOpen(MPI_COMM_SELF,NULL,&viewer);
PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_INFO);
MatView(impOP,viewer);
Plea......se give me some hints
Thank you so very much!
Longyin Cui (or you know me as Eric);
Student from C.S. division;
Cell: 7407047169;
return 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150619/a599f1a0/attachment.html>
More information about the petsc-users
mailing list