[petsc-users] Save matrix to binary file on sub directory

Robert Rezk robertrezk at yahoo.ca
Thu Oct 2 12:17:41 CDT 2014


This is the code I used
  PetscViewer viewer;
  PetscErrorCode ierr;

  PetscViewerBinaryOpen(comm_,File_Name.c_str(),FILE_MODE_WRITE,&viewer);
  
  

    ierr = MatView(*petsc_matrix, viewer);

  PetscViewerDestroy(&viewer);

and I can't see any output or crash
 
Best Regards 
Robert Andrawis 





________________________________
 From: Jed Brown <jed at jedbrown.org>
To: Robert Rezk <robertrezk at yahoo.ca>; "petsc-users at mcs.anl.gov" <petsc-users at mcs.anl.gov> 
Sent: Thursday, October 2, 2014 1:04 PM
Subject: Re: [petsc-users] Save matrix to binary file on sub directory
 

Robert Rezk <robertrezk at yahoo.ca> writes:


> I am using the pets viewer and I want to save binary file to sub directory.
>
> I tried to save file to the current directory and it work fine.
>
> when I try to use file name like this "./xyz_dir/file_name" it doesn't work.

What symptoms do you see?  Can you reproduce with an example?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141002/7a2cf33e/attachment-0001.html>


More information about the petsc-users mailing list