<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:12px"><div class="" style="">This is the code I used</div><div class="" style=""> PetscViewer viewer;</div><div class="" style=""> PetscErrorCode ierr;</div><div class="" style=""><br class="" style=""></div><div class="" style=""> PetscViewerBinaryOpen(comm_,File_Name.c_str(),FILE_MODE_WRITE,&viewer);</div><div class="" style=""> </div><div class="" style=""> </div><div class="" style=""><br class="" style=""></div><div class="" style=""> ierr = MatView(*petsc_matrix, viewer);</div><div class="" style=""><br></div><div class="" style=""> PetscViewerDestroy(&viewer);</div><div class="" style=""><span class="" style=""></span></div><div class="" style=""><br></div><div class="" style="">and I can't see any output or crash</div><div class="" style=""></div><div class=""
style=""> </div><div class="" style="">Best Regards
<br class="" style="">Robert Andrawis
<br class="" style="">
<br class="" style="">
<br class="" style=""></div><div class="" style=""><br class="" style=""></div> <div style="font-family: verdana, helvetica, sans-serif; font-size: 12px;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" class=""> <div dir="ltr" class="" style=""> <hr size="1" class="" style=""> <font size="2" face="Arial" class="" style=""> <b class="" style=""><span style="font-weight:bold;" class="">From:</span></b> Jed Brown <jed@jedbrown.org><br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">To:</span></b> Robert Rezk <robertrezk@yahoo.ca>; "petsc-users@mcs.anl.gov" <petsc-users@mcs.anl.gov> <br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">Sent:</span></b> Thursday, October 2, 2014 1:04 PM<br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">Subject:</span></b> Re:
[petsc-users] Save matrix to binary file on sub directory<br class="" style=""> </font> </div> <div class="" style=""><br class="" style="">Robert Rezk <<a shape="rect" ymailto="mailto:robertrezk@yahoo.ca" class="" style="" href="">robertrezk@yahoo.ca</a>> writes:<div class="" id="yqtfd08616" style=""><br clear="none" class="" style=""><br clear="none" class="" style="">> I am using the pets viewer and I want to save binary file to sub directory.<br clear="none" class="" style="">><br clear="none" class="" style="">> I tried to save file to the current directory and it work fine.<br clear="none" class="" style="">><br clear="none" class="" style="">> when I try to use file name like this "./xyz_dir/file_name" it doesn't work.</div><br clear="none" class="" style=""><br clear="none" class="" style="">What symptoms do you see? Can you reproduce with an example?<div class="" id="yqtfd07697" style=""><br clear="none" class=""
style=""></div><br class="" style=""><br class="" style=""></div> </div> </div> </div></body></html>