<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yes.  It works without MPIIO.  <div class=""><br class=""></div><div class="">-Hanqi<br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class="Apple-interchange-newline">---------------</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hanqi Guo</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Postdoctoral Appointee<br class="">Mathematics and Computer Science Division<br class="">Argonne National Laboratory<br class="">9700 S. Cass Ave., Bldg 240<br class="">Argonne, IL 60439<br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">e-mail: <a href="mailto:hguo@anl.gov" class="">hguo@anl.gov</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">web: <a href="http://www.mcs.anl.gov/~hguo" class="">http://www.mcs.anl.gov/~hguo</a><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">phone: 630-252-7225</div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Feb 28, 2016, at 11:05 AM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">   Does it work without the PetscViewerBinarySetUseMPIIO(viewer, PETSC_TRUE); ?<br class=""><br class="">  Barry<br class=""><br class=""><blockquote type="cite" class="">On Feb 27, 2016, at 9:57 PM, Guo, Hanqi <<a href="mailto:hguo@anl.gov" class="">hguo@anl.gov</a>> wrote:<br class=""><br class="">Hi, <br class=""><br class="">I am trying to write a sparse matrix to file with MPIIO but failed.  I got the same error on vesta (gpfs), my Macbook (local disk), and a linux machine (nfs).  The followings are my code snippet and error output.  Could anyone help me check the code?  Thanks!  <br class=""><br class="">...<br class="">    MatCreate(PETSC_COMM_WORLD, &mat);<br class="">    MatSetType(mat, MATMPIAIJ);<br class="">    MatSetSizes(mat, PETSC_DECIDE, PETSC_DECIDE, n, n);<br class="">    MatSetUp(mat);<br class="">...<br class="">    // write matrix<br class="">...<br class="">    MatAssemblyBegin(mat, MAT_FINAL_ASSEMBLY);<br class="">    MatAssemblyEnd(mat, MAT_FINAL_ASSEMBLY);<br class=""><br class="">    PetscViewer viewer; <br class="">    PetscViewerCreate(PETSC_COMM_WORLD, &viewer); <br class="">    PetscViewerSetType(viewer, PETSCVIEWERBINARY);<br class="">    PetscViewerFileSetMode(viewer, FILE_MODE_WRITE);<br class="">    PetscViewerFileSetName(viewer, "sfm.mat");<br class="">    PetscViewerBinarySetUseMPIIO(viewer, PETSC_TRUE);<br class="">    MatView(mat, viewer);<br class="">    PetscViewerDestroy(&viewer);<br class="">...<br class=""><br class=""><br class="">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br class="">[0]PETSC ERROR: Write to file failed<br class="">[0]PETSC ERROR: Error writing to file total size 4 err -1 wsize 16<br class="">[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" class="">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br class="">[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 <br class="">[0]PETSC ERROR: Unknown Name on a arch-linux2-c-debug named compute001 by hguo Sat Feb 27 21:40:04 2016<br class="">[0]PETSC ERROR: Configure options â€”prefix=(hidden) --with-fc=0 --download-f2cblaslapack --with-mpi-dir=(hidden) --with-precision=single<br class="">[0]PETSC ERROR: #1 PetscBinaryWrite() line 405 in (hidden)/petsc-3.6.3/src/sys/fileio/sysio.c<br class="">[0]PETSC ERROR: #2 MatView_MPIAIJ_Binary() line 1219 in (hidden)/petsc-3.6.3/src/mat/impls/aij/mpi/mpiaij.c<br class="">[0]PETSC ERROR: #3 MatView_MPIAIJ_ASCIIorDraworSocket() line 1385 in (hidden)/petsc-3.6.3/src/mat/impls/aij/mpi/mpiaij.c<br class="">[0]PETSC ERROR: #4 MatView_MPIAIJ() line 1470 in (hidden)/petsc-3.6.3/src/mat/impls/aij/mpi/mpiaij.c<br class="">[0]PETSC ERROR: #5 MatView() line 886 in (hidden)/petsc-3.6.3/src/mat/interface/matrix.c<br class=""><br class=""><br class="">---------------<br class="">Hanqi Guo<br class="">Postdoctoral Appointee<br class="">Mathematics and Computer Science Division<br class="">Argonne National Laboratory<br class="">9700 S. Cass Ave., Bldg 240<br class="">Argonne, IL 60439<br class="">e-mail: <a href="mailto:hguo@anl.gov" class="">hguo@anl.gov</a><br class="">web: <a href="http://www.mcs.anl.gov/~hguo" class="">http://www.mcs.anl.gov/~hguo</a><br class="">phone: 630-252-7225<br class=""><br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div></body></html>