It was that, I totally forgot it. Thanks a lot!

On Tue, Oct 7, 2014 at 11:50 AM, Jed Brown <j...@jedbrown.org> wrote:

> Miguel Angel Salazar de Troya <salazardetr...@gmail.com> writes:
>
> > Hi all
> >
> > I'm solving a discretized PDE with TS. Inside my MonitorFunction(),
> hooked
> > up with TSMonitorSet(), I process the solution at each time step to write
> > another PETSc Vec. Then, I write this Vec to a matlab binary file. The
> name
> > of the binary file is the time step. I save it inside of the folder
> > "ForceHistory"
> >
> > // File name
> > PetscViewer    viewer;
> > std::string filehistory("ForceHistory/");
> > std::ostringstream temp;
> > temp << step;
> > filehistory.append(temp.str());
> > filehistory.append(".mat");
> >
> > // Open and set Binary file
> >
> PetscViewerBinaryOpen(PETSC_COMM_WORLD,filehistory.c_str(),FILE_MODE_WRITE,&viewer);
> > PetscViewerSetFormat(viewer, PETSC_VIEWER_BINARY_MATLAB);
> >
> > // Print
> > VecView(Context->Felement,viewer);
>
> Are you destroying the viewer (to close the file)?  It looks like either
> a max number of file descriptors or a disk quota problem.
>



-- 
*Miguel Angel Salazar de Troya*
Graduate Research Assistant
Department of Mechanical Science and Engineering
University of Illinois at Urbana-Champaign
(217) 550-2360
salaz...@illinois.edu

Reply via email to