[petsc-users] Matrix output more than 1024 rows for multi-process

Peter Wang pengxwang at hotmail.com
Sun Jan 2 12:43:18 CST 2011


A matrix with more than 1024 rows was output by calling MatView().  If only one process was used, then no error came out. However, if multi-process were used, the error information like 'ASCII matrix output not allowed for matrices with more than 1024 rows' came out. If the rule of 1024 rows is only for multi-process?
 
To my understand,  there should be two approaches: 1 use binary format, 2 use option -mat_ascii_output_large.
If I need to check the matrix on the monitor, I cannot use MatView() to do this, right?  Whether the binary format can  be used to output the matrix to the monitor?
 
In FAQ, the answer suggests to use the examples of  ex72.c, ex78.c and ex32.c.  Is there any example for this issue in Fortran?  Thanks.
 
The solution in FAQ:
How can I read in or write out a sparse matrix in Matrix Market, Harwell-Boeing, SLAPC or other ASCII format?See the examples in src/mat/examples/tests, specifically ex72.c, ex78.c, and ex32.c. You will likely need to modify the code slightly to match your required ASCII format. Note: Never read or write in parallel an ASCII matrix file, instead for reading: read in sequentially with a standalone code based on ex72.c, ex78.c, or ex32.c then save the matrix with the binary viewer PetscBinaryViewerOpen() and load the matrix in parallel in your "real" PETSc program with MatLoad(); for writing save with the binary viewer and then load with the sequential code to store it as ASCII.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110102/7cc931d4/attachment.htm>


More information about the petsc-users mailing list