Dear Petsc developers, I'm reading a matrix from a file like this:
PetscViewer viewer; PetscErrorCode ierr; MatCreate(comm,&matrix); MatSetType(matrix,MATDENSE); ierr = PetscViewerBinaryOpen(comm,file_name,FILE_MODE_READ,&viewer); ierr = MatLoad(matrix,viewer);Sometimes the file that is needed is not present and the code execution becomes frozen.
Is it possible to catch this situation looking at the ierr variable? Thank you, Michael.